yaffs Adding more error code test programs to quick tests. note the bugs are still...
authorTimothy Manning <tfhmanning@gmail.com>
Wed, 3 Nov 2010 22:08:52 +0000 (11:08 +1300)
committerTimothy Manning <tfhmanning@gmail.com>
Wed, 3 Nov 2010 22:08:52 +0000 (11:08 +1300)
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
31 files changed:
direct/timothy_tests/quick_tests/Makefile
direct/timothy_tests/quick_tests/quick_tests.c
direct/timothy_tests/quick_tests/quick_tests.h
direct/timothy_tests/quick_tests/test_yaffs_access.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h
direct/timothy_tests/quick_tests/test_yaffs_lseek.c
direct/timothy_tests/quick_tests/test_yaffs_lseek.h
direct/timothy_tests/quick_tests/test_yaffs_open.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_open_file.c [deleted file]
direct/timothy_tests/quick_tests/test_yaffs_open_file.h [deleted file]
direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.c [deleted file]
direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.h [deleted file]
direct/timothy_tests/quick_tests/test_yaffs_read.c
direct/timothy_tests/quick_tests/test_yaffs_read.h
direct/timothy_tests/quick_tests/test_yaffs_stat.h
direct/timothy_tests/quick_tests/test_yaffs_truncate.c
direct/timothy_tests/quick_tests/test_yaffs_truncate.h
direct/timothy_tests/quick_tests/test_yaffs_unlinking.c
direct/timothy_tests/quick_tests/test_yaffs_unlinking.h
direct/timothy_tests/quick_tests/test_yaffs_write.c
direct/timothy_tests/quick_tests/test_yaffs_write.h

index 543cdbf706fdc670ffe25a98838aff4c594db05f..09cdba1b005317458b40ffc9a8c8707c33d97c99 100644 (file)
@@ -44,8 +44,19 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsf
 
 #               yaffs_checkptrwtest.o\
 
 
 #               yaffs_checkptrwtest.o\
 
-YAFFSTESTOBJS  = $(COMMONTESTOBJS) quick_tests.o lib.o test_mount_yaffs.o   test_yaffs_unlinking.o test_yaffs_open_file.o test_yaffs_ftruncate.o test_yaffs_truncate.o \
-               test_yaffs_write.o test_yaffs_read.o test_yaffs_lseek.o test_yaffs_access.o test_yaffs_stat.o test_yaffs_open_file_ENOENT.o
+TESTFILES =    quick_tests.o lib.o \
+               test_mount_yaffs.o \
+               test_yaffs_open.o test_yaffs_open_ENOENT.o test_yaffs_open_ENOTDIR.o test_yaffs_open_EEXIST.o test_yaffs_open_EISDIR.o \
+               test_yaffs_unlinking.o  \
+               test_yaffs_ftruncate.o test_yaffs_truncate.o \
+               test_yaffs_write.o \
+               test_yaffs_read.o \
+               test_yaffs_lseek.o \
+               test_yaffs_access.o \
+               test_yaffs_stat.o 
+                 
+
+YAFFSTESTOBJS  = $(COMMONTESTOBJS) $(TESTFILES)
 
 PYTONOSYMLINKS = yaffs_error_converter.c yaffs_error_converter.h
 PYTHONOBJS = yaffs_error_converter.o
 
 PYTONOSYMLINKS = yaffs_error_converter.c yaffs_error_converter.h
 PYTHONOBJS = yaffs_error_converter.o
index 6c548fbbc3803e1c2e8c25f908ffdc3e857bf076..c1e86bc88f94e2869f199ad5e8e6276baab25161 100644 (file)
@@ -31,8 +31,11 @@ test_template test_list[]={
        //{dummy_test_pass,dummy_test_pass_clean,"dummy_test_pass"},
        //{dummy_test_fail,dummy_test_fail_clean,"dummy_test_fail"},
        {mount_yaffs_test,mount_yaffs_test_clean,"mount_yaffs_test"},
        //{dummy_test_pass,dummy_test_pass_clean,"dummy_test_pass"},
        //{dummy_test_fail,dummy_test_fail_clean,"dummy_test_fail"},
        {mount_yaffs_test,mount_yaffs_test_clean,"mount_yaffs_test"},
-       {test_yaffs_open_file,test_yaffs_open_file_clean,"test_yaffs_open_file"},
-       {test_yaffs_open_file_ENOENT,test_yaffs_open_file_ENOENT_clean,"test_yaffs_open_file_ENOENT"},
+       {test_yaffs_open,test_yaffs_open_clean,"test_yaffs_open"},
+       {test_yaffs_open_EISDIR,test_yaffs_open_EISDIR_clean,"test_yaffs_open_EISDIR"},
+       {test_yaffs_open_EEXIST,test_yaffs_open_EEXIST_clean,"test_yaffs_open_EEXIST"},
+       {test_yaffs_open_ENOTDIR,test_yaffs_open_ENOTDIR_clean,"test_yaffs_open_ENOTDIR"},
+       {test_yaffs_open_ENOENT,test_yaffs_open_ENOENT_clean,"test_yaffs_open_ENOENT"},
        
        {test_yaffs_access,test_yaffs_access_clean,"test_yaffs_access"},
        {test_yaffs_unlinking, test_yaffs_unlinking_clean,"test_yaffs_unlinking"},
        
        {test_yaffs_access,test_yaffs_access_clean,"test_yaffs_access"},
        {test_yaffs_unlinking, test_yaffs_unlinking_clean,"test_yaffs_unlinking"},
index 18b08766ceeff9ae73b79b7097f405736c0d3af4..8172345b2c2d98bd097e0501f78c67d8525329fc 100644 (file)
@@ -3,8 +3,11 @@
 #include <stdio.h>
 
 #include "test_mount_yaffs.h"
 #include <stdio.h>
 
 #include "test_mount_yaffs.h"
-#include "test_yaffs_open_file.h"
-#include "test_yaffs_open_file_ENOENT.h"
+#include "test_yaffs_open.h"
+#include "test_yaffs_open_EISDIR.h"
+#include "test_yaffs_open_EEXIST.h"
+#include "test_yaffs_open_ENOENT.h"
+#include "test_yaffs_open_ENOTDIR.h"
 #include "test_yaffs_unlinking.h"
 #include "test_yaffs_ftruncate.h"
 #include "test_yaffs_truncate.h"
 #include "test_yaffs_unlinking.h"
 #include "test_yaffs_ftruncate.h"
 #include "test_yaffs_truncate.h"
index 23ff33fac3b7a20b3c32c481c9847381c21f3185..18624ea574d2bbb25b0576b305a5b67d182b256e 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_access_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_access_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 #include "test_yaffs_lseek.h"
 int test_yaffs_access(void);
 int test_yaffs_access_clean(void);
 #include "test_yaffs_lseek.h"
 int test_yaffs_access(void);
 int test_yaffs_access_clean(void);
index 02964f72714ccbd97b482a95493bb79b0ff8c7be..8e97f3229a72961e0749f89e92ff548e6c2a9b42 100644 (file)
@@ -2,7 +2,7 @@
 
 static int handle=0;
 int test_yaffs_ftruncate(void){
 
 static int handle=0;
 int test_yaffs_ftruncate(void){
-       handle=test_yaffs_open_file();
+       handle=test_yaffs_open();
        if (handle>0){
                return yaffs_ftruncate(handle,FILE_SIZE_TRUNCATED );
        }
        if (handle>0){
                return yaffs_ftruncate(handle,FILE_SIZE_TRUNCATED );
        }
index cc2423b89442bf5cf9c3360b56c87ffa53d5552c..e5558098bf5c8d879673d06b2e104923bff6ed88 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_ftruncate_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_ftruncate_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 int test_yaffs_ftruncate(void);
 int test_yaffs_ftruncate_clean(void); 
 #endif
 int test_yaffs_ftruncate(void);
 int test_yaffs_ftruncate_clean(void); 
 #endif
index a6afa51a3722493b1f9ea97dc8e590943d7751fd..422f6db9e141278014e33be76b4add1c25a7c6a9 100644 (file)
@@ -2,7 +2,7 @@
 
 static int handle=0;
 int test_yaffs_lseek(void){
 
 static int handle=0;
 int test_yaffs_lseek(void){
-       handle=test_yaffs_open_file();
+       handle=test_yaffs_open();
        char text[20]="\0";
        int output=0;
        if (handle>0){
        char text[20]="\0";
        int output=0;
        if (handle>0){
index 0902b924e6c9ace3f86f1dd0bf9bf02385af1b53..d300734679c4e4dd9749467b2196a822630d00d7 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_lseek_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_lseek_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 
 int test_yaffs_lseek(void);
 int test_yaffs_lseek_clean(void);
 
 int test_yaffs_lseek(void);
 int test_yaffs_lseek_clean(void);
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open.c b/direct/timothy_tests/quick_tests/test_yaffs_open.c
new file mode 100644 (file)
index 0000000..068ceea
--- /dev/null
@@ -0,0 +1,20 @@
+#include "test_yaffs_open.h"
+
+static int handle=0;
+
+int test_yaffs_open(void){
+
+       handle=yaffs_open(FILE_PATH,O_CREAT | O_TRUNC| O_RDWR, FILE_MODE);
+       return handle;
+}
+
+
+int test_yaffs_open_clean(void){
+       if (handle >=0){
+               return yaffs_close(handle);
+       }
+       else {
+               return 1;       /* the file failed to open so there is no need to close it*/
+       }
+}
+
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open.h b/direct/timothy_tests/quick_tests/test_yaffs_open.h
new file mode 100644 (file)
index 0000000..e668267
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __test_yaffs_open_h__
+#define __test_yaffs_open_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open(void);
+int test_yaffs_open_clean(void);
+#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c
new file mode 100644 (file)
index 0000000..bc4a9d2
--- /dev/null
@@ -0,0 +1,35 @@
+#include "test_yaffs_open_EEXIST.h"
+
+static int handle=0;
+int test_yaffs_open_EEXIST(void){
+       int output=0;
+       int error_code=0;
+       /*printf("path %s\n",path); */
+       handle=yaffs_open(FILE_PATH, O_CREAT | O_EXCL | O_TRUNC| O_RDWR ,FILE_MODE );
+       if (handle==-1){
+               error_code=yaffs_get_error();
+               printf("EEXIST def %d, Error code %d\n",(- EEXIST),error_code);
+               if (abs(error_code)== EEXIST){
+                       return 1;
+               }
+               else {
+                       printf("different error than expected\n");
+                       return -1;
+               }
+       }
+       else if (output >=0){
+               printf("non existant file opened.(which is a bad thing)\n");
+               return -1;
+       }
+       /* the program should not get here but the compiler is complaining */
+       return -1;
+}
+int test_yaffs_open_EEXIST_clean(void){
+       if (handle >=0){
+               return yaffs_close(handle);
+       }
+       else {
+               return 1;       /* the file failed to open so there is no need to close it*/
+       }
+}
+
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h
new file mode 100644 (file)
index 0000000..364fed9
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __test_yaffs_open_EEXIST_h__
+#define __test_yaffs_open_EEXIST_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open_EEXIST(void);
+int test_yaffs_open_EEXIST_clean(void);
+#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c
new file mode 100644 (file)
index 0000000..3c5bdae
--- /dev/null
@@ -0,0 +1,37 @@
+#include "test_yaffs_open_EISDIR.h"
+
+/*EISDIR is caused by trying to open a directory */
+
+static int handle=0;
+int test_yaffs_open_EISDIR(void){
+       int output=0;
+       int error_code=0;
+       /*printf("path %s\n",path); */
+       handle=yaffs_open(YAFFS_MOUNT_POINT, O_CREAT | O_TRUNC| O_RDWR ,FILE_MODE );
+       if (handle==-1){
+               error_code=yaffs_get_error();
+               printf("EISDIR def %d, Error code %d\n", EISDIR,error_code);
+               if (abs(error_code)== EISDIR){
+                       return 1;
+               }
+               else {
+                       printf("different error than expected\n");
+                       return -1;
+               }
+       }
+       else if (output >=0){
+               printf("non existant directory opened.(which is a bad thing)\n");
+               return -1;
+       }
+       /* the program should not get here but the compiler is complaining */
+       return -1;
+}
+int test_yaffs_open_EISDIR_clean(void){
+       if (handle >=0){
+               return yaffs_close(handle);
+       }
+       else {
+               return 1;       /* the file failed to open so there is no need to close it*/
+       }
+}
+
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
new file mode 100644 (file)
index 0000000..539f2cf
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __test_yaffs_open_EISDIR_h__
+#define __test_yaffs_open_EISDIR_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open_EISDIR(void);
+int test_yaffs_open_EISDIR_clean(void);
+#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c
new file mode 100644 (file)
index 0000000..8ad4f74
--- /dev/null
@@ -0,0 +1,33 @@
+#include "test_yaffs_open_ENOENT.h"
+
+static int handle=0;
+int test_yaffs_open_ENOENT(void){
+       int output=0;
+       int error_code=0;
+       /*printf("path %s\n",path); */
+       handle=yaffs_open("/yaffs2/non_existant_file", O_TRUNC| O_RDWR,FILE_MODE );
+       if (handle==-1){
+               error_code=yaffs_get_error();
+               if (abs(error_code)==ENOENT){
+                       return 1;
+               }
+               else {
+                       printf("different error than expected\n");
+                       return -1;
+               }
+       }
+       else if (output >=0){
+               printf("non existant file opened.(which is a bad thing)\n");
+               return -1;
+       }
+
+}
+int test_yaffs_open_ENOENT_clean(void){
+       if (handle >=0){
+               return yaffs_close(handle);
+       }
+       else {
+               return 1;       /* the file failed to open so there is no need to close it*/
+       }
+}
+
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h
new file mode 100644 (file)
index 0000000..160a3db
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __test_yaffs_open_ENOENT_h__
+#define __test_yaffs_open_ENOENT_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open_ENOENT(void);
+int test_yaffs_open_ENOENT_clean(void);
+#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c
new file mode 100644 (file)
index 0000000..18081a7
--- /dev/null
@@ -0,0 +1,33 @@
+#include "test_yaffs_open_ENOTDIR.h"
+
+static int handle=0;
+int test_yaffs_open_ENOTDIR(void){
+       int output=0;
+       int error_code=0;
+       /*printf("path %s\n",path); */
+       handle=yaffs_open("/nonexisting_dir/foo", O_TRUNC| O_RDWR,FILE_MODE );
+       if (handle==-1){
+               error_code=yaffs_get_error();
+               if (abs(error_code)==ENOTDIR){
+                       return 1;
+               }
+               else {
+                       printf("different error than expected\n");
+                       return -1;
+               }
+       }
+       else if (output >=0){
+               printf("non existant directory opened.(which is a bad thing)\n");
+               return -1;
+       }
+
+}
+int test_yaffs_open_ENOTDIR_clean(void){
+       if (handle >=0){
+               return yaffs_close(handle);
+       }
+       else {
+               return 1;       /* the file failed to open so there is no need to close it*/
+       }
+}
+
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h
new file mode 100644 (file)
index 0000000..c38ea21
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __test_yaffs_open_ENOTDIR_h__
+#define __test_yaffs_open_ENOTDIR_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open_ENOTDIR(void);
+int test_yaffs_open_ENOTDIR_clean(void);
+#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_file.c b/direct/timothy_tests/quick_tests/test_yaffs_open_file.c
deleted file mode 100644 (file)
index ec750e7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "test_yaffs_open_file.h"
-
-
-int test_yaffs_open_file(void){
-       
-       int output=0;
-
-       /*printf("path %s\n",path); */
-       output=yaffs_open(FILE_PATH,O_CREAT | O_TRUNC| O_RDWR, FILE_MODE);
-
-       return output;
-}
-int test_yaffs_open_file_clean(void){
-       return 1;
-}
-
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_file.h b/direct/timothy_tests/quick_tests/test_yaffs_open_file.h
deleted file mode 100644 (file)
index 1f1bb91..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __test_yaffs_open_file_h__
-#define __test_yaffs_open_file_h__
-
-#include "lib.h"
-#include "yaffsfs.h"
-
-int test_yaffs_open_file(void);
-int test_yaffs_open_file_clean(void);
-#endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.c
deleted file mode 100644 (file)
index ed57e2d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "test_yaffs_open_file_ENOENT.h"
-
-static int handle=0;
-int test_yaffs_open_file_ENOENT(void){
-       int output=0;
-       int error_code=0;
-       /*printf("path %s\n",path); */
-       handle=yaffs_open("/yaffs2/non_existant_file", O_TRUNC| O_RDWR,FILE_MODE );
-       if (handle==-1){
-               error_code=yaffs_get_error();
-               if (error_code==ENOENT){
-                       return 1;
-               }
-       }
-       else if (output >=0){
-               printf("non existant file opened.(which is a bad thing)\n");
-               return -1;
-       }
-
-}
-int test_yaffs_open_file_ENOENT_clean(void){
-       return 1;
-}
-
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.h
deleted file mode 100644 (file)
index 2aecff2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __test_yaffs_open_file_ENOENT_h__
-#define __test_yaffs_open_file_ENOENT_h__
-
-#include "lib.h"
-#include "yaffsfs.h"
-
-int test_yaffs_open_file_ENOENT(void);
-int test_yaffs_open_file_ENOENT_clean(void);
-#endif
index 22a9d3db91f6aec3e2d056c66147018df902b281..bdd58cf1148fe87f781c2209506e707ca74ae875 100644 (file)
@@ -3,7 +3,7 @@
 static int handle=0;
 
 int test_yaffs_read(void){
 static int handle=0;
 
 int test_yaffs_read(void){
-       handle=test_yaffs_open_file();
+       handle=test_yaffs_open();
        char text[20]="\0";
        int output=0;
        printf("handle %d\n",handle);
        char text[20]="\0";
        int output=0;
        printf("handle %d\n",handle);
index f21ca964613a6904a04a195953f332bba4a9cd1c..ce9f5a23aa41f18f62f50df2d857dc996b0ee54a 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_read_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_read_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 
 
 int test_yaffs_read(void);
 
 
 int test_yaffs_read(void);
index 21e12f391700f80e7374865be451b0a01a29c768..bf87ccb183e595a1d7404ac2c3b0e1945a82c932 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_stat_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_stat_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 #include "test_yaffs_lseek.h"
 int test_yaffs_stat(void);
 int test_yaffs_stat_clean(void);
 #include "test_yaffs_lseek.h"
 int test_yaffs_stat(void);
 int test_yaffs_stat_clean(void);
index 57511edf20c19e0b2846a07209d4101826ca5f56..2f509bb66aed06053360342a4a7ab6db5e98e6cb 100644 (file)
@@ -2,7 +2,7 @@
 static int handle=0;
 
 int test_yaffs_truncate(void){
 static int handle=0;
 
 int test_yaffs_truncate(void){
-       handle=test_yaffs_open_file();
+       handle=test_yaffs_open();
        if (handle>0){
                return yaffs_truncate(FILE_PATH,FILE_SIZE_TRUNCATED );
        }
        if (handle>0){
                return yaffs_truncate(FILE_PATH,FILE_SIZE_TRUNCATED );
        }
@@ -14,7 +14,7 @@ int test_yaffs_truncate(void){
 
 int test_yaffs_truncate_clean(void){
        /* change file size back to orignal size */
 
 int test_yaffs_truncate_clean(void){
        /* change file size back to orignal size */
-       int handle=test_yaffs_open_file();
+       int handle=test_yaffs_open();
        int output=0;
        if (handle>0){
                output= yaffs_truncate(FILE_PATH,FILE_SIZE );
        int output=0;
        if (handle>0){
                output= yaffs_truncate(FILE_PATH,FILE_SIZE );
index f73d9bce2bddf7fbfc5fb907734c78bc2c27a962..bfd738c0fb13dac153f44198d15b6bd0f0ab1e2f 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_truncate_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_truncate_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 int test_yaffs_truncate(void);
 int test_yaffs_truncate_clean(void); 
 #endif
 int test_yaffs_truncate(void);
 int test_yaffs_truncate_clean(void); 
 #endif
index d5f278734b31db4c8eff568255d2cad66126b644..ce06543e877a95d23eb8c5b33a31866cb9c2bfa3 100644 (file)
@@ -12,5 +12,5 @@ int test_yaffs_unlinking(void){
 }
 
 int test_yaffs_unlinking_clean(void){
 }
 
 int test_yaffs_unlinking_clean(void){
-       return test_yaffs_open_file();
+       return test_yaffs_open();
 }
 }
index 286cb454996ebe9f6476b60776dc095b82d49c5a..604ae24cfe02bd84af9ab5cae72aa11dfa44f412 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "lib.h"
 #include "yaffsfs.h"
 
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 #include "test_yaffs_access.h"
 
 int test_yaffs_unlinking(void);
 #include "test_yaffs_access.h"
 
 int test_yaffs_unlinking(void);
index 602afd52545561c635286c3a6fe854dc410e74dc..adfd2bfccbb4f550b085fecb85cb3583b5ec0b70 100644 (file)
@@ -2,7 +2,7 @@
 
 static int handle=0;
 int test_yaffs_write(void){
 
 static int handle=0;
 int test_yaffs_write(void){
-       handle=test_yaffs_open_file();
+       handle=test_yaffs_open();
        if (handle>0){
                return yaffs_write(handle, FILE_TEXT, FILE_TEXT_NBYTES);
        }
        if (handle>0){
                return yaffs_write(handle, FILE_TEXT, FILE_TEXT_NBYTES);
        }
index 800412359ab5491b5618ec289a5a51b47e8423c5..dfed86053039de589b28e05e0f0ef52f54bc3597 100644 (file)
@@ -2,7 +2,7 @@
 #define __test_yaffs_write_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #define __test_yaffs_write_h__
 #include "lib.h"
 #include "yaffsfs.h"
-#include "test_yaffs_open_file.h"
+#include "test_yaffs_open.h"
 int test_yaffs_write(void);
 int test_yaffs_write_clean(void);
 #endif
 int test_yaffs_write(void);
 int test_yaffs_write_clean(void);
 #endif