fixed up all the quick tests
[yaffs2.git] / direct / test-framework / timothy_tests / quick_tests / test_yaffs_mkdir_ENOTDIR.c
index c417bb372d26e64f8bcd38241c552018e3f4972b..709e3edd03cd00187641429a7b31a53efe8130f1 100644 (file)
@@ -19,8 +19,11 @@ int test_yaffs_mkdir_ENOTDIR(void)
 {
        int error_code = 0;
        
-
-       output = yaffs_mkdir("/yaffs2/foo/new_directory/",O_CREAT | O_RDWR);
+       if (yaffs_close(yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE))==-1){
+               print_message("failed to create file\n",1);
+               return -1;
+       }
+       output = yaffs_mkdir("/yaffs2/test_dir/foo/new_directory/",O_CREAT | O_RDWR);
        if (output < 0){
                error_code = yaffs_get_error();
                if (abs(error_code) == ENOTDIR){