yaffs Fixed some bugs in quick tests and added some more tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_remount_force_off_read_only_off.c
similarity index 55%
rename from direct/timothy_tests/quick_tests/test_yaffs_sync_ENOENT.c
rename to direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c
index 2f1792d4ac4cb789468014dc084126e1ba6190c1..e86f9239a71223d5f3bae3f8fa87f31254567f3a 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_sync_ENOENT.h"
+#include "test_yaffs_remount_force_off_read_only_off.h"
 
+int test_yaffs_remount_force_off_read_only_off(void)
+{
+       int output = -1;
+       int error_code =0;
+
+
+       output = yaffs_remount(YAFFS_MOUNT_POINT,0,0);
+       if (output>=0){
+               return 1;
+       } else {
+               print_message("failed to remount\n",2);
+               return -1;
+       }
+}
 
-int test_yaffs_sync_ENOENT(void)
+int test_yaffs_remount_force_off_read_only_off_clean(void)
 {
-       int error_code=-1;
-       int output = yaffs_sync("yaffs2/non-existing-file");
-       
+       int output=0;
+       int error_code =0;
+       output= yaffs_mount(YAFFS_MOUNT_POINT);
        if (output<0){
                error_code=yaffs_get_error();
-               if (abs(error_code)==ENOENT){
+               if (abs(error_code) == EBUSY){
                        return 1;
                } else {
-                       print_message("returned error does not match the the expected error\n",2);
                        return -1;
                }
-       } else {
-               print_message("synced a file in a non-existing directory (which is a bad thing)\n",2);
-               return -1;
-       }       
-
-
-}
-
-
-int test_yaffs_sync_ENOENT_clean(void)
-{
+       }
        return 1;
 }
-