yaffs Fixed an error in direct/timothy_tests/quick_tests
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_rename_EINVAL.c
index 95ddc37991f8da699e06f3ed83f838a70ddfc851..716d7dcfff92bfe7a87c3f596ebca83f1591afc5 100644 (file)
@@ -20,7 +20,6 @@ int test_yaffs_rename_EINVAL(void)
        int error_code =0;
 
        if (0 !=  yaffs_access(DIR_PATH,0)) {
-               printf("dir does not exist\n");
                output = yaffs_mkdir(DIR_PATH,S_IWRITE | S_IREAD);
                if (output < 0) {
                        print_message("failed to create directory\n",2);
@@ -46,7 +45,7 @@ int test_yaffs_rename_EINVAL(void)
 int test_yaffs_rename_EINVAL_clean(void)
 {
        int output = 0;
-       if (0 ==  yaffs_access(RENAME_PATH,0)) {
+       if (0 ==  yaffs_access(RENAME_PATH,0) && 0 != yaffs_access(DIR_PATH,0)) {
                output = yaffs_rename(RENAME_PATH,FILE_PATH);
                if (output < 0) {
                        print_message("failed to remove the directory\n",2);