X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Fquick_tests.h;h=12bfe49cb380d90eae15838b7bc2fa6c151929eb;hp=d05167bfed437c667f571f0e2444f847e7786b08;hb=fadebbf369cec12be83899d0570f05e4f99ca01a;hpb=22f31a41cbb9a08e67204279fb3b37e400309f1c diff --git a/direct/timothy_tests/quick_tests/quick_tests.h b/direct/timothy_tests/quick_tests/quick_tests.h index d05167b..12bfe49 100644 --- a/direct/timothy_tests/quick_tests/quick_tests.h +++ b/direct/timothy_tests/quick_tests/quick_tests.h @@ -20,10 +20,12 @@ #include "test_yaffs_mount.h" #include "test_yaffs_mount_ENODEV.h" #include "test_yaffs_mount_ENAMETOOLONG.h" -#include "test_yaffs_mount_ENOENT.h" #include "test_yaffs_mount_EBUSY.h" #include "test_yaffs_unmount.h" +#include "test_yaffs_unmount_ENODEV.h" +#include "test_yaffs_unmount_ENAMETOOLONG.h" +#include "test_yaffs_unmount_EBUSY.h" #include "test_yaffs_open.h" #include "test_yaffs_open_EISDIR.h" @@ -47,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" @@ -55,15 +57,20 @@ #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_big_file.h" + #include "test_yaffs_read.h" +#include "test_yaffs_read_EBADF.h" +#include "test_yaffs_read_EINVAL.h" #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" @@ -71,12 +78,77 @@ #include "test_yaffs_access_ENOENT.h" #include "test_yaffs_stat.h" +#include "test_yaffs_stat_ENOENT.h" +#include "test_yaffs_stat_ENOTDIR.h" + +#include "test_yaffs_fstat.h" +#include "test_yaffs_fstat_EBADF.h" + +#include "test_yaffs_chmod.h" +#include "test_yaffs_chmod_ENOENT.h" +#include "test_yaffs_chmod_ENOTDIR.h" +#include "test_yaffs_chmod_EINVAL.h" + + +#include "test_yaffs_fchmod.h" +#include "test_yaffs_fchmod_EBADF.h" +#include "test_yaffs_fchmod_EINVAL.h" + +#include "test_yaffs_fsync.h" +#include "test_yaffs_fsync_EBADF.h" + +#include "test_yaffs_fdatasync.h" +#include "test_yaffs_fdatasync_EBADF.h" + +#include "test_yaffs_mkdir.h" +#include "test_yaffs_mkdir_EEXIST.h" +#include "test_yaffs_mkdir_ENOTDIR.h" + +#include "test_yaffs_symlink.h" +#include "test_yaffs_symlink_ENOTDIR.h" +#include "test_yaffs_symlink_EEXIST.h" +#include "test_yaffs_symlink_ENOENT.h" + +#include "test_yaffs_mount2.h" +#include "test_yaffs_mount2_ENODEV.h" + +#include "test_yaffs_unmount2.h" +#include "test_yaffs_unmount2_ENODEV.h" +#include "test_yaffs_unmount2_EINVAL.h" +#include "test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h" +#include "test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h" + +#include "test_yaffs_sync.h" +#include "test_yaffs_sync_ENODEV.h" + +#include "test_yaffs_remount_force_off_read_only_off.h" +#include "test_yaffs_remount_force_on_read_only_off.h" +#include "test_yaffs_remount_ENODEV.h" +#include "test_yaffs_remount_EINVAL.h" + +#include "test_yaffs_freespace.h" +#include "test_yaffs_freespace_EINVAL.h" + +#include "test_yaffs_totalspace.h" +#include "test_yaffs_totalspace_EINVAL.h" + +#include "test_yaffs_inodecount.h" +#include "test_yaffs_inodecount_EINVAL.h" + +#include "test_yaffs_link.h" +#include "test_yaffs_link_ENOENT.h" +#include "test_yaffs_link_EEXIST.h" +#include "test_yaffs_link_ENOTDIR.h" +#include "test_yaffs_link_ENOTDIR2.h" + +#include "test_yaffs_rmdir.h" + #include "yaffsfs.h" #include "yaffs_error_converter.h" #include "lib.h" -#define EXIT_ON_ERROR 0 + typedef struct test { int (*p_function)(void); /*pointer to test function*/ @@ -89,11 +161,13 @@ typedef struct test { test_template test_list[]={ {test_yaffs_mount,test_yaffs_mount_clean,"test_yaffs_mount"}, {test_yaffs_mount_ENODEV,test_yaffs_mount_ENODEV_clean,"test_yaffs_mount_ENODEV"}, -// {test_yaffs_mount_ENAMETOOLONG,test_yaffs_mount_ENAMETOOLONG_clean,"test_yaffs_mount_ENAMETOOLONG"}, - {test_yaffs_mount_ENOENT,test_yaffs_mount_ENOENT_clean,"test_yaffs_mount_ENOENT"}, + {test_yaffs_mount_ENAMETOOLONG,test_yaffs_mount_ENAMETOOLONG_clean,"test_yaffs_mount_ENAMETOOLONG"}, {test_yaffs_mount_EBUSY,test_yaffs_mount_EBUSY_clean,"test_yaffs_mount_EBUSY"}, {test_yaffs_unmount,test_yaffs_unmount_clean,"test_yaffs_unmount"}, + {test_yaffs_unmount_ENODEV,test_yaffs_unmount_ENODEV_clean,"test_yaffs_unmount_ENODEV"}, + {test_yaffs_unmount_ENAMETOOLONG,test_yaffs_unmount_ENAMETOOLONG_clean,"test_yaffs_unmount_ENAMETOOLONG"}, + {test_yaffs_unmount_EBUSY,test_yaffs_unmount_EBUSY_clean,"test_yaffs_unmount_EBUSY"}, {test_yaffs_open,test_yaffs_open_clean,"test_yaffs_open"}, {test_yaffs_open_EISDIR,test_yaffs_open_EISDIR_clean,"test_yaffs_open_EISDIR"}, @@ -122,28 +196,97 @@ 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"}, //this test does not work because the large number becomes 0 when the file is compiled. {test_yaffs_write,test_yaffs_write_clean,"test_yaffs_write"}, - {test_yaffs_read,test_yaffs_read_clean,"test_yaffs_read"}, + {test_yaffs_write_EBADF,test_yaffs_write_EBADF_clean,"test_yaffs_write_EBADF"}, + {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"}, + {test_yaffs_read_EINVAL,test_yaffs_read_EINVAL_clean,"test_yaffs_read_EINVAL"}, {test_yaffs_stat,test_yaffs_stat_clean,"test_yaffs_stat"}, + {test_yaffs_stat_ENOENT,test_yaffs_stat_ENOENT_clean,"test_yaffs_stat_ENOENT"}, + {test_yaffs_stat_ENOTDIR,test_yaffs_stat_ENOTDIR_clean,"test_yaffs_stat_ENOTDIR"}, + + {test_yaffs_fstat,test_yaffs_fstat_clean,"test_yaffs_fstat"}, + {test_yaffs_fstat_EBADF,test_yaffs_fstat_EBADF_clean,"test_yaffs_fstat_EBADF"}, {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"}, //this test does not work because the large number becomes 0 when the file is compiled. + + {test_yaffs_chmod,test_yaffs_chmod_clean,"test_yaffs_chmod"}, + {test_yaffs_chmod_ENOENT,test_yaffs_chmod_ENOENT_clean,"test_yaffs_chmod_ENOENT"}, + {test_yaffs_chmod_ENOTDIR,test_yaffs_chmod_ENOTDIR_clean,"test_yaffs_chmod_ENOTDIR"}, + {test_yaffs_chmod_EINVAL,test_yaffs_chmod_EINVAL_clean,"test_yaffs_chmod_EINVAL"}, + + {test_yaffs_fchmod,test_yaffs_fchmod_clean,"test_yaffs_fchmod"}, + {test_yaffs_fchmod_EBADF,test_yaffs_fchmod_EBADF_clean,"test_yaffs_fchmod_EBADF"}, + {test_yaffs_fchmod_EINVAL,test_yaffs_fchmod_EINVAL_clean,"test_yaffs_fchmod_EINVAL"}, + + {test_yaffs_fsync,test_yaffs_fsync_clean,"test_yaffs_fsync"}, + {test_yaffs_fsync_EBADF,test_yaffs_fsync_EBADF_clean,"test_yaffs_fsync_EBADF"}, + + {test_yaffs_fdatasync,test_yaffs_fdatasync_clean,"test_yaffs_fdatasync"}, + {test_yaffs_fdatasync_EBADF,test_yaffs_fdatasync_EBADF_clean,"test_yaffs_fdatasync_EBADF"}, + + {test_yaffs_mkdir,test_yaffs_mkdir_clean,"test_yaffs_mkdir"}, + {test_yaffs_mkdir_EEXIST,test_yaffs_mkdir_EEXIST_clean,"test_yaffs_mkdir_EEXIST"}, + {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_EEXIST,test_yaffs_symlink_EEXIST_clean,"test_yaffs_symlink_EEXIST"}, + {test_yaffs_symlink_ENOENT,test_yaffs_symlink_ENOENT_clean,"test_yaffs_symlink_ENOENT"}, + + {test_yaffs_mount2,test_yaffs_mount2_clean,"test_yaffs_mount2"}, + {test_yaffs_mount2_ENODEV,test_yaffs_mount2_ENODEV_clean,"test_yaffs_mount2_ENODEV"}, + + + {test_yaffs_unmount2,test_yaffs_unmount2_clean,"test_yaffs_unmount2"}, + {test_yaffs_unmount2_ENODEV,test_yaffs_unmount2_ENODEV_clean,"test_yaffs_unmount2_ENODEV"}, + {test_yaffs_unmount2_EINVAL,test_yaffs_unmount2_EINVAL_clean,"test_yaffs_unmount2_EINVAL"}, {test_yaffs_unmount2_with_handle_open_and_forced_mode_on,test_yaffs_unmount2_with_handle_open_and_forced_mode_on_clean,"test_yaffs_unmount2_with_handle_open_and_forced_mode_on"}, +{test_yaffs_unmount2_with_handle_open_and_forced_mode_off,test_yaffs_unmount2_with_handle_open_and_forced_mode_off_clean,"test_yaffs_unmount2_with_handle_open_and_forced_mode_off"}, + + {test_yaffs_sync,test_yaffs_sync_clean,"test_yaffs_sync"}, + {test_yaffs_sync_ENODEV,test_yaffs_sync_ENODEV_clean,"test_yaffs_sync_ENODEV"}, + + + + {test_yaffs_remount_force_off_read_only_off,test_yaffs_remount_force_off_read_only_off_clean,"test_yaffs_remount_force_off_read_only_off"}, +{test_yaffs_remount_force_on_read_only_off,test_yaffs_remount_force_on_read_only_off_clean,"test_yaffs_remount_force_on_read_only_off"}, + {test_yaffs_remount_ENODEV,test_yaffs_remount_ENODEV_clean,"test_yaffs_remount_ENODEV"}, + {test_yaffs_remount_EINVAL,test_yaffs_remount_EINVAL_clean,"test_yaffs_remount_EINVAL"}, + + {test_yaffs_freespace,test_yaffs_freespace_clean,"test_yaffs_freespace"}, + {test_yaffs_freespace_EINVAL,test_yaffs_freespace_EINVAL_clean,"test_yaffs_freespace_EINVAL"}, + + {test_yaffs_totalspace,test_yaffs_totalspace_clean,"test_yaffs_totalspace"}, + {test_yaffs_totalspace_EINVAL,test_yaffs_totalspace_EINVAL_clean,"test_yaffs_totalspace_EINVAL"}, + + {test_yaffs_inodecount,test_yaffs_inodecount_clean,"test_yaffs_inodecount"}, + {test_yaffs_inodecount_EINVAL,test_yaffs_inodecount_EINVAL_clean,"test_yaffs_inodecount_EINVAL"}, + + {test_yaffs_link,test_yaffs_link_clean,"test_yaffs_link"}, + {test_yaffs_link_ENOENT,test_yaffs_link_ENOENT_clean,"test_yaffs_link_ENOENT"}, + {test_yaffs_link_EEXIST,test_yaffs_link_EEXIST_clean,"test_yaffs_link_EEXIST"}, + {test_yaffs_link_ENOTDIR,test_yaffs_link_ENOTDIR_clean,"test_yaffs_link_ENOTDIR"}, + {test_yaffs_link_ENOTDIR2,test_yaffs_link_ENOTDIR2_clean,"test_yaffs_link_ENOTDIR2"}, + + {test_yaffs_rmdir,test_yaffs_rmdir_clean,"test_yaffs_rmdir"} }; -void init_quick_tests(void); +void init_quick_tests(int argc, char *argv[]); void quit_quick_tests(int exit_code); void get_error(void); #endif