Get timothy quick tests building cleanly.
authorCharles Manning <cdhmanning@gmail.com>
Fri, 8 Jul 2016 00:43:57 +0000 (12:43 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Fri, 8 Jul 2016 00:43:57 +0000 (12:43 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
43 files changed:
direct/test-framework/timothy_tests/quick_tests/Makefile
direct/test-framework/timothy_tests/quick_tests/lib.h
direct/test-framework/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_close_NULL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_dup.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_fchmod.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_flush.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_lseek.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_lstat.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_open_NULL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rename.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rename_dir_over_dir.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rename_file_over_file.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rename_full_dir_over_dir.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_stat_NULL.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c
direct/test-framework/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c

index 431c883c788ed677ab79101cd6d4762e2af3fa2d..f2bd02f5635df4c04cdf149b168c868d0a200eac 100644 (file)
@@ -96,10 +96,10 @@ include $(YDI_FRAMEWORK_DIR)/FrameworkRules.mk
 
 
 yaffs_test: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS)
-       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS)
+       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) -lpthread
 
 
 
 quick_tests: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS)
-       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS)
+       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS) -lpthread
 
index 5e36ca05687e6a7b8cf9a948eca08c596d0badcf..61e734f5b109858ccfee25e3574f897817ab1a21 100644 (file)
 #include "yaffsfs.h"
 
 
-#define YAFFS_MOUNT_POINT "/yaffs2/"
+#define YAFFS_MOUNT_POINT "/yflash2/"
 #define FILE_NAME "test_dir/foo"
 #define FILE_SIZE 10
 
+#define YAFFS_TEST_LONG_VALUE (100000000000000000LL)
+
 #define FILE_MODE (S_IREAD | S_IWRITE)
 #define FILE_SIZE_TRUNCATED 100
 #define FILE_TEXT "file foo "  /* keep space at end of string */
 #define FILE_TEXT_NBYTES 10
-#define TEST_DIR "/yaffs2/test_dir"
-#define DIR_PATH "/yaffs2/test_dir/new_directory"
-#define DIR_PATH2 "/yaffs2/test_dir/new_directory2"
-#define DIR_PATH2_FILE "/yaffs2/test_dir/new_directory2/foo"
-#define SYMLINK_PATH "/yaffs2/test_dir/sym_foo"
+#define TEST_DIR "/yflash2/test_dir"
+#define DIR_PATH "/yflash2/test_dir/new_directory"
+#define DIR_PATH2 "/yflash2/test_dir/new_directory2"
+#define DIR_PATH2_FILE "/yflash2/test_dir/new_directory2/foo"
+#define SYMLINK_PATH "/yflash2/test_dir/sym_foo"
 
-#define HARD_LINK_PATH "/yaffs2/test_dir/hard_link"
+#define HARD_LINK_PATH "/yflash2/test_dir/hard_link"
 
-#define NODE_PATH "/yaffs2/test_dir/node"
+#define NODE_PATH "/yflash2/test_dir/node"
 
-#define RENAME_PATH "/yaffs2/test_dir/foo2"
+#define RENAME_PATH "/yflash2/test_dir/foo2"
 
-#define RENAME_DIR_PATH "/yaffs2/test_dir/dir2"
+#define RENAME_DIR_PATH "/yflash2/test_dir/dir2"
 
-#define ELOOP_PATH "/yaffs2/test_dir/ELOOP"
-#define ELOOP2_PATH "/yaffs2/test_dir/ELOOP2"
+#define ELOOP_PATH "/yflash2/test_dir/ELOOP"
+#define ELOOP2_PATH "/yflash2/test_dir/ELOOP2"
 
-#define RMDIR_PATH "/yaffs2/test_dir/RM_DIR"
+#define RMDIR_PATH "/yflash2/test_dir/RM_DIR"
 
 /* warning do not define anything as FILE because there seems to be a conflict with stdio.h */ 
-#define FILE_PATH "/yaffs2/test_dir/foo"
-#define FILE_PATH2 "/yaffs2/test_dir/foo2"
+#define FILE_PATH "/yflash2/test_dir/foo"
+#define FILE_PATH2 "/yflash2/test_dir/foo2"
 
 void join_paths(char *path1,char *path2,char *new_path );
 void print_message(char *message,char print_level);
index 2015a65e542106b2f82ab2d7ede6ad6ecbb9bf04..013821e33a5d58344c707e780eeacb0b2a3505e9 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "test_yaffs_access_ENOENT2.h"
 
-static int handle=0;
-
 int test_yaffs_access_ENOENT2(void)
 {
        int output=0;
index a9718a8ba3edccec07165f718d2b5b33793322e7..021c03d434e2af5b5aa5b096f32332f74232c217 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "test_yaffs_access_ENOTDIR.h"
 
-static int handle=0;
-
 int test_yaffs_access_ENOTDIR(void)
 {
        int output=0;
index 99e502183c44e6333b1d7a15b0b777f000bb743f..5af067e6f87cd90c13f37c1586f05a3e47e52f04 100644 (file)
@@ -11,7 +11,7 @@
  * published by the Free Software Foundation.
  */
 
-/* generates a EBADF error by closing a handle twice */
+/* generates a EBADF error by closing a daft handle*/
 
 #include "test_yaffs_close_NULL.h"
 
@@ -23,7 +23,7 @@ int test_yaffs_close_NULL(void)
        int error_code = 0;
 
 
-       output = yaffs_close(NULL);
+       output = yaffs_close(999);
        if (output < 0){
                error_code = yaffs_get_error();
                if (abs(error_code) == EBADF){
index 2a0f63a62be856c45ac892b7ee4a33c7a175f5f9..bb55862f1c5bc205e16322f8b5b4f16036ce05f9 100644 (file)
@@ -22,7 +22,7 @@ int test_yaffs_dup(void)
                handle2 =yaffs_dup(handle);
                return handle2;
        }
-       
+       return handle;  
 }
 
 
index e1a035688f870686e7d615e3a71ef4a28d91f168..0b32620c47bca8bc9820bbab2946b67395c7a6a5 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "test_yaffs_fchmod.h"
+#include "test_yaffs_open.h"
 
 static int handle = -1;
 
index f96e0d2bd88df1ecf153057d25abddc054a5c3aa..4c7041302310b1ac43c454eb9e2cec8901b48191 100644 (file)
@@ -19,7 +19,7 @@ int test_yaffs_fchmod_NULL(void)
        int error = 0;
        int output = 0;
 
-       output = yaffs_fchmod(NULL,S_IREAD|S_IWRITE);
+       output = yaffs_fchmod(999, S_IREAD|S_IWRITE);
 
        if (output<0){
                error=yaffs_get_error();
index 1320ea4b31cc88c56be9159cfa345825f9e4adf5..67f711dc4ed5aa8a686ff7226e61b4d374c78924 100644 (file)
@@ -19,7 +19,7 @@ int test_yaffs_fdatasync_NULL(void)
 {
        int output = 0;
        int error_code = 0;
-       output = yaffs_fdatasync(NULL);
+       output = yaffs_fdatasync(999);
        if (output==-1){
                error_code=yaffs_get_error();
                if (abs(error_code)==EBADF){
index c7380a6e6a90f5d2125ab7d2e83fa4c511f62679..3fc060d232c7d0059870a7e43baba013f5c9ea8a 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "test_yaffs_flush.h"
+#include "test_yaffs_open.h"
 
 static int handle =-1;
 
index d384b98eef54d5c3388904fc3eb61d240d13e23a..08cc50133d5824cf57c817a8f42c91b5dba3fe74 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "test_yaffs_ftruncate_EBADF.h"
 
-static int handle = 0;
-
 int test_yaffs_ftruncate_EBADF(void)
 {
        int output = 0;
index 484447d544664e29e02ab11ed58419c0572218ba..7fe85142a344174f0c76ec22cc4cbbd2e7b0805f 100644 (file)
@@ -22,7 +22,7 @@ int test_yaffs_ftruncate_big_file(void)
        handle = test_yaffs_open();
 
        if (handle >= 0){
-               output = yaffs_ftruncate(handle,10000000000000000000000000000000);
+               output = yaffs_ftruncate(handle,YAFFS_TEST_LONG_VALUE);
                if (output < 0){
                        error_code = yaffs_get_error();
                        if (abs(error_code) == EINVAL){ /* yaffs uses the error EINVAL instead of big_file */
index 84ed1c39f0cad729ef2b98193f2774d2438d6af6..750d350787269a01464c0fed30ece8121d07b1f3 100644 (file)
@@ -35,9 +35,8 @@ int test_yaffs_lseek(void)
                }
        } else {
                print_message("error opening file\n", 2);
-               return -1;
        }
-       
+       return -1;
 }
 
 int test_yaffs_lseek_clean(void)
index a0f6add2d43bf87aa03f90f03137c350efc8c64c..37e281492ad7ad4f4e92efc957d495232ca24e92 100644 (file)
@@ -26,7 +26,7 @@ int test_yaffs_lseek_big_file(void)
                return -1;
        }
        
-       output = yaffs_lseek(handle, 100000000000000000000000000000000000000, SEEK_SET);
+       output = yaffs_lseek(handle, YAFFS_TEST_LONG_VALUE, SEEK_SET);
 
        if (output < 0){
                error_code = yaffs_get_error();
index 835d86aa4d3100aa6eda2ac45348e378736b40e2..effc77e3b81a59e2996ee9f126e99807d41ba190 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "test_yaffs_lstat.h"
-
+#include "test_yaffs_open.h"
 
 int test_yaffs_lstat(void)
 {
index 06d75819d09b6e868a91f55af8193d205d291948..fdd03f74406e70e5535a5e058340f86c9946c255 100644 (file)
@@ -19,7 +19,6 @@ static int handle = -1;
 
 int test_yaffs_open_ENAMETOOLONG(void)
 {
-       int output = 0;
        int x = 0;
        int error_code = 0;
        int file_name_length = 1000000;
index b5a8dd71b8aaed1be85ed82601be8ad208d411fd..9456e0841b61bbb00720fbe42d5e69657bf31c25 100644 (file)
@@ -17,7 +17,6 @@ static int handle = -1;
 
 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 );
index d076b5976cba477df734fae1adeeb5a6c9e00cfc..d898f8c409ad3e437bea619875b20e6f179b57ba 100644 (file)
@@ -17,7 +17,6 @@ static int handle = -1;
 
 int test_yaffs_open_NULL(void)
 {
-       int output = 0;
        int error_code = 0;
        /*printf("path %s\n",path); */
        handle = yaffs_open(NULL, O_TRUNC| O_RDWR,FILE_MODE );
index 75bf7048b5456da124041a02f110479a0a11c5ec..e00e86828e4eb3d581cba9d24854b0d6b84e7b4a 100644 (file)
@@ -14,6 +14,7 @@
 /*this is no longer relevent because it is not possiable to read -1 bytes*/
 
 #include "test_yaffs_read_EINVAL.h"
+#include "test_yaffs_write.h"
 
 static int handle = -1;
 static char *file_name = NULL;
index d8797ea7a51b1f0b41146707785ef0321aca1661..c00ef3bf1ac1b77701359fd8b32b8c7d593ee57e 100644 (file)
@@ -16,8 +16,6 @@
 int test_yaffs_remount_force_off_read_only_off(void)
 {
        int output = -1;
-       int error_code =0;
-
 
        output = yaffs_remount(YAFFS_MOUNT_POINT,0,0);
        if (output>=0){
index 276cb7caa43032b41a33a562f7966902900918eb..d7e11d52c64b01435e1d250a99363451974dbd79 100644 (file)
  */
 
 #include "test_yaffs_remount_force_on_read_only_off.h"
+#include "test_yaffs_open.h"
 
 int test_yaffs_remount_force_on_read_only_off(void)
 {
        int output = -1;
-       int error_code =0;
+
        output=test_yaffs_open();
        if (output<0) {
                print_message("failed to open file\n",2);
index 170081e70c6d46ed9f417d6c7e6fe1e7f75a83c4..a95ae25ccd75fb261f5b35a817edef2c8b75182c 100644 (file)
@@ -17,7 +17,6 @@
 int test_yaffs_rename(void)
 {
        int output=0;
-       int error_code =0;
 
        if (0 !=  yaffs_access(FILE_PATH,0)) {
                output = test_yaffs_open();
index f9821d2297f4bc819b9a639f00a494f1d7d72709..7c8aa76a50b2a22f27364b3689c8308976f7e265 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "test_yaffs_rename_EROFS.h"
-
+#include "test_yaffs_open.h"
 
 int test_yaffs_rename_EROFS(void)
 {
index 1a46919123fbd79fed67fc02ea2b02d3214cc27e..e11345d83ebbc8dcc681d0e2f177d5f6787e4a6c 100644 (file)
@@ -20,7 +20,6 @@ int  test_yaffs_rename_dir_over_dir(void)
 {
 
        int output=0;
-       int error_code =0;
 
        if (yaffs_mkdir(DIR_PATH,O_CREAT | O_RDWR)==-1){
                print_message("failed to create dir\n",1);
index 70652d6030c503a4b3760fb497138c8a3f009a84..14d76aba84b71f5a7c69b6351f1436d5a92a1eb6 100644 (file)
@@ -20,7 +20,6 @@ int  test_yaffs_rename_file_over_file(void)
 {
 
        int output=0;
-       int error_code =0;
 
        if (yaffs_close(yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE))==-1){
                print_message("failed to create file\n",1);
index 64317ce32b4c633b31881af228343ad7f868291a..9bcd6bc11f65ffe96d9e934ef02a01951d6bfac9 100644 (file)
@@ -20,7 +20,6 @@ int  test_yaffs_rename_full_dir_over_dir(void)
 {
 
        int output=0;
-       int error_code =0;
 
        if (yaffs_mkdir(DIR_PATH,O_CREAT | O_RDWR)==-1){
                print_message("failed to create dir\n",1);
index 738a56a74aad897a3068ce922488ee52f3ce40dc..482ad16f184d80a94bf7364a8eda9e77b122c0c1 100644 (file)
@@ -19,7 +19,6 @@ int test_yaffs_rmdir_EBUSY(void)
        int output=0;
        int error_code =0;
 
-
        output = yaffs_rmdir("/yaffs2/");
        if (output<0){ 
                error_code=yaffs_get_error();
@@ -38,9 +37,6 @@ int test_yaffs_rmdir_EBUSY(void)
 
 int test_yaffs_rmdir_EBUSY_clean(void)
 {
-       int output = 0;
-
        return 1;
-
 }
 
index f5d627184a6e156d8ca9597f00e331c717dd357c..8ac1f16619188b13b448a25c17fbc20068ffdf04 100644 (file)
@@ -37,7 +37,6 @@ int test_yaffs_rmdir_ENOENT(void)
 
 int test_yaffs_rmdir_ENOENT_clean(void)
 {
-       int output = 0;
        return 1;
 }
 
index 5b5cd31c8b0ac34e0ddd8c217ce83382df8b2226..5c6005fffad210925d721f240c98c2fe8f85c7e1 100644 (file)
 
 int test_yaffs_stat(void)
 {
-       char message[100];
-       int mode=0;
-       int size=0;
-       message[0]='\0';
        struct yaffs_stat stat;
+
        if (yaffs_close(yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE))==-1){
                print_message("failed to create file \n",1);
                return -1;
index eee9adaf67458e90e1bd7dcdd3022b74cd8022ed..b7600b39945d40aad863d513b880d5a9c3080f2b 100644 (file)
@@ -18,8 +18,6 @@ int test_yaffs_stat_ELOOP(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
 
        if (set_up_ELOOP()<0){
                print_message("failed to setup symlinks\n",2);
index c4d9f35f1f70added6e09f53145c2473fd4c347d..2763aee9e3648319b79557b5dd593deb94f3fe75 100644 (file)
@@ -18,8 +18,6 @@ int test_yaffs_stat_ELOOP_dir(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
 
        if (set_up_ELOOP()<0){
                print_message("failed to setup symlinks\n",2);
index 47ac8c6f846d28694e5c137fe5643ec050d40dae..a0d4598cc65214fe0fb037593b9a3b36338e15a6 100644 (file)
@@ -18,8 +18,6 @@ int test_yaffs_stat_ENAMETOOLONG(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
 
        int file_name_length=1000000;
        char file_name[file_name_length];
index 92938e21fe2ec7472463fe23f1399c38bf4484bc..21f7958f6d2b8728c34f71d7308a620d371eafc9 100644 (file)
@@ -18,8 +18,7 @@ int test_yaffs_stat_ENOENT(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
+
        output=yaffs_stat("/yaffs2/non-existing_file", &stat);
        if (output<0){ 
                error_code=yaffs_get_error();
index 334cc615f1cddce984c96cb1e5c895ee8c742235..c8facb26debb924465aea314f17a495a224037d5 100644 (file)
@@ -18,8 +18,7 @@ int test_yaffs_stat_ENOENT2(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
+
        output=yaffs_stat("/non-existing-dir/foo", &stat);;
        if (output<0){ 
                error_code=yaffs_get_error();
index ce228057f1592dfcbe26139c91ba026a0a4f7f30..5c3ba77cc102956245f224385e3407f37fd1230b 100644 (file)
@@ -18,8 +18,7 @@ int test_yaffs_stat_ENOTDIR(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
+
        if (yaffs_close(yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE))==-1){
                print_message("failed to create file\n",1);
                return -1;
index 3fb07cdbfef8bd3338601da28272aa09a607be9a..d8e558b5f6ef4f895e31a09729c54fadaeda0e84 100644 (file)
@@ -18,8 +18,7 @@ int test_yaffs_stat_NULL(void)
        int error_code=0;
        struct yaffs_stat stat;
        int output=0;
-       char text[100];
-       text[0] ='\0';
+
        output=yaffs_stat(NULL, &stat);
        if (output<0){ 
                error_code=yaffs_get_error();
index d6000d9ee11064066d920d5c5ef48d87e606f21f..50efc1a21b9ac29b7d66042d1585228a201eb8a8 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 #include "test_yaffs_truncate.h"
-static int handle= -1;
 
 int test_yaffs_truncate_EISDIR(void)
 {
index 4570db178437b19e0fad45f597a8e053f5a56ef0..c92a041aafb820ed6fe5380ed8e0e79bb0b4c184 100644 (file)
@@ -19,7 +19,7 @@ int test_yaffs_truncate_big_file(void)
        int error=0;
        int output=0;
 
-       output= yaffs_truncate("/yaffs2/foo",10000000000000000000000000000000000000000000 );
+       output= yaffs_truncate("/yaffs2/foo", YAFFS_TEST_LONG_VALUE);
        if (output<0){
                error=yaffs_get_error();
                if (abs(error)==EINVAL){        /*in yaffs EINVAL is used instead of big_file */
index 152ef3987bc6e5f85b5f26445b1ec62fe2ccb7c6..7b5fcb210615164abc935aff7d4d68adab6bc4c7 100644 (file)
@@ -12,6 +12,8 @@
  */
 
 #include "test_yaffs_open_EROFS.h"
+#include "test_yaffs_open.h"
+
 static int output =0;
 
 int test_yaffs_unlink_EROFS(void)
index e18c80388f2172c2d842d115079e9bc579a202ac..c7f76519a4e7f584d7cb6df22aad47acfb316c62 100644 (file)
  */
 
 #include "test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h"
+#include "test_yaffs_open.h"
 
 int test_yaffs_unmount2_with_handle_open_and_forced_mode_off(void)
 {
        int output = -1;
        int error_code =0;
+
        output=test_yaffs_open();
        if (output<0) {
                print_message("failed to open file\n",2);
index 5a20f88b9df3e55b60f5fae6d0a188fae58930c0..dc852077f8a39f67ec6459df0e31770df823c779 100644 (file)
  */
 
 #include "test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h"
+#include "test_yaffs_open.h"
 
 int test_yaffs_unmount2_with_handle_open_and_forced_mode_on(void)
 {
        int output = -1;
-       int error_code =0;
+
        output=test_yaffs_open();
        if (output<0) {
                print_message("failed to open file\n",2);
index 74283a24552ac339eac75b7cc601ab5efc7f12ea..7646b4672d743f04e26862c6ae954e91c1873bbc 100644 (file)
@@ -31,8 +31,8 @@ int test_yaffs_unmount_ENODEV(void)
                }
        } else if (output >=0){
                print_message("non existant directory opened.(which is a bad thing)\n",2);
-               return -1;
        }
+       return -1;
 }
 
 int test_yaffs_unmount_ENODEV_clean(void)
index 9c318dd49cba5e9342f397fd68a2eb20d8bfeee3..94ea6129ef3e9f251f09bbf9b6283c7909cb648b 100644 (file)
@@ -33,6 +33,8 @@ int test_yaffs_unmount_NULL(void)
                print_message("NULL path opened.(which is a bad thing)\n",2);
                return -1;
        }
+       
+       return -1;
 }
 
 int test_yaffs_unmount_NULL_clean(void)