From 2d0acac2786382b29762a6042119c41ba3f2f92f Mon Sep 17 00:00:00 2001 From: Timothy Manning Date: Tue, 30 Nov 2010 09:23:31 +1300 Subject: [PATCH] yaffs More tests added to direct/timothy_tests/quick_tests Signed-off-by: Timothy Manning --- direct/timothy_tests/quick_tests/Makefile | 37 +++++----- direct/timothy_tests/quick_tests/README.txt | 39 +---------- .../timothy_tests/quick_tests/quick_tests.h | 52 +++++++++++++- .../test_yaffs_access_ENAMETOOLONG.c | 48 +++++++++++++ .../test_yaffs_access_ENAMETOOLONG.h | 22 ++++++ .../quick_tests/test_yaffs_access_NULL.c | 43 ++++++++++++ .../quick_tests/test_yaffs_access_NULL.h | 22 ++++++ .../test_yaffs_chmod_ENAMETOOLONG.c | 49 +++++++++++++ .../test_yaffs_chmod_ENAMETOOLONG.h | 26 +++++++ .../quick_tests/test_yaffs_chmod_NULL.c | 41 +++++++++++ .../quick_tests/test_yaffs_chmod_NULL.h | 26 +++++++ .../quick_tests/test_yaffs_close_NULL.c | 53 ++++++++++++++ .../quick_tests/test_yaffs_close_NULL.h | 24 +++++++ .../quick_tests/test_yaffs_fchmod_NULL.c | 43 ++++++++++++ .../quick_tests/test_yaffs_fchmod_NULL.h | 25 +++++++ .../quick_tests/test_yaffs_fdatasync_NULL.c | 42 +++++++++++ .../quick_tests/test_yaffs_fdatasync_NULL.h | 26 +++++++ .../quick_tests/test_yaffs_flush_NULL.c | 43 ++++++++++++ .../quick_tests/test_yaffs_flush_NULL.h | 26 +++++++ .../test_yaffs_freespace_ENAMETOOLONG.c | 51 ++++++++++++++ .../test_yaffs_freespace_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_inodecount_ENAMETOOLONG.c | 51 ++++++++++++++ .../test_yaffs_inodecount_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_link_ENAMETOOLONG.c | 64 +++++++++++++++++ .../test_yaffs_link_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_link_ENAMETOOLONG2.c | 64 +++++++++++++++++ .../test_yaffs_link_ENAMETOOLONG2.h | 25 +++++++ .../test_yaffs_lstat_ENAMETOOLONG.c | 50 ++++++++++++++ .../test_yaffs_lstat_ENAMETOOLONG.h | 26 +++++++ .../test_yaffs_mkdir_ENAMETOOLONG.c | 54 +++++++++++++++ .../test_yaffs_mkdir_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_remount_ENAMETOOLONG.c | 58 ++++++++++++++++ .../test_yaffs_remount_ENAMETOOLONG.h | 26 +++++++ .../test_yaffs_rename_ENAMETOOLONG.c | 54 +++++++++++++++ .../test_yaffs_rename_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_rename_ENAMETOOLONG2.c | 54 +++++++++++++++ .../test_yaffs_rename_ENAMETOOLONG2.h | 25 +++++++ .../test_yaffs_rmdir_ENAMETOOLONG.c | 69 +++++++++++++++++++ .../test_yaffs_rmdir_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_stat_ENAMETOOLONG.c | 51 ++++++++++++++ .../test_yaffs_stat_ENAMETOOLONG.h | 26 +++++++ .../test_yaffs_symlink_ENAMETOOLONG.c | 56 +++++++++++++++ .../test_yaffs_symlink_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_sync_ENAMETOOLONG.c | 55 +++++++++++++++ .../test_yaffs_sync_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_totalspace_ENAMETOOLONG.c | 50 ++++++++++++++ .../test_yaffs_totalspace_ENAMETOOLONG.h | 25 +++++++ .../test_yaffs_truncate_ENAMETOOLONG.c | 49 +++++++++++++ .../test_yaffs_truncate_ENAMETOOLONG.h | 23 +++++++ 49 files changed, 1835 insertions(+), 58 deletions(-) create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c create mode 100644 direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h diff --git a/direct/timothy_tests/quick_tests/Makefile b/direct/timothy_tests/quick_tests/Makefile index 1d8a025..fe507d9 100644 --- a/direct/timothy_tests/quick_tests/Makefile +++ b/direct/timothy_tests/quick_tests/Makefile @@ -57,46 +57,49 @@ TESTFILES = quick_tests.o lib.o \ test_yaffs_ftruncate_EROFS.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_big_file.o test_yaffs_truncate_ENOENT2.o test_yaffs_truncate_ELOOP.o \ - test_yaffs_truncate_ELOOP_dir.o test_yaffs_truncate_EROFS.o \ + test_yaffs_truncate_ELOOP_dir.o test_yaffs_truncate_EROFS.o test_yaffs_truncate_ENAMETOOLONG.o \ test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_big_file.o test_yaffs_write_EROFS.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_big_file.o \ test_yaffs_access.o test_yaffs_access_EINVAL.o test_yaffs_access_ENOTDIR.o test_yaffs_access_ENOENT.o \ test_yaffs_access_ENOENT2.o test_yaffs_access_ELOOP_dir.o test_yaffs_access_ELOOP.o test_yaffs_access_EROFS.o \ - test_yaffs_access_EACCES.o \ + test_yaffs_access_EACCES.o test_yaffs_access_ENAMETOOLONG.o test_yaffs_access_NULL.o \ test_yaffs_stat.o test_yaffs_stat_ENOENT.o test_yaffs_stat_ENOTDIR.o test_yaffs_stat_ENOENT2.o test_yaffs_stat_ELOOP.o \ - test_yaffs_stat_ELOOP_dir.o\ + test_yaffs_stat_ELOOP_dir.o test_yaffs_stat_ENAMETOOLONG.o \ test_yaffs_fstat.o test_yaffs_fstat_EBADF.o \ - test_yaffs_close_EBADF.o\ + test_yaffs_close_EBADF.o test_yaffs_close_NULL.o \ test_yaffs_chmod.o test_yaffs_chmod_ENOENT.o test_yaffs_chmod_ENOTDIR.o test_yaffs_chmod_EINVAL.o \ test_yaffs_chmod_ENOENT2.o test_yaffs_chmod_ELOOP_dir.o test_yaffs_chmod_ELOOP.o test_yaffs_chmod_EROFS.o \ + test_yaffs_chmod_ENAMETOOLONG.o test_yaffs_chmod_NULL.o \ test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EROFS.o test_yaffs_fchmod_EINVAL.o\ test_yaffs_fsync.o test_yaffs_fsync_EBADF.o test_yaffs_fsync_EROFS.o \ - test_yaffs_fdatasync.o test_yaffs_fdatasync_EBADF.o test_yaffs_fdatasync_EROFS.o\ + test_yaffs_fdatasync.o test_yaffs_fdatasync_EBADF.o test_yaffs_fdatasync_EROFS.o test_yaffs_fdatasync_NULL.o \ test_yaffs_mkdir.o test_yaffs_mkdir_EEXIST.o test_yaffs_mkdir_ENOTDIR.o test_yaffs_mkdir_ENOENT.o \ - test_yaffs_mkdir_ELOOP_dir.o test_yaffs_mkdir_EROFS.o \ - test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EINVAL.o \ + test_yaffs_mkdir_ELOOP_dir.o test_yaffs_mkdir_EROFS.o test_yaffs_mkdir_ENAMETOOLONG.o \ + test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EINVAL.o test_yaffs_fchmod_NULL.o \ test_yaffs_symlink.o test_yaffs_symlink_ENOTDIR.o test_yaffs_symlink_EEXIST.o test_yaffs_symlink_ENOENT.o \ - test_yaffs_symlink_ENOENT2.o test_yaffs_symlink_ELOOP_dir.o test_yaffs_symlink_EROFS.o \ + test_yaffs_symlink_ENOENT2.o test_yaffs_symlink_ELOOP_dir.o test_yaffs_symlink_EROFS.o test_yaffs_symlink_ENAMETOOLONG.o\ test_yaffs_mount2.o test_yaffs_mount2_ENODEV.o \ test_yaffs_unmount2.o test_yaffs_unmount2_ENODEV.o test_yaffs_unmount2_EINVAL.o \ test_yaffs_unmount2_with_handle_open_and_forced_mode_on.o test_yaffs_unmount2_with_handle_open_and_forced_mode_off.o\ - test_yaffs_sync.o test_yaffs_sync_ENODEV.o test_yaffs_sync_EROFS.o \ + test_yaffs_sync.o test_yaffs_sync_ENODEV.o test_yaffs_sync_EROFS.o test_yaffs_sync_ENAMETOOLONG.o \ test_yaffs_remount_force_off_read_only_off.o test_yaffs_remount_force_on_read_only_off.o test_yaffs_remount_ENODEV.o \ - test_yaffs_remount_EINVAL.o \ - test_yaffs_freespace.o test_yaffs_freespace_EINVAL.o \ - test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o \ - test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o \ + test_yaffs_remount_EINVAL.o test_yaffs_remount_ENAMETOOLONG.o\ + test_yaffs_freespace.o test_yaffs_freespace_EINVAL.o test_yaffs_freespace_ENAMETOOLONG.o \ + test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o test_yaffs_totalspace_ENAMETOOLONG.o \ + test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o test_yaffs_inodecount_ENAMETOOLONG.o \ test_yaffs_link.o test_yaffs_link_ENOENT.o test_yaffs_link_EEXIST.o test_yaffs_link_ENOTDIR.o \ test_yaffs_link_ENOTDIR2.o test_yaffs_link_ENOENT2.o test_yaffs_link_ENOENT3.o test_yaffs_link_ENOENT3.o \ - test_yaffs_link_ENOENT4.o test_yaffs_link_ELOOP_dir.o test_yaffs_link_EROFS.o \ + test_yaffs_link_ENOENT4.o test_yaffs_link_ELOOP_dir.o test_yaffs_link_EROFS.o test_yaffs_link_ENAMETOOLONG.o \ + test_yaffs_link_ENAMETOOLONG2.o \ test_yaffs_rmdir.o test_yaffs_rmdir_EBUSY.o test_yaffs_rmdir_EINVAL.o test_yaffs_rmdir_ENOENT.o \ - test_yaffs_rmdir_ENOTDIR.o test_yaffs_rmdir_ELOOP_dir.o test_yaffs_rmdir_EROFS.o \ + test_yaffs_rmdir_ENOTDIR.o test_yaffs_rmdir_ELOOP_dir.o test_yaffs_rmdir_EROFS.o test_yaffs_rmdir_ENAMETOOLONG.o \ test_yaffs_rename.o test_yaffs_rename_ENOENT.o test_yaffs_rename_ENOTDIR.o test_yaffs_rename_EINVAL.o \ test_yaffs_rename_dir.o test_yaffs_rename_dir_ENOENT.o test_yaffs_rename_dir_ENOENT2.o test_yaffs_rename_dir_to_file.o \ test_yaffs_rename_file_to_dir.o test_yaffs_rename_EEXISTS.o test_yaffs_rename_ELOOP_dir.o test_yaffs_rename_EROFS.o \ - test_yaffs_lstat.o test_yaffs_lstat_ENOENT.o test_yaffs_lstat_ENOTDIR.o \ - test_yaffs_flush.o test_yaffs_flush_EBADF.o test_yaffs_flush_EROFS.o + test_yaffs_rename_ENAMETOOLONG.o test_yaffs_rename_ENAMETOOLONG2.o \ + test_yaffs_lstat.o test_yaffs_lstat_ENOENT.o test_yaffs_lstat_ENOTDIR.o test_yaffs_lstat_ENAMETOOLONG.o \ + test_yaffs_flush.o test_yaffs_flush_EBADF.o test_yaffs_flush_EROFS.o test_yaffs_flush_NULL.o diff --git a/direct/timothy_tests/quick_tests/README.txt b/direct/timothy_tests/quick_tests/README.txt index 39fa4ca..d16c9c7 100644 --- a/direct/timothy_tests/quick_tests/README.txt +++ b/direct/timothy_tests/quick_tests/README.txt @@ -202,23 +202,16 @@ Tests to add test_yaffs_lstat_ENAMETOOLONG - test_yaffs_readlink test_yaffs_readlink_ENOENT test_yaffs_readlink_ENOTDIR test_yaffs_readlink_ELOOP test_yaffs_readlink_ENAMETOOLONG - - test_yaffs_mkdir_ENAMETOOLONG - - - test_yaffs_symlink_ENAMETOOLONG - test_yaffs_mount2_ENAMETOOLONG test_yaffs_mount2_with read only set @@ -239,40 +232,20 @@ Tests to add test_yaffs_closedir - - test_yaffs_link_ENAMETOOLONG test_yaffs_link_EPERM - - - test_yaffs_rmdir_ENOTEMPTY - - - - - test_yaffs_rename_EMLINK test_yaffs_rename_EEXISTS or EPERM - test_yaffs_dup test_yaffs_dup_EBADF - - test_yaffs_fchmod_ELOOP - - - test_yaffs_open_ENOSPC - test_yaffs_open_ELOOP - test yaffs_open_running_out_of_handles error - - - + test yaffs_open_running_out_of_handles error test_yaffs_stat_ENAMETOOLONG @@ -293,21 +266,11 @@ Tests to add test_yaffs_pwrite_big_file test_yaffs_pwrite_EINVAL - - test_yaffs_unlink_ENOMEM - - test_yaffs_stat_ELOOP - - test_yaffs_access_ENAMETOOLONG test_yaffs_access_ENOENT_generated_with_a_dangling_symbloic_link - - - - test_yaffs_truncate_ENAMETOOLONG Add a truncate function for truncating a file size to -1. diff --git a/direct/timothy_tests/quick_tests/quick_tests.h b/direct/timothy_tests/quick_tests/quick_tests.h index 2705479..05b8503 100644 --- a/direct/timothy_tests/quick_tests/quick_tests.h +++ b/direct/timothy_tests/quick_tests/quick_tests.h @@ -41,7 +41,7 @@ #include "test_yaffs_open_EACCES.h" #include "test_yaffs_close_EBADF.h" - +#include "test_yaffs_close_NULL.h" #include "test_yaffs_unlink.h" #include "test_yaffs_unlink_EISDIR.h" @@ -70,6 +70,7 @@ #include "test_yaffs_truncate_ELOOP.h" #include "test_yaffs_truncate_ELOOP_dir.h" #include "test_yaffs_truncate_EROFS.h" +#include "test_yaffs_truncate_ENAMETOOLONG.h" #include "test_yaffs_write.h" #include "test_yaffs_write_EBADF.h" @@ -94,6 +95,8 @@ #include "test_yaffs_access_ELOOP.h" #include "test_yaffs_access_EROFS.h" #include "test_yaffs_access_EACCES.h" +#include "test_yaffs_access_ENAMETOOLONG.h" +#include "test_yaffs_access_NULL.h" #include "test_yaffs_stat.h" #include "test_yaffs_stat_ENOENT.h" @@ -101,6 +104,7 @@ #include "test_yaffs_stat_ENOENT2.h" #include "test_yaffs_stat_ELOOP.h" #include "test_yaffs_stat_ELOOP_dir.h" +#include "test_yaffs_stat_ENAMETOOLONG.h" #include "test_yaffs_fstat.h" #include "test_yaffs_fstat_EBADF.h" @@ -114,11 +118,14 @@ #include "test_yaffs_chmod_ELOOP_dir.h" #include "test_yaffs_chmod_ELOOP.h" #include "test_yaffs_chmod_EROFS.h" +#include "test_yaffs_chmod_ENAMETOOLONG.h" +#include "test_yaffs_chmod_NULL.h" #include "test_yaffs_fchmod.h" #include "test_yaffs_fchmod_EBADF.h" #include "test_yaffs_fchmod_EINVAL.h" #include "test_yaffs_fchmod_EROFS.h" +#include "test_yaffs_fchmod_NULL.h" #include "test_yaffs_fsync.h" #include "test_yaffs_fsync_EBADF.h" @@ -127,6 +134,7 @@ #include "test_yaffs_fdatasync.h" #include "test_yaffs_fdatasync_EBADF.h" #include "test_yaffs_fdatasync_EROFS.h" +#include "test_yaffs_fdatasync_NULL.h" #include "test_yaffs_mkdir.h" #include "test_yaffs_mkdir_EEXIST.h" @@ -134,7 +142,7 @@ #include "test_yaffs_mkdir_ENOENT.h" #include "test_yaffs_mkdir_ELOOP_dir.h" #include "test_yaffs_mkdir_EROFS.h" - +#include "test_yaffs_mkdir_ENAMETOOLONG.h" #include "test_yaffs_symlink.h" #include "test_yaffs_symlink_ENOTDIR.h" @@ -143,6 +151,7 @@ #include "test_yaffs_symlink_ENOENT2.h" #include "test_yaffs_symlink_ELOOP_dir.h" #include "test_yaffs_symlink_EROFS.h" +#include "test_yaffs_symlink_ENAMETOOLONG.h" #include "test_yaffs_mount2.h" #include "test_yaffs_mount2_ENODEV.h" @@ -156,20 +165,26 @@ #include "test_yaffs_sync.h" #include "test_yaffs_sync_ENODEV.h" #include "test_yaffs_sync_EROFS.h" +#include "test_yaffs_sync_ENAMETOOLONG.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_remount_ENAMETOOLONG.h" + #include "test_yaffs_freespace.h" #include "test_yaffs_freespace_EINVAL.h" +#include "test_yaffs_freespace_ENAMETOOLONG.h" #include "test_yaffs_totalspace.h" #include "test_yaffs_totalspace_EINVAL.h" +#include "test_yaffs_totalspace_ENAMETOOLONG.h" #include "test_yaffs_inodecount.h" #include "test_yaffs_inodecount_EINVAL.h" +#include "test_yaffs_inodecount_ENAMETOOLONG.h" #include "test_yaffs_link.h" #include "test_yaffs_link_ENOENT.h" @@ -181,6 +196,8 @@ #include "test_yaffs_link_ENOENT4.h" #include "test_yaffs_link_ELOOP_dir.h" #include "test_yaffs_link_EROFS.h" +#include "test_yaffs_link_ENAMETOOLONG.h" +#include "test_yaffs_link_ENAMETOOLONG2.h" #include "test_yaffs_rmdir.h" #include "test_yaffs_rmdir_EBUSY.h" @@ -189,6 +206,7 @@ #include "test_yaffs_rmdir_ENOTDIR.h" #include "test_yaffs_rmdir_ELOOP_dir.h" #include "test_yaffs_rmdir_EROFS.h" +#include "test_yaffs_rmdir_ENAMETOOLONG.h" #include "test_yaffs_rename.h" #include "test_yaffs_rename_ENOENT.h" @@ -202,14 +220,18 @@ #include "test_yaffs_rename_EEXISTS.h" #include "test_yaffs_rename_ELOOP_dir.h" #include "test_yaffs_rename_EROFS.h" +#include "test_yaffs_rename_ENAMETOOLONG.h" +#include "test_yaffs_rename_ENAMETOOLONG2.h" #include "test_yaffs_lstat.h" #include "test_yaffs_lstat_ENOENT.h" #include "test_yaffs_lstat_ENOTDIR.h" +#include "test_yaffs_lstat_ENAMETOOLONG.h" #include "test_yaffs_flush.h" #include "test_yaffs_flush_EBADF.h" #include "test_yaffs_flush_EROFS.h" +#include "test_yaffs_flush_NULL.h" #include "yaffsfs.h" #include "yaffs_error_converter.h" @@ -251,6 +273,7 @@ test_template test_list[]={ {test_yaffs_open_EACCES,test_yaffs_open_EACCES_clean,"test_yaffs_open_EACCES"}, {test_yaffs_close_EBADF,test_yaffs_close_EBADF_clean,"test_yaffs_close_EBADF"}, + {test_yaffs_close_NULL,test_yaffs_close_NULL_clean,"test_yaffs_close_NULL"}, {test_yaffs_access,test_yaffs_access_clean,"test_yaffs_access"}, {test_yaffs_access_EINVAL,test_yaffs_access_EINVAL_clean,"test_yaffs_access_EINVAL"}, @@ -261,6 +284,8 @@ test_template test_list[]={ {test_yaffs_access_ELOOP,test_yaffs_access_ELOOP_clean,"test_yaffs_access_ELOOP"}, {test_yaffs_access_EROFS,test_yaffs_access_EROFS_clean,"test_yaffs_access_EROFS"}, {test_yaffs_access_EACCES,test_yaffs_access_EACCES_clean,"test_yaffs_access_EACCES"}, + {test_yaffs_access_ENAMETOOLONG,test_yaffs_access_ENAMETOOLONG_clean,"test_yaffs_access_ENAMETOOLONG"}, + {test_yaffs_access_NULL,test_yaffs_access_NULL_clean,"test_yaffs_access_NULL"}, {test_yaffs_unlink, test_yaffs_unlink_clean,"test_yaffs_unlink"}, {test_yaffs_unlink_EISDIR,test_yaffs_unlink_EISDIR_clean,"test_yaffs_unlink_EISDIR"}, @@ -293,6 +318,7 @@ test_template test_list[]={ {test_yaffs_stat_ENOENT2,test_yaffs_stat_ENOENT2_clean,"test_yaffs_stat_ENOENT2"}, {test_yaffs_stat_ELOOP,test_yaffs_stat_ELOOP_clean,"test_yaffs_stat_ELOOP"}, {test_yaffs_truncate_ELOOP_dir,test_yaffs_truncate_ELOOP_dir_clean,"test_yaffs_truncate_ELOOP_dir"}, + {test_yaffs_stat_ENAMETOOLONG,test_yaffs_stat_ENAMETOOLONG_clean,"test_yaffs_stat_ENAMETOOLONG"}, {test_yaffs_fstat,test_yaffs_fstat_clean,"test_yaffs_fstat"}, {test_yaffs_fstat_EBADF,test_yaffs_fstat_EBADF_clean,"test_yaffs_fstat_EBADF"}, @@ -311,6 +337,7 @@ test_template test_list[]={ {test_yaffs_truncate_ENOENT2,test_yaffs_truncate_ENOENT2_clean,"test_yaffs_truncate_ENOENT2"}, {test_yaffs_truncate_ELOOP,test_yaffs_truncate_ELOOP_clean,"test_yaffs_truncate_ELOOP"}, {test_yaffs_truncate_EROFS,test_yaffs_truncate_EROFS_clean,"test_yaffs_truncate_EROFS"}, + {test_yaffs_truncate_ENAMETOOLONG,test_yaffs_truncate_ENAMETOOLONG_clean,"test_yaffs_truncate_ENAMETOOLONG"}, // {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"}, @@ -320,11 +347,14 @@ test_template test_list[]={ {test_yaffs_chmod_ELOOP_dir,test_yaffs_chmod_ELOOP_dir_clean,"test_yaffs_chmod_ELOOP_dir"}, {test_yaffs_chmod_ELOOP,test_yaffs_chmod_ELOOP_clean,"test_yaffs_chmod_ELOOP"}, {test_yaffs_chmod_EROFS,test_yaffs_chmod_EROFS_clean,"test_yaffs_chmod_EROFS"}, + {test_yaffs_chmod_ENAMETOOLONG,test_yaffs_chmod_ENAMETOOLONG_clean,"test_yaffs_chmod_ENAMETOOLONG"}, + {test_yaffs_chmod_NULL,test_yaffs_chmod_NULL_clean,"test_yaffs_chmod_NULL"}, {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_fchmod_EROFS,test_yaffs_fchmod_EROFS_clean,"test_yaffs_fchmod_EROFS"}, + {test_yaffs_fchmod_NULL,test_yaffs_fchmod_NULL_clean,"test_yaffs_fchmod_NULL"}, {test_yaffs_fsync,test_yaffs_fsync_clean,"test_yaffs_fsync"}, {test_yaffs_fsync_EBADF,test_yaffs_fsync_EBADF_clean,"test_yaffs_fsync_EBADF"}, @@ -333,6 +363,7 @@ test_template test_list[]={ {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_fdatasync_EROFS,test_yaffs_fdatasync_EROFS_clean,"test_yaffs_fdatasync_EROFS"}, + {test_yaffs_fdatasync_NULL,test_yaffs_fdatasync_NULL_clean,"test_yaffs_fdatasync_NULL"}, {test_yaffs_mkdir,test_yaffs_mkdir_clean,"test_yaffs_mkdir"}, {test_yaffs_mkdir_EEXIST,test_yaffs_mkdir_EEXIST_clean,"test_yaffs_mkdir_EEXIST"}, @@ -340,6 +371,7 @@ test_template test_list[]={ {test_yaffs_mkdir_ENOENT,test_yaffs_mkdir_ENOENT_clean,"test_yaffs_mkdir_ENOENT"}, {test_yaffs_mkdir_ELOOP_dir,test_yaffs_mkdir_ELOOP_dir_clean,"test_yaffs_mkdir_ELOOP_dir"}, {test_yaffs_mkdir_EROFS,test_yaffs_mkdir_EROFS_clean,"test_yaffs_mkdir_EROFS"}, + {test_yaffs_mkdir_ENAMETOOLONG,test_yaffs_mkdir_ENAMETOOLONG_clean,"test_yaffs_mkdir_ENAMETOOLONG"}, {test_yaffs_symlink,test_yaffs_symlink_clean,"test_yaffs_symlink"}, @@ -349,6 +381,7 @@ test_template test_list[]={ {test_yaffs_symlink_ENOENT2,test_yaffs_symlink_ENOENT2_clean,"test_yaffs_symlink_ENOENT2"}, {test_yaffs_symlink_ELOOP_dir,test_yaffs_symlink_ELOOP_dir_clean,"test_yaffs_symlink_ELOOP_dir"}, {test_yaffs_symlink_EROFS,test_yaffs_symlink_EROFS_clean,"test_yaffs_symlink_EROFS"}, + {test_yaffs_symlink_ENAMETOOLONG,test_yaffs_symlink_ENAMETOOLONG_clean,"test_yaffs_symlink_ENAMETOOLONG"}, {test_yaffs_mount2,test_yaffs_mount2_clean,"test_yaffs_mount2"}, {test_yaffs_mount2_ENODEV,test_yaffs_mount2_ENODEV_clean,"test_yaffs_mount2_ENODEV"}, @@ -363,21 +396,26 @@ test_template test_list[]={ {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_sync_EROFS,test_yaffs_sync_EROFS_clean,"test_yaffs_sync_EROFS"}, + {test_yaffs_sync_ENAMETOOLONG,test_yaffs_sync_ENAMETOOLONG_clean,"test_yaffs_sync_ENAMETOOLONG"}, {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_remount_ENAMETOOLONG,test_yaffs_remount_ENAMETOOLONG_clean,"test_yaffs_remount_ENAMETOOLONG"}, {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_freespace_ENAMETOOLONG,test_yaffs_freespace_ENAMETOOLONG_clean,"test_yaffs_freespace_ENAMETOOLONG"}, {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_totalspace_ENAMETOOLONG,test_yaffs_totalspace_ENAMETOOLONG_clean,"test_yaffs_totalspace_ENAMETOOLONG"}, {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_inodecount_ENAMETOOLONG,test_yaffs_inodecount_ENAMETOOLONG_clean,"test_yaffs_inodecount_ENAMETOOLONG"}, {test_yaffs_link,test_yaffs_link_clean,"test_yaffs_link"}, {test_yaffs_link_ENOENT,test_yaffs_link_ENOENT_clean,"test_yaffs_link_ENOENT"}, @@ -389,6 +427,8 @@ test_template test_list[]={ {test_yaffs_link_ENOENT4,test_yaffs_link_ENOENT4_clean,"test_yaffs_link_ENOENT4"}, {test_yaffs_link_ELOOP_dir,test_yaffs_link_ELOOP_dir_clean,"test_yaffs_link_ELOOP_dir"}, {test_yaffs_link_EROFS,test_yaffs_link_EROFS_clean,"test_yaffs_link_EROFS"}, + {test_yaffs_link_ENAMETOOLONG,test_yaffs_link_ENAMETOOLONG_clean,"test_yaffs_link_ENAMETOOLONG"}, + {test_yaffs_link_ENAMETOOLONG2,test_yaffs_link_ENAMETOOLONG2_clean,"test_yaffs_link_ENAMETOOLONG2"}, {test_yaffs_rmdir,test_yaffs_rmdir_clean,"test_yaffs_rmdir"}, {test_yaffs_rmdir_EBUSY,test_yaffs_rmdir_EBUSY_clean,"test_yaffs_rmdir_EBUSY"}, @@ -397,6 +437,7 @@ test_template test_list[]={ {test_yaffs_rmdir_ENOTDIR,test_yaffs_rmdir_ENOTDIR_clean,"test_yaffs_rmdir_ENOTDIR"}, {test_yaffs_rmdir_ELOOP_dir,test_yaffs_rmdir_ELOOP_dir_clean,"test_yaffs_rmdir_ELOOP_dir"}, {test_yaffs_rmdir_EROFS,test_yaffs_rmdir_EROFS_clean,"test_yaffs_rmdir_EROFS"}, + {test_yaffs_rmdir_ENAMETOOLONG,test_yaffs_rmdir_ENAMETOOLONG_clean,"test_yaffs_rmdir_ENAMETOOLONG"}, {test_yaffs_stat_ELOOP_dir,test_yaffs_stat_ELOOP_dir_clean,"test_yaffs_stat_ELOOP_dir"}, @@ -412,14 +453,19 @@ test_template test_list[]={ {test_yaffs_rename_EEXISTS,test_yaffs_rename_EEXISTS_clean,"test_yaffs_rename_EEXISTS"}, {test_yaffs_rename_ELOOP_dir,test_yaffs_rename_ELOOP_dir_clean,"test_yaffs_rename_ELOOP_dir"}, {test_yaffs_rename_EROFS,test_yaffs_rename_EROFS_clean,"test_yaffs_rename_EROFS"}, + {test_yaffs_rename_ENAMETOOLONG,test_yaffs_rename_ENAMETOOLONG_clean,"test_yaffs_rename_ENAMETOOLONG"}, + {test_yaffs_rename_ENAMETOOLONG2,test_yaffs_rename_ENAMETOOLONG2_clean,"test_yaffs_rename_ENAMETOOLONG2"}, {test_yaffs_lstat,test_yaffs_lstat_clean,"test_yaffs_lstat"}, {test_yaffs_lstat_ENOENT,test_yaffs_lstat_ENOENT_clean,"test_yaffs_lstat_ENOENT"}, {test_yaffs_lstat_ENOTDIR,test_yaffs_lstat_ENOTDIR_clean,"test_yaffs_lstat_ENOTDIR"}, + {test_yaffs_lstat_ENAMETOOLONG,test_yaffs_lstat_ENAMETOOLONG_clean,"test_yaffs_lstat_ENAMETOOLONG"}, {test_yaffs_flush,test_yaffs_flush_clean,"test_yaffs_flush"}, {test_yaffs_flush_EBADF,test_yaffs_flush_EBADF_clean,"test_yaffs_flush_EBADF"}, - {test_yaffs_flush_EROFS,test_yaffs_flush_EROFS_clean,"test_yaffs_flush_EROFS"} + {test_yaffs_flush_EROFS,test_yaffs_flush_EROFS_clean,"test_yaffs_flush_EROFS"}, + {test_yaffs_flush_NULL,test_yaffs_flush_NULL_clean,"test_yaffs_flush_NULL"} + }; diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c new file mode 100644 index 0000000..a233250 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c @@ -0,0 +1,48 @@ +/* + * 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 + * + * 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_access_ENAMETOOLONG.h" + +int test_yaffs_access_ENAMETOOLONG(void) +{ + int output=0; + int error=0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_access_ENAMETOOLONG_h__ +#define __test_yaffs_access_ENAMETOOLONG_h__ +#include "lib.h" +#include "yaffsfs.h" +int test_yaffs_access_ENAMETOOLONG(void); +int test_yaffs_access_ENAMETOOLONG_clean(void); +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c new file mode 100644 index 0000000..d9b2310 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c @@ -0,0 +1,43 @@ +/* + * 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 + * + * 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_access_NULL.h" + +int test_yaffs_access_NULL(void) +{ + int output=0; + int error=0; + if (set_up_ELOOP()<0){ + print_message("failed to setup symlinks\n",2); + return -1; + } + output= yaffs_access(NULL,0); + if (output<0){ + error=yaffs_get_error(); + if ( abs(error)== ELOOP){ + return 1; + } else { + print_message("error does not match expected error\n",2); + return -1; + } + } else{ + print_message("accessed an existing file with bad mode (which is a bad thing\n",2); + + return -1; + } +} + +int test_yaffs_access_NULL_clean(void) +{ + return 1; +} diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h new file mode 100644 index 0000000..f9e2bf8 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h @@ -0,0 +1,22 @@ +/* + * 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 + * + * 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_access_NULL_h__ +#define __test_yaffs_access_NULL_h__ +#include "lib.h" +#include "yaffsfs.h" +int test_yaffs_access_NULL(void); +int test_yaffs_access_NULL_clean(void); +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c new file mode 100644 index 0000000..9c7faa3 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c @@ -0,0 +1,49 @@ +/* + * 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 + * + * 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_chmod_ENAMETOOLONG.h" + +int test_yaffs_chmod_ENAMETOOLONG(void) +{ + int error=0; + int output; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_chmod_ENAMETOOLONG_h__ +#define __test_yaffs_chmod_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_chmod.h" + +int test_yaffs_chmod_ENAMETOOLONG(void); +int test_yaffs_chmod_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c new file mode 100644 index 0000000..b0c1793 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c @@ -0,0 +1,41 @@ +/* + * 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 + * + * 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_chmod_NULL.h" + +int test_yaffs_chmod_NULL(void) +{ + int error=0; + int output; + + output = yaffs_chmod(NULL,11111); + + if (output<0){ + error=yaffs_get_error(); + if (abs(error)==EINVAL){ + return 1; + } else { + print_message("different error than expected\n",2); + return -1; + } + } else { + print_message("chmoded the file (which is a bad thing)\n",2); + return -1; + } + +} + +int test_yaffs_chmod_NULL_clean(void) +{ + return test_yaffs_chmod(); +} diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h new file mode 100644 index 0000000..ec589e8 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h @@ -0,0 +1,26 @@ +/* + * 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 + * + * 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_chmod_NULL_h__ +#define __test_yaffs_chmod_NULL_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_chmod.h" + +int test_yaffs_chmod_NULL(void); +int test_yaffs_chmod_NULL_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c new file mode 100644 index 0000000..096f783 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c @@ -0,0 +1,53 @@ +/* + * 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 + * + * 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. + */ + +/* generates a EBADF error by closing a handle twice */ + +#include "test_yaffs_close_NULL.h" + +static int handle = -1; + +int test_yaffs_close_NULL(void) +{ + int output = 0; + int error_code = 0; + + + output = yaffs_close(NULL); + if (output < 0){ + error_code = yaffs_get_error(); + if (abs(error_code) == EBADF){ + handle =-1; + return 1; + } else { + print_message("different error than expected\n",2); + return -1; + } + } else { + print_message("closed a NULL handle. (which is a bad thing)\n", 2); + return -1; + } + +} + + +int test_yaffs_close_NULL_clean(void) +{ + if (handle >= 0){ + printf("handle %d\n",handle); + return yaffs_close(handle); + } else { + return 1; + } +} + diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h new file mode 100644 index 0000000..901d2d2 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h @@ -0,0 +1,24 @@ +/* + * 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 + * + * 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_close_NULL_h__ +#define __test_yaffs_close_NULL_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_close_NULL(void); +int test_yaffs_close_NULL_clean(void); +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c new file mode 100644 index 0000000..2bc5005 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c @@ -0,0 +1,43 @@ +/* + * 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 + * + * 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_fchmod_NULL.h" + + +int test_yaffs_fchmod_NULL(void) +{ + int error = 0; + int output = 0; + + output = yaffs_fchmod(NULL,S_IREAD|S_IWRITE); + + if (output<0){ + error=yaffs_get_error(); + if (abs(error)==EBADF){ + return 1; + } else { + print_message("different error than expected\n",2); + return -1; + } + } else { + print_message("chmoded an non-existing file (which is a bad thing)\n",2); + return -1; + } + + +} + +int test_yaffs_fchmod_NULL_clean(void) +{ + return 1; +} diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h new file mode 100644 index 0000000..0197876 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h @@ -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 + * + * 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_fchmod_NULL_h__ +#define __test_yaffs_fchmod_NULL_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_fchmod_NULL(void); +int test_yaffs_fchmod_NULL_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c new file mode 100644 index 0000000..801d7a9 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c @@ -0,0 +1,42 @@ +/* + * 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 + * + * 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_fdatasync_NULL.h" + + + +int test_yaffs_fdatasync_NULL(void) +{ + int output = 0; + int error_code = 0; + output = yaffs_fdatasync(NULL); + if (output==-1){ + error_code=yaffs_get_error(); + if (abs(error_code)==EBADF){ + return 1; + } else { + print_message("different error than expected\n",2); + return -1; + } + } else { + print_message("non existant file synced.(which is a bad thing)\n",2); + return -1; + } +} + + +int test_yaffs_fdatasync_NULL_clean(void) +{ + return 1; +} + diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h new file mode 100644 index 0000000..5c2b8df --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h @@ -0,0 +1,26 @@ +/* + * 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 + * + * 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_fdatasync_NULL_h__ +#define __test_yaffs_fdatasync_NULL_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_open.h" + +int test_yaffs_fdatasync_NULL(void); +int test_yaffs_fdatasync_NULL_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.c new file mode 100644 index 0000000..d6bd625 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.c @@ -0,0 +1,43 @@ +/* + * 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 + * + * 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_flush_NULL.h" + + + +int test_yaffs_flush_NULL(void) +{ + int output=0; + int error =0; + output = yaffs_flush(NULL); + if (output<0){ + error=yaffs_get_error(); + if (abs(error)==EBADF){ + return 1; + } else { + print_message("different error than expected\n",2); + return -1; + } + } else { + print_message("flushed a bad handle (which is a bad thing)\n",2); + return -1; + } + +} + + +int test_yaffs_flush_NULL_clean(void) +{ + return 1; +} + diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.h new file mode 100644 index 0000000..deb98ff --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_NULL.h @@ -0,0 +1,26 @@ +/* + * 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 + * + * 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_flush_NULL_h__ +#define __test_yaffs_flush_NULL_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_close.h" + +int test_yaffs_flush_NULL(void); +int test_yaffs_flush_NULL_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c new file mode 100644 index 0000000..40f2d35 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c @@ -0,0 +1,51 @@ +/* + * 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 + * + * 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_freespace_ENAMETOOLONG.h" + + + +int test_yaffs_freespace_ENAMETOOLONG(void) +{ + int output=0; + int error=0; + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_freespace_ENAMETOOLONG_h__ +#define __test_yaffs_freespace_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_freespace_ENAMETOOLONG(void); +int test_yaffs_freespace_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c new file mode 100644 index 0000000..432c6ce --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c @@ -0,0 +1,51 @@ +/* + * 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 + * + * 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_inodecount_ENAMETOOLONG.h" + + + +int test_yaffs_inodecount_ENAMETOOLONG(void) +{ + int output=0; + int error=0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_inodecount_ENAMETOOLONG_h__ +#define __test_yaffs_inodecount_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_inodecount_ENAMETOOLONG(void); +int test_yaffs_inodecount_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c new file mode 100644 index 0000000..ed3ddb5 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c @@ -0,0 +1,64 @@ +/* + * 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 + * + * 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_link_ENAMETOOLONG.h" + + + +int test_yaffs_link_ENAMETOOLONG(void) +{ + int output=0; + int error =0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_link_ENAMETOOLONG_h__ +#define __test_yaffs_link_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_link_ENAMETOOLONG(void); +int test_yaffs_link_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c new file mode 100644 index 0000000..b7d917d --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c @@ -0,0 +1,64 @@ +/* + * 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 + * + * 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_link_ENAMETOOLONG2.h" + + + +int test_yaffs_link_ENAMETOOLONG2(void) +{ + int output=0; + int error =0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_link_ENAMETOOLONG2_h__ +#define __test_yaffs_link_ENAMETOOLONG2_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_link_ENAMETOOLONG2(void); +int test_yaffs_link_ENAMETOOLONG2_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c new file mode 100644 index 0000000..466890c --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c @@ -0,0 +1,50 @@ +/* + * 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 + * + * 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_lstat_ENAMETOOLONG.h" + + +int test_yaffs_lstat_ENAMETOOLONG(void) +{ + int output = -1; + int error_code = -1; + struct yaffs_stat stat; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_lstat_ENAMETOOLONG_h__ +#define __test_yaffs_lstat_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_open.h" + +int test_yaffs_lstat_ENAMETOOLONG(void); +int test_yaffs_lstat_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c new file mode 100644 index 0000000..dba259e --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c @@ -0,0 +1,54 @@ +/* + * 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 + * + * 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_mkdir_ENAMETOOLONG.h" + +static int output = -1; + +int test_yaffs_mkdir_ENAMETOOLONG(void) +{ + int error_code = 0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x= 0){ + return yaffs_rmdir(DIR_PATH); + } else { + return 1; + } +} + diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h new file mode 100644 index 0000000..5b8528c --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h @@ -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 + * + * 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_mkdir_ENAMETOOLONG_h__ +#define __test_yaffs_mkdir_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_mkdir_ENAMETOOLONG(void); +int test_yaffs_mkdir_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c new file mode 100644 index 0000000..6bde97c --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c @@ -0,0 +1,58 @@ +/* + * 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 + * + * 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_remount_ENAMETOOLONG.h" + +int test_yaffs_remount_ENAMETOOLONG(void) +{ + int output = -1; + int error_code =0; + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_remount_ENAMETOOLONG__ +#define __test_yaffs_remount_ENAMETOOLONG__ + +#include "yaffsfs.h" +#include "lib.h" +#include "test_yaffs_unmount.h" + +int test_yaffs_remount_ENAMETOOLONG(void); +int test_yaffs_remount_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c new file mode 100644 index 0000000..0c45302 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c @@ -0,0 +1,54 @@ +/* + * 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 + * + * 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_rename_ENAMETOOLONG.h" + + +int test_yaffs_rename_ENAMETOOLONG(void) +{ + int output=0; + int error_code =0; + + + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_rename_ENAMETOOLONG_h__ +#define __test_yaffs_rename_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_rename_ENAMETOOLONG(void); +int test_yaffs_rename_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c new file mode 100644 index 0000000..d3cfcc3 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c @@ -0,0 +1,54 @@ +/* + * 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 + * + * 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_rename_ENAMETOOLONG2.h" + + +int test_yaffs_rename_ENAMETOOLONG2(void) +{ + int output=0; + int error_code =0; + + + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_rename_ENAMETOOLONG2_h__ +#define __test_yaffs_rename_ENAMETOOLONG2_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_rename_ENAMETOOLONG2(void); +int test_yaffs_rename_ENAMETOOLONG2_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c new file mode 100644 index 0000000..a7942df --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c @@ -0,0 +1,69 @@ +/* + * 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 + * + * 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_rmdir_ENAMETOOLONG.h" + + +int test_yaffs_rmdir_ENAMETOOLONG(void) +{ + int output=0; + int error_code =0; + + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_rmdir_ENAMETOOLONG_h__ +#define __test_yaffs_rmdir_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_rmdir_ENAMETOOLONG(void); +int test_yaffs_rmdir_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c new file mode 100644 index 0000000..826a2d2 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c @@ -0,0 +1,51 @@ +/* + * 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 + * + * 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_stat_ENAMETOOLONG.h" + +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]; + int x=0; + for (x=0; x + * + * 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_stat_ENAMETOOLONG_h__ +#define __test_yaffs_stat_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_open.h" + +int test_yaffs_stat_ENAMETOOLONG(void); +int test_yaffs_stat_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c new file mode 100644 index 0000000..f4b0072 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c @@ -0,0 +1,56 @@ +/* + * 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 + * + * 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_ENAMETOOLONG.h" + +static int output = 0; + +int test_yaffs_symlink_ENAMETOOLONG(void) +{ + int error_code = 0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x= 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_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h new file mode 100644 index 0000000..4d05ab2 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h @@ -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 + * + * 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_ENAMETOOLONG_h__ +#define __test_yaffs_symlink_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_symlink_ENAMETOOLONG(void); +int test_yaffs_symlink_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c new file mode 100644 index 0000000..d899836 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c @@ -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 + * + * 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_sync_ENAMETOOLONG.h" + + +int test_yaffs_sync_ENAMETOOLONG(void) +{ + int error_code=-1; + int output=0; + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_sync_ENAMETOOLONG_h__ +#define __test_yaffs_sync_ENAMETOOLONG_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_sync_ENAMETOOLONG(void); +int test_yaffs_sync_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c new file mode 100644 index 0000000..c31f389 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c @@ -0,0 +1,50 @@ +/* + * 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 + * + * 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_totalspace_ENAMETOOLONG.h" + + + +int test_yaffs_totalspace_ENAMETOOLONG(void) +{ + int output=0; + int error=0; + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_ENAMETOOLONG_EINVAL_h__ +#define __test_yaffs_ENAMETOOLONG_EINVAL_h__ + +#include "lib.h" +#include "yaffsfs.h" + +int test_yaffs_totalspace_ENAMETOOLONG(void); +int test_yaffs_totalspace_ENAMETOOLONG_clean(void); + +#endif diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c new file mode 100644 index 0000000..cbd91da --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c @@ -0,0 +1,49 @@ +/* + * 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 + * + * 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_truncate_ENAMETOOLONG.h" + + + +int test_yaffs_truncate_ENAMETOOLONG(void) +{ + int error=0; + int output=0; + + int file_name_length=1000000; + char file_name[file_name_length]; + int x=0; + for (x=0; x + * + * 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_truncate_ENAMETOOLONG_h__ +#define __test_yaffs_truncate_ENAMETOOLONG_h__ +#include "lib.h" +#include "yaffsfs.h" +#include "test_yaffs_open.h" +int test_yaffs_truncate_ENAMETOOLONG(void); +int test_yaffs_truncate_ENAMETOOLONG_clean(void); +#endif -- 2.30.2