yaffs More tests.
authorTimothy Manning <tfhmanning@gmail.com>
Tue, 16 Nov 2010 03:12:31 +0000 (16:12 +1300)
committerTimothy Manning <tfhmanning@gmail.com>
Tue, 16 Nov 2010 03:12:31 +0000 (16:12 +1300)
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
15 files changed:
direct/timothy_tests/quick_tests/Makefile
direct/timothy_tests/quick_tests/README.txt
direct/timothy_tests/quick_tests/current_bugs.txt
direct/timothy_tests/quick_tests/quick_tests.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c [moved from direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EFBIG.c with 89% similarity]
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h [moved from direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.h with 76% similarity]
direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c [moved from direct/timothy_tests/quick_tests/test_yaffs_lseek_EFBIG.c with 90% similarity]
direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h [moved from direct/timothy_tests/quick_tests/test_yaffs_lseek_EFBIG.h with 78% similarity]
direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h [new file with mode: 0644]
direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c [moved from direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c with 87% similarity]
direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h [moved from direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EFBIG.h with 77% similarity]
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c [moved from direct/timothy_tests/quick_tests/test_yaffs_write_EFBIG.c with 94% similarity]
direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h [moved from direct/timothy_tests/quick_tests/test_yaffs_write_EFBIG.h with 80% similarity]

index 157abdea2fa275b066fcc3939ac49fb503e9f54f..00ef9f148c0f572bfc8859eb9d0ea3fb2ce86c55 100644 (file)
@@ -50,12 +50,12 @@ TESTFILES =         quick_tests.o lib.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_open_ENAMETOOLONG.o \
                test_yaffs_open_EINVAL.o test_yaffs_open_EINVAL2.o \
                test_yaffs_unlink.o  test_yaffs_unlink_EISDIR.o test_yaffs_unlink_ENOENT.o test_yaffs_unlink_ENAMETOOLONG.o test_yaffs_unlink_ENOTDIR.o\
-               test_yaffs_ftruncate.o test_yaffs_ftruncate_EBADF.o test_yaffs_ftruncate_EINVAL.o test_yaffs_ftruncate_EFBIG.o \
+               test_yaffs_ftruncate.o test_yaffs_ftruncate_EBADF.o test_yaffs_ftruncate_EINVAL.o test_yaffs_ftruncate_big_file.o \
                test_yaffs_truncate.o test_yaffs_truncate_ENOTDIR.o test_yaffs_truncate_EISDIR.o test_yaffs_truncate_ENOENT.o test_yaffs_truncate_EINVAL.o \
-               test_yaffs_truncate_EFBIG.o\
-               test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_EFBIG.o \
+               test_yaffs_truncate_big_file.o\
+               test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_big_file.o \
                test_yaffs_read.o test_yaffs_read_EBADF.o test_yaffs_read_EINVAL.o\
-               test_yaffs_lseek.o test_yaffs_lseek_EBADF.o test_yaffs_lseek_EINVAL.o test_yaffs_lseek_EFBIG.o \
+               test_yaffs_lseek.o test_yaffs_lseek_EBADF.o test_yaffs_lseek_EINVAL.o test_yaffs_lseek_big_file.o \
                test_yaffs_access.o test_yaffs_access_EINVAL.o test_yaffs_access_ENOTDIR.o test_yaffs_access_ENOENT.o\
                test_yaffs_stat.o test_yaffs_stat_ENOENT.o test_yaffs_stat_ENOTDIR.o \
                test_yaffs_fstat.o test_yaffs_fstat_EBADF.o \
@@ -66,7 +66,7 @@ TESTFILES =   quick_tests.o lib.o \
                test_yaffs_fdatasync.o test_yaffs_fdatasync_EBADF.o \
                test_yaffs_mkdir.o test_yaffs_mkdir_EEXIST.o test_yaffs_mkdir_ENOTDIR.o \
                test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EINVAL.o \
-               test_yaffs_symlink.o test_yaffs_symlink_ENOTDIR.o
+               test_yaffs_symlink.o test_yaffs_symlink_ENOTDIR.o test_yaffs_symlink_EEXIST.o
 
                  
 
index f98e4190aacffe5391f1f96c80105da82eacab1e..a1cb4b733211eeb5fe8bf8c5efb1ddccb817f46f 100644 (file)
@@ -32,12 +32,12 @@ Tests made
        test_yaffs_ftruncate
        test_yaffs_ftruncate_EBADF
        test_yaffs_ftruncate_ENIVAL
-       test_yaffs_ftruncate_EFBIG
+       test_yaffs_ftruncate_big_file
 
        test_yaffs_lseek
        test_yaffs_lseek_EBADF
        test_yaffs_lseek_EINVAL
-       test_yaffs_lseek_EFBIG
+       test_yaffs_lseek_big_file
 
        test_yaffs_open
        test_yaffs_open_EEXIST
@@ -61,6 +61,7 @@ Tests made
        test_yaffs_stat_ENOTDIR
 
        test_yaffs_symlink
+       test_yaffs_symlink_ENOTDIR
 
        test_yaffs_fstat
        test_yaffs_fstat_EBADF
@@ -70,7 +71,7 @@ Tests made
        test_yaffs_truncate_EISDIR
        test_yaffs_truncate_ENOENT
        test_yaffs_truncate_ENIVAL
-       test_yaffs_truncate_EFBIG
+       test_yaffs_truncate_big_file
 
        test_yaffs_unlink
        test_yaffs_unlink_EISDIR
@@ -120,7 +121,6 @@ Tests to add
        test_yaffs_symlink_ELOOP
        test_yaffs_symlink_ENAMETOOLONG
        test_yaffs_symlink_ENOENT       //if there is a slash on the end
-       test_yaffs_symlink_ENOTDIR
        test_yaffs_symlink_EROFS
 
        test_yaffs_mknod
@@ -231,21 +231,21 @@ Tests to add
 
         
 
-       test_yaffs_read_EFBIG
+       test_yaffs_read_big_file
        test what happens if you read off the end of the file?
 
        test_yaffs_pread
        test_yaffs_pread_EBADF
        test_yaffs_pread_EINVAL
-       test_yaffs_pread_EFBIG
+       test_yaffs_pread_big_file
 
-       test_yaffs_write_EFBIG
+       test_yaffs_write_big_file
        test_yaffs_write_EINVAL
        What happens when you run out of space?
        
        test_yaffs_write_EBADF
        test_yaffs_write
-       test_yaffs_pwrite_EFBIG
+       test_yaffs_pwrite_big_file
        test_yaffs_pwrite_EINVAL
 
        test_yaffs_unlink_EACCES
index 534df7c270cd1e55a3c27be7057a7109b96d7442..b46434fdbaadc985a63c71f8b83b09d0101e5b11 100644 (file)
@@ -46,15 +46,10 @@ Current BUGS
        Bug with unmounting a non-existing mountpoint. The function returns ENODEV 
        but should be returning EINVAL.
 
-       Unmount2 forcing the unmount needs to break the handles so they return EBADF.
-
-       Bug with reading -1 bytes of a file without an error (test is in test_yaffs_read_EINVAL).
-       It should return EINVAL. This is because it was reading an empty file. 
-       When text is added to the file a read of -1 bytes tries to read 4 gig of data 
 
        Bug when writing a file. The writing to the file causes the file size to exceed the size of yaffs file system memory.
        Output of test:
-               test_yaffs_write_EFBIG 
+               test_yaffs_write_big_file 
                AddrToChunk of offset -2147483648 gives chunk -1048576 start 0
                AddrToChunk of offset -2147481600 gives chunk -1048575 start 0
                AddrToChunk of offset -2147479552 gives chunk -1048574 start 0  
@@ -66,7 +61,7 @@ Current BUGS
                AddrToChunk of offset -2147467264 gives chunk -1048568 start 0
                AddrToChunk of offset -2147465216 gives chunk -1048567 start 0
                wrote a large amount of text to a file.(which is a bad thing)
-               test: test_yaffs_write_EFBIG failed
+               test: test_yaffs_write_big_file failed
                yaffs_error code 0
                error is : Unknown error code
 
index d157d112aed2b99123205b6dc31d6b69cf4dcd4f..f17a19cc6abb31aea9a47355303fb4b949819150 100644 (file)
@@ -49,7 +49,7 @@
 #include "test_yaffs_ftruncate.h"
 #include "test_yaffs_ftruncate_EBADF.h"
 #include "test_yaffs_ftruncate_EINVAL.h"
-#include "test_yaffs_ftruncate_EFBIG.h"
+#include "test_yaffs_ftruncate_big_file.h"
 
 
 #include "test_yaffs_truncate.h"
 #include "test_yaffs_truncate_EISDIR.h"
 #include "test_yaffs_truncate_ENOENT.h"
 #include "test_yaffs_truncate_EINVAL.h"
-#include "test_yaffs_truncate_EFBIG.h"
+#include "test_yaffs_truncate_big_file.h"
 
 #include "test_yaffs_write.h"
 #include "test_yaffs_write_EBADF.h"
-#include "test_yaffs_write_EFBIG.h"
+#include "test_yaffs_write_big_file.h"
 
 #include "test_yaffs_read.h"
 #include "test_yaffs_read_EBADF.h"
@@ -70,7 +70,7 @@
 #include "test_yaffs_lseek.h"
 #include "test_yaffs_lseek_EBADF.h"
 #include "test_yaffs_lseek_EINVAL.h"
-#include "test_yaffs_lseek_EFBIG.h"
+#include "test_yaffs_lseek_big_file.h"
 
 #include "test_yaffs_access.h"
 #include "test_yaffs_access_EINVAL.h"
 
 #include "test_yaffs_symlink.h"
 #include "test_yaffs_symlink_ENOTDIR.h"
+#include "test_yaffs_symlink_EEXIST.h"
 
 
 #include "yaffsfs.h"
@@ -161,11 +162,11 @@ test_template test_list[]={
        {test_yaffs_lseek,test_yaffs_lseek_clean,"test_yaffs_lseek"},
        {test_yaffs_lseek_EBADF,test_yaffs_lseek_EBADF_clean,"test_yaffs_lseek_EBADF"},
        {test_yaffs_lseek_EINVAL,test_yaffs_lseek_EINVAL_clean,"test_yaffs_lseek_EINVAL"},
-       {test_yaffs_lseek_EFBIG,test_yaffs_lseek_EFBIG_clean,"test_yaffs_lseek_EFBIG"},
+       {test_yaffs_lseek_big_file,test_yaffs_lseek_big_file_clean,"test_yaffs_lseek_big_file"},
 
        {test_yaffs_write,test_yaffs_write_clean,"test_yaffs_write"},
        {test_yaffs_write_EBADF,test_yaffs_write_EBADF_clean,"test_yaffs_write_EBADF"},
-//     {test_yaffs_write_EFBIG,test_yaffs_write_EFBIG_clean,"test_yaffs_write_EFBIG"},
+//     {test_yaffs_write_big_file,test_yaffs_write_big_file_clean,"test_yaffs_write_big_file"},
 
        {test_yaffs_read,test_yaffs_read_clean,"test_yaffs_read"},
        {test_yaffs_read_EBADF,test_yaffs_read_EBADF_clean,"test_yaffs_read_EBADF"},
@@ -181,14 +182,14 @@ test_template test_list[]={
        {test_yaffs_ftruncate,test_yaffs_ftruncate_clean,"test_yaffs_ftruncate"},
        {test_yaffs_ftruncate_EBADF,test_yaffs_ftruncate_EBADF_clean,"test_yaffs_ftruncate_EBADF"},
        {test_yaffs_ftruncate_EINVAL,test_yaffs_ftruncate_EINVAL_clean,"test_yaffs_ftruncate_EINVAL"},
-       {test_yaffs_ftruncate_EFBIG,test_yaffs_ftruncate_EFBIG_clean,"test_yaffs_ftruncate_EFBIG"},
+       {test_yaffs_ftruncate_big_file,test_yaffs_ftruncate_big_file_clean,"test_yaffs_ftruncate_big_file"},
 
        {test_yaffs_truncate,test_yaffs_truncate_clean,"test_yaffs_truncate"},
        {test_yaffs_truncate_ENOTDIR,test_yaffs_truncate_ENOTDIR_clean,"test_yaffs_truncate_ENOTDIR"},
        {test_yaffs_truncate_EISDIR,test_yaffs_truncate_EISDIR_clean,"test_yaffs_truncate_EISDIR"},
        {test_yaffs_truncate_EINVAL,test_yaffs_truncate_EINVAL_clean,"test_yaffs_truncate_EINVAL"},
        {test_yaffs_truncate_ENOENT,test_yaffs_truncate_ENOENT_clean,"test_yaffs_truncate_ENOENT"},
-       {test_yaffs_truncate_EFBIG,test_yaffs_truncate_EFBIG_clean,"test_yaffs_truncate_EFBIG"},
+       {test_yaffs_truncate_big_file,test_yaffs_truncate_big_file_clean,"test_yaffs_truncate_big_file"},
 
        {test_yaffs_chmod,test_yaffs_chmod_clean,"test_yaffs_chmod"},
        {test_yaffs_chmod_ENOENT,test_yaffs_chmod_ENOENT_clean,"test_yaffs_chmod_ENOENT"},
@@ -210,7 +211,8 @@ test_template test_list[]={
        {test_yaffs_mkdir_ENOTDIR,test_yaffs_mkdir_ENOTDIR_clean,"test_yaffs_mkdir_ENOTDIR"},
 
        {test_yaffs_symlink,test_yaffs_symlink_clean,"test_yaffs_symlink"},
-       {test_yaffs_symlink_ENOTDIR,test_yaffs_symlink_ENOTDIR_clean,"test_yaffs_symlink_ENOTDIR"}
+       {test_yaffs_symlink_ENOTDIR,test_yaffs_symlink_ENOTDIR_clean,"test_yaffs_symlink_ENOTDIR"},
+       {test_yaffs_symlink_EEXIST,test_yaffs_symlink_EEXIST_clean,"test_yaffs_symlink_EEXIST"}
 
 
 
similarity index 89%
rename from direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EFBIG.c
rename to direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c
index cff9ee06a9770bf0803b760300de24af51365c4c..dcb25fa831614a08955dc200d6a3756e70689765 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_ftruncate_EFBIG.h"
+#include "test_yaffs_ftruncate_big_file.h"
 
 static int handle = -1;
 
-int test_yaffs_ftruncate_EFBIG(void)
+int test_yaffs_ftruncate_big_file(void)
 {
        int output = 0;
        int error_code = 0;
@@ -25,7 +25,7 @@ int test_yaffs_ftruncate_EFBIG(void)
                output = yaffs_ftruncate(handle,10000000000000000000000000000000);
                if (output < 0){
                        error_code = yaffs_get_error();
-                       if (abs(error_code) == EINVAL){ /* yaffs uses the error EINVAL instead of EFBIG */
+                       if (abs(error_code) == EINVAL){ /* yaffs uses the error EINVAL instead of big_file */
                                return 1;
                        } else {
                                print_message("different error than expected\n", 2);
@@ -41,7 +41,7 @@ int test_yaffs_ftruncate_EFBIG(void)
        }
 }
 
-int test_yaffs_ftruncate_EFBIG_clean(void){
+int test_yaffs_ftruncate_big_file_clean(void){
        /* change file size back to orignal size */
        int output = 0;
        if (handle >= 0){
similarity index 76%
rename from direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.h
rename to direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h
index 5a459ad0e963fb0a6cc3602ea4910cc28510df70..7ae00386c46668e3c8ac67331b64f8593d622167 100644 (file)
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  */
 
-#ifndef __test_yaffs_truncate_EFBIG_h__
-#define __test_yaffs_truncate_EFBIG_h__
+#ifndef __test_yaffs_ftruncate_big_file_h__
+#define __test_yaffs_ftruncate_big_file_h__
 
 #include "lib.h"
 #include "yaffsfs.h"
 #include "test_yaffs_open.h"
 
-int test_yaffs_truncate_EFBIG(void);
-int test_yaffs_truncate_EFBIG_clean(void); 
+int test_yaffs_ftruncate_big_file(void);
+int test_yaffs_ftruncate_big_file_clean(void); 
 
 #endif
similarity index 90%
rename from direct/timothy_tests/quick_tests/test_yaffs_lseek_EFBIG.c
rename to direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c
index 6263c56b92e1f5767d6bcceade98ccad064a7c55..8e2c3e0ed308b317c79754baea502fd3e97f5965 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_lseek_EFBIG.h"
+#include "test_yaffs_lseek_big_file.h"
 
 static int handle = -1;
 
-int test_yaffs_lseek_EFBIG(void)
+int test_yaffs_lseek_big_file(void)
 {
        handle = test_yaffs_open();
        int error_code = 0;
@@ -42,7 +42,7 @@ int test_yaffs_lseek_EFBIG(void)
        }
 }
 
-int test_yaffs_lseek_EFBIG_clean(void)
+int test_yaffs_lseek_big_file_clean(void)
 {
        if (handle >= 0){
                return yaffs_close(handle);
similarity index 78%
rename from direct/timothy_tests/quick_tests/test_yaffs_lseek_EFBIG.h
rename to direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h
index e14350da7631919ab5de30edee34387ef1315f20..d14af528a7d5469fe3624388427fd29b28ae9c58 100644 (file)
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  */
 
-#ifndef __test_yaffs_lseek_EFBIG_h__
-#define __test_yaffs_lseek_EFBIG_h__
+#ifndef __test_yaffs_lseek_big_file_h__
+#define __test_yaffs_lseek_big_file_h__
 
 #include "lib.h"
 #include "yaffsfs.h"
 #include "test_yaffs_open.h"
 
-int test_yaffs_lseek_EFBIG(void);
-int test_yaffs_lseek_EFBIG_clean(void);
+int test_yaffs_lseek_big_file(void);
+int test_yaffs_lseek_big_file_clean(void);
 
 #endif
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c
new file mode 100644 (file)
index 0000000..b7768ac
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * YAFFS: Yet another FFS. A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2010 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Timothy Manning <timothy@yaffs.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "test_yaffs_symlink_EEXIST.h"
+
+static int output = 0;
+
+int test_yaffs_symlink_EEXIST(void)
+{
+       int error_code = 0;
+       if (0==yaffs_access(SYMLINK_PATH,0)){
+               output=yaffs_symlink(FILE_PATH,SYMLINK_PATH);
+               if (output>0){
+                       print_message("failed to create the first symlink\n",2);
+                       return -1;
+               }
+       }
+
+       output = yaffs_symlink(FILE_PATH,SYMLINK_PATH);
+       if (output<0){ 
+               error_code=yaffs_get_error();
+               if (abs(error_code)==EEXIST){
+                       return 1;
+               } else {
+                       print_message("returned error does not match the the expected error\n",2);
+                       return -1;
+               }
+       } else {
+               print_message("created a symlink over an existing symlink (which is a bad thing)\n",2);
+               return -1;
+       }       
+
+}
+
+int test_yaffs_symlink_EEXIST_clean(void)
+{
+       if (output >= 0){
+               return yaffs_unlink(SYMLINK_PATH);
+       } 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_symlink_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h
new file mode 100644 (file)
index 0000000..04359f7
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
+ *
+ * Copyright (C) 2002-2010 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Timothy Manning <timothy@yaffs.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __test_yaffs_symlink_EEXIST_h__
+#define __test_yaffs_symlink_EEXIST_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_symlink_EEXIST(void);
+int test_yaffs_symlink_EEXIST_clean(void);
+
+#endif
similarity index 87%
rename from direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c
rename to direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c
index 0d698654916f3fe3a1a108379d55e818bf781cbe..270bf49846774d3ca78c0410ad9be70dc659d805 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_truncate_EFBIG.h"
+#include "test_yaffs_truncate_big_file.h"
 static int handle = -1;
 
-int test_yaffs_truncate_EFBIG(void)
+int test_yaffs_truncate_big_file(void)
 {
        int error=0;
        int output=0;
@@ -23,7 +23,7 @@ int test_yaffs_truncate_EFBIG(void)
                output= yaffs_truncate("/yaffs2/foo",10000000000000000000000000000000000000000000 );
                if (output<0){
                        error=yaffs_get_error();
-                       if (abs(error)==EINVAL){        /*in yaffs EINVAL is used instead of EFBIG */
+                       if (abs(error)==EINVAL){        /*in yaffs EINVAL is used instead of big_file */
                                return 1;
                        } else {
                                print_message("received a different error than expected\n",2);
@@ -40,7 +40,7 @@ int test_yaffs_truncate_EFBIG(void)
        }
 }
 
-int test_yaffs_truncate_EFBIG_clean(void)
+int test_yaffs_truncate_big_file_clean(void)
 {
        return 1;
 }
similarity index 77%
rename from direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EFBIG.h
rename to direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h
index c00b5fa161c1376bdf17d212e969bde124efae5b..654673fa35975e29c7329e9d75deda30cea06e87 100644 (file)
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  */
 
-#ifndef __test_yaffs_ftruncate_EFBIG_h__
-#define __test_yaffs_ftruncate_EFBIG_h__
+#ifndef __test_yaffs_truncate_big_file_h__
+#define __test_yaffs_truncate_big_file_h__
 
 #include "lib.h"
 #include "yaffsfs.h"
 #include "test_yaffs_open.h"
 
-int test_yaffs_ftruncate_EFBIG(void);
-int test_yaffs_ftruncate_EFBIG_clean(void); 
+int test_yaffs_truncate_big_file(void);
+int test_yaffs_truncate_big_file_clean(void); 
 
 #endif
index d675d01b692acf541813c227e5640c0e1538850c..0515ab1556ed54458ed1366026a4ef601a1af760 100644 (file)
@@ -32,7 +32,7 @@ int test_yaffs_unlink_ENAMETOOLONG(void)
        output=yaffs_unlink(file_name);
        if (output==-1){
                error_code=yaffs_get_error();
-               if (abs(error_code)== EISDIR){
+               if (abs(error_code)== ENAMETOOLONG){
                        return 1;
                } else {
                        print_message("different error than expected\n",2);
similarity index 94%
rename from direct/timothy_tests/quick_tests/test_yaffs_write_EFBIG.c
rename to direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c
index bfc591ea6b09c0eb0632bd3bcd191d31950cc667..6d5033151374f497ef430b931683e5eac53a0d39 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include "test_yaffs_write_EFBIG.h"
+#include "test_yaffs_write_big_file.h"
 
 static int handle=0;
 static char *file_name = NULL;
-int test_yaffs_write_EFBIG(void)
+int test_yaffs_write_big_file(void)
 {
        int output=0;
        int error_code=0;
@@ -69,7 +69,7 @@ int test_yaffs_write_EFBIG(void)
        
 }
 
-int test_yaffs_write_EFBIG_clean(void)
+int test_yaffs_write_big_file_clean(void)
 {
        int output=1;
        if(file_name){
similarity index 80%
rename from direct/timothy_tests/quick_tests/test_yaffs_write_EFBIG.h
rename to direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h
index cb2a9b2a514bd298c1b1a52229d5eff1510d7d2e..1596e449ae066bbe9325f8492a5bf2c1d92d2550 100644 (file)
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  */
 
-#ifndef __test_yaffs_write_EFBIG_h__
-#define __test_yaffs_write_EFBIG_h__
+#ifndef __test_yaffs_write_big_file_h__
+#define __test_yaffs_write_big_file_h__
 #include "lib.h"
 #include "yaffsfs.h"
 #include "test_yaffs_open.h"
 #include "test_yaffs_write.h"
 #include "test_yaffs_truncate.h"
 
-int test_yaffs_write_EFBIG(void);
-int test_yaffs_write_EFBIG_clean(void);
+int test_yaffs_write_big_file(void);
+int test_yaffs_write_big_file_clean(void);
 #endif