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 79a7aae..244b8b0 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 5fbf67a..1f12861 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 080d20a..37eafa5 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 182fb0d..b756b3e 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) {