Have updated yaffs direct tests and added README files to the tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_rename_EINVAL.c
index 95ddc37991f8da699e06f3ed83f838a70ddfc851..a430577a4552553898a9513c6afca373b965b7bc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
@@ -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);