* published by the Free Software Foundation.
*/
-#include "test_yaffs_fstat_EROFS.h"
+#include "test_yaffs_fsync_EROFS.h"
static int handle = -1;
-int test_yaffs_fstat_EROFS(void)
+int test_yaffs_fsync_EROFS(void)
{
int output = 0;
- struct yaffs_stat stat;
int error_code = 0;
+
EROFS_setup();
handle = test_yaffs_open();
- output = yaffs_fstat(handle , &stat);
- if (output < 0){
- error_code = yaffs_get_error();
- if (abs(error_code) == EROFS){
+ output = yaffs_fsync(handle);
+ if (output==-1){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EROFS){
return 1;
} else {
- print_message("different error than expected\n", 2);
+ print_message("different error than expected\n",2);
return -1;
}
} else {
- print_message("file statted with EROFS set.(which is a bad thing)\n", 2 );
+ print_message("file synced with EROFS set.(which is a bad thing)\n",2);
return -1;
}
}
-int test_yaffs_fstat_EROFS_clean(void)
+
+int test_yaffs_fsync_EROFS_clean(void)
{
int output=1;
if (handle >= 0) {
}
return (EROFS_clean() && output);
}
+