yaffs Fixed some more bugs in quick tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_write_big_file.c
index 6d5033151374f497ef430b931683e5eac53a0d39..829204c78fd9c94aef467bd89c5b45d97852defa 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "test_yaffs_write_big_file.h"
 
-static int handle=0;
+static int handle=-1;
 static char *file_name = NULL;
 int test_yaffs_write_big_file(void)
 {
@@ -82,11 +82,11 @@ int test_yaffs_write_big_file_clean(void)
        }
 
        
-       output= test_yaffs_truncate_clean();    
+       output= yaffs_truncate(FILE_PATH,FILE_SIZE );   
        if (output>=0){
                output=test_yaffs_write();
                if (output>=0){
-                       return 1;
+                       return test_yaffs_write_clean();
                } else {
                        printf("failed to write to file\n");
                        return -1;