yaffs Fixed a bug in direct/timothy_tests/quick_tests
authorTimothy Manning <tfhmanning@gmail.com>
Fri, 26 Nov 2010 03:47:08 +0000 (16:47 +1300)
committerTimothy Manning <tfhmanning@gmail.com>
Fri, 26 Nov 2010 03:47:08 +0000 (16:47 +1300)
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
direct/timothy_tests/quick_tests/quick_tests.c
direct/timothy_tests/quick_tests/quick_tests.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c

index 79a7aae649b682f233e7e95502fe2c3f2df6d45b..244b8b0cf729953532b707bf9663059ad8c1049a 100644 (file)
@@ -39,6 +39,7 @@ int main(int argc, char *argv[]){
                printf("yaffs_open %d \n",output);
                printf("yaffs_close %d \n",yaffs_close(output));
        */      yaffs_set_error(0);     /*reset the last error to 0 */
+               //printf("foo exists %d\n",test_yaffs_open());
                sprintf(message,"\nrunning test: %s \n",test_list[x].name_of_test);
                print_message(message,3);
                output=test_list[x].p_function();       /*run test*/
index 5fbf67a9511e1faf19cb013d6c8f698550e26177..1f128611ca93d28d348af370aa2d2532db28fe8a 100644 (file)
@@ -373,8 +373,8 @@ test_template test_list[]={
        {test_yaffs_rename_dir,test_yaffs_rename_dir_clean,"test_yaffs_rename_dir"},
        {test_yaffs_rename_dir_ENOENT,test_yaffs_rename_dir_ENOENT_clean,"test_yaffs_rename_dir_ENOENT"},
        {test_yaffs_rename_dir_ENOENT2,test_yaffs_rename_dir_ENOENT2_clean,"test_yaffs_rename_dir_ENOENT2"},
-       {test_yaffs_rename_file_to_dir,test_yaffs_rename_file_to_dir_clean,"test_yaffs_rename_file_to_dir"},
        {test_yaffs_rename_dir_to_file,test_yaffs_rename_dir_to_file_clean,"test_yaffs_rename_dir_to_file"},
+       {test_yaffs_rename_file_to_dir,test_yaffs_rename_file_to_dir_clean,"test_yaffs_rename_file_to_dir"},
        {test_yaffs_rename_EEXISTS,test_yaffs_rename_EEXISTS_clean,"test_yaffs_rename_EEXISTS"},
        {test_yaffs_rename_ELOOP_dir,test_yaffs_rename_ELOOP_dir_clean,"test_yaffs_rename_ELOOP_dir"},
 
index 080d20a9cfb76b033f2fe0f899eec5f6ee2bc76f..37eafa515bf6b17fd81fbf64c3bc0f0fd342f323 100644 (file)
@@ -44,14 +44,6 @@ int test_yaffs_rename_ELOOP_dir(void)
 
 int test_yaffs_rename_ELOOP_dir_clean(void)
 {
-       int output = 0;
-       if (0 ==  yaffs_access(RENAME_PATH,0)) {
-               output = yaffs_rename(RENAME_PATH,FILE_PATH);
-               if (output < 0) {
-                       print_message("failed to remove the directory\n",2);
-                       return -1;
-               }
-       }
        return 1;
 
 }
index 182fb0d9dec97dfefa675cccc6bfb479dea6803c..b756b3e1e9a896f72cc8999e9b1b0c26d4b7ae4c 100644 (file)
@@ -45,6 +45,7 @@ int test_yaffs_rename_file_to_dir(void)
 int test_yaffs_rename_file_to_dir_clean(void)
 {
        int output = 0;
+       test_yaffs_open();
        if (0 ==  yaffs_access(RENAME_DIR_PATH,0)) {
                output = yaffs_unlink(RENAME_DIR_PATH);
                if (output < 0) {