TESTFILES = quick_tests.o lib.o \
test_yaffs_mount.o test_yaffs_mount_ENODEV.o test_yaffs_mount_ENAMETOOLONG.o test_yaffs_mount_EBUSY.o \
+ test_yaffs_mount_NULL.o \
test_yaffs_unmount.o test_yaffs_unmount_ENODEV.o test_yaffs_unmount_ENAMETOOLONG.o test_yaffs_unmount_EBUSY.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_open_ELOOP.o \
- test_yaffs_open_ELOOP_dir.o test_yaffs_open_EROFS.o test_yaffs_open_EACCES.o \
+ test_yaffs_open_ELOOP_dir.o test_yaffs_open_EROFS.o test_yaffs_open_EACCES.o test_yaffs_open_NULL.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_unlink_ENOENT2.o test_yaffs_unlink_ELOOP_dir.o test_yaffs_unlink_EROFS.o \
+ test_yaffs_unlink_NULL.o \
test_yaffs_ftruncate.o test_yaffs_ftruncate_EBADF.o test_yaffs_ftruncate_EINVAL.o test_yaffs_ftruncate_big_file.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_ENAMETOOLONG.o \
+ test_yaffs_truncate_NULL.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_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_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_ENAMETOOLONG.o \
+ test_yaffs_stat_ELOOP_dir.o test_yaffs_stat_ENAMETOOLONG.o test_yaffs_stat_NULL.o \
test_yaffs_fstat.o test_yaffs_fstat_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_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_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_mkdir_ENAMETOOLONG.o \
+ test_yaffs_mkdir_ELOOP_dir.o test_yaffs_mkdir_EROFS.o test_yaffs_mkdir_ENAMETOOLONG.o test_yaffs_mkdir_NULL.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_ENAMETOOLONG.o\
+ test_yaffs_symlink_NULL.o test_yaffs_symlink_NULL2.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_ENAMETOOLONG.o \
+ test_yaffs_sync_NULL.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_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_remount_EINVAL.o test_yaffs_remount_ENAMETOOLONG.o test_yaffs_remount_NULL.o test_yaffs_unmount_NULL.o \
+ test_yaffs_freespace.o test_yaffs_freespace_EINVAL.o test_yaffs_freespace_ENAMETOOLONG.o test_yaffs_freespace_NULL.o \
+ test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o test_yaffs_totalspace_ENAMETOOLONG.o test_yaffs_totalspace_NULL.o\
+ test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o test_yaffs_inodecount_ENAMETOOLONG.o test_yaffs_inodecount_NULL.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_ENAMETOOLONG.o \
- test_yaffs_link_ENAMETOOLONG2.o \
+ test_yaffs_link_ENAMETOOLONG2.o test_yaffs_link_NULL.o test_yaffs_link_NULL2.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_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_rename_ENAMETOOLONG.o test_yaffs_rename_ENAMETOOLONG2.o \
+ test_yaffs_rename_ENAMETOOLONG.o test_yaffs_rename_ENAMETOOLONG2.o test_yaffs_rename_NULL.o test_yaffs_rename_NULL2.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
+ test_yaffs_lstat_NULL.o \
+ test_yaffs_flush.o test_yaffs_flush_EBADF.o test_yaffs_flush_EROFS.o
#include "test_yaffs_mount_ENODEV.h"
#include "test_yaffs_mount_ENAMETOOLONG.h"
#include "test_yaffs_mount_EBUSY.h"
+#include "test_yaffs_mount_NULL.h"
#include "test_yaffs_unmount.h"
#include "test_yaffs_unmount_ENODEV.h"
#include "test_yaffs_open_ELOOP_dir.h"
#include "test_yaffs_open_EROFS.h"
#include "test_yaffs_open_EACCES.h"
+#include "test_yaffs_open_NULL.h"
#include "test_yaffs_close_EBADF.h"
#include "test_yaffs_close_NULL.h"
#include "test_yaffs_unlink_ENOENT2.h"
#include "test_yaffs_unlink_ELOOP_dir.h"
#include "test_yaffs_unlink_EROFS.h"
+#include "test_yaffs_unlink_NULL.h"
#include "test_yaffs_ftruncate.h"
#include "test_yaffs_ftruncate_EBADF.h"
#include "test_yaffs_truncate_ELOOP_dir.h"
#include "test_yaffs_truncate_EROFS.h"
#include "test_yaffs_truncate_ENAMETOOLONG.h"
+#include "test_yaffs_truncate_NULL.h"
#include "test_yaffs_write.h"
#include "test_yaffs_write_EBADF.h"
#include "test_yaffs_stat_ELOOP.h"
#include "test_yaffs_stat_ELOOP_dir.h"
#include "test_yaffs_stat_ENAMETOOLONG.h"
+#include "test_yaffs_stat_NULL.h"
#include "test_yaffs_fstat.h"
#include "test_yaffs_fstat_EBADF.h"
#include "test_yaffs_mkdir_ELOOP_dir.h"
#include "test_yaffs_mkdir_EROFS.h"
#include "test_yaffs_mkdir_ENAMETOOLONG.h"
+#include "test_yaffs_mkdir_NULL.h"
#include "test_yaffs_symlink.h"
#include "test_yaffs_symlink_ENOTDIR.h"
#include "test_yaffs_symlink_ELOOP_dir.h"
#include "test_yaffs_symlink_EROFS.h"
#include "test_yaffs_symlink_ENAMETOOLONG.h"
+#include "test_yaffs_symlink_NULL.h"
+#include "test_yaffs_symlink_NULL2.h"
#include "test_yaffs_mount2.h"
#include "test_yaffs_mount2_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_unmount_NULL.h"
#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_sync_NULL.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_remount_NULL.h"
#include "test_yaffs_freespace.h"
#include "test_yaffs_freespace_EINVAL.h"
#include "test_yaffs_freespace_ENAMETOOLONG.h"
+#include "test_yaffs_freespace_NULL.h"
#include "test_yaffs_totalspace.h"
#include "test_yaffs_totalspace_EINVAL.h"
#include "test_yaffs_totalspace_ENAMETOOLONG.h"
+#include "test_yaffs_totalspace_NULL.h"
#include "test_yaffs_inodecount.h"
#include "test_yaffs_inodecount_EINVAL.h"
#include "test_yaffs_inodecount_ENAMETOOLONG.h"
+#include "test_yaffs_inodecount_NULL.h"
#include "test_yaffs_link.h"
#include "test_yaffs_link_ENOENT.h"
#include "test_yaffs_link_EROFS.h"
#include "test_yaffs_link_ENAMETOOLONG.h"
#include "test_yaffs_link_ENAMETOOLONG2.h"
+#include "test_yaffs_link_NULL.h"
+#include "test_yaffs_link_NULL2.h"
#include "test_yaffs_rmdir.h"
#include "test_yaffs_rmdir_EBUSY.h"
#include "test_yaffs_rename_EROFS.h"
#include "test_yaffs_rename_ENAMETOOLONG.h"
#include "test_yaffs_rename_ENAMETOOLONG2.h"
+#include "test_yaffs_rename_NULL.h"
+#include "test_yaffs_rename_NULL2.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_lstat_NULL.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"
{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_EBUSY,test_yaffs_mount_EBUSY_clean,"test_yaffs_mount_EBUSY"},
+ {test_yaffs_mount_NULL,test_yaffs_mount_NULL_clean,"test_yaffs_mount_NULL"},
{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_open_ELOOP_dir,test_yaffs_open_ELOOP_dir_clean,"test_yaffs_open_ELOOP_dir"},
{test_yaffs_open_EROFS,test_yaffs_open_EROFS_clean,"test_yaffs_open_EROFS"},
{test_yaffs_open_EACCES,test_yaffs_open_EACCES_clean,"test_yaffs_open_EACCES"},
-
+ {test_yaffs_open_NULL,test_yaffs_open_NULL_clean,"test_yaffs_open_NULL"},
+
+
{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_unlink_ENOENT2,test_yaffs_unlink_ENOENT2_clean,"test_yaffs_unlink_ENOENT2"},
{test_yaffs_unlink_ELOOP_dir,test_yaffs_unlink_ELOOP_dir_clean,"test_yaffs_unlink_ELOOP_dir"},
{test_yaffs_unlink_EROFS,test_yaffs_unlink_EROFS_clean,"test_yaffs_unlink_EROFS"},
-
+ {test_yaffs_unlink_NULL,test_yaffs_unlink_NULL_clean,"test_yaffs_unlink_NULL"},
{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_stat_ENOTDIR,test_yaffs_stat_ENOTDIR_clean,"test_yaffs_stat_ENOTDIR"},
{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_stat_NULL,test_yaffs_stat_NULL_clean,"test_yaffs_stat_NULL"},
{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_truncate_ENOENT,test_yaffs_truncate_ENOENT_clean,"test_yaffs_truncate_ENOENT"},
{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_ELOOP_dir,test_yaffs_truncate_ELOOP_dir_clean,"test_yaffs_truncate_ELOOP_dir"},
{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_NULL,test_yaffs_truncate_NULL_clean,"test_yaffs_truncate_NULL"},
// {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_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_mkdir_NULL,test_yaffs_mkdir_NULL_clean,"test_yaffs_mkdir_NULL"},
{test_yaffs_symlink,test_yaffs_symlink_clean,"test_yaffs_symlink"},
{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_symlink_NULL,test_yaffs_symlink_NULL_clean,"test_yaffs_symlink_NULL"},
+ {test_yaffs_symlink_NULL2,test_yaffs_symlink_NULL2_clean,"test_yaffs_symlink_NULL2"},
{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_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_unmount_NULL,test_yaffs_unmount_NULL_clean,"test_yaffs_unmount_NULL"},
{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_sync_NULL,test_yaffs_sync_NULL_clean,"test_yaffs_sync_NULL"},
{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_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_remount_NULL,test_yaffs_remount_NULL_clean,"test_yaffs_remount_NULL"},
{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_freespace_NULL,test_yaffs_freespace_NULL_clean,"test_yaffs_freespace_NULL"},
{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_totalspace_NULL,test_yaffs_totalspace_NULL_clean,"test_yaffs_totalspace_NULL"},
{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_inodecount_NULL,test_yaffs_inodecount_NULL_clean,"test_yaffs_inodecount_NULL"},
{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_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_link_NULL,test_yaffs_link_NULL_clean,"test_yaffs_link_NULL"},
+ {test_yaffs_link_NULL2,test_yaffs_link_NULL2_clean,"test_yaffs_link_NULL2"},
{test_yaffs_rmdir,test_yaffs_rmdir_clean,"test_yaffs_rmdir"},
{test_yaffs_rmdir_EBUSY,test_yaffs_rmdir_EBUSY_clean,"test_yaffs_rmdir_EBUSY"},
{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_rename_NULL,test_yaffs_rename_NULL_clean,"test_yaffs_rename_NULL"},
+ {test_yaffs_rename_NULL2,test_yaffs_rename_NULL2_clean,"test_yaffs_rename_NULL2"},
{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_lstat_NULL,test_yaffs_lstat_NULL_clean,"test_yaffs_lstat_NULL"},
{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_NULL,test_yaffs_flush_NULL_clean,"test_yaffs_flush_NULL"}
+
};
* published by the Free Software Foundation.
*/
-#include "test_yaffs_flush_NULL.h"
+#include "test_yaffs_freespace_NULL.h"
-int test_yaffs_flush_NULL(void)
+int test_yaffs_freespace_NULL(void)
{
int output=0;
- int error =0;
- output = yaffs_flush(NULL);
+ int error=0;
+ output = yaffs_freespace(NULL);
if (output<0){
error=yaffs_get_error();
- if (abs(error)==EBADF){
+ if (abs(error)==EFAULT){
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);
+ print_message("got the free space of a NULL mountpoint (which is a bad thing)\n",2);
return -1;
}
-
}
-int test_yaffs_flush_NULL_clean(void)
+int test_yaffs_freespace_NULL_clean(void)
{
return 1;
}
* 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__
+#ifndef __test_yaffs_freespace_NULL_h__
+#define __test_yaffs_freespace_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);
+int test_yaffs_freespace_NULL(void);
+int test_yaffs_freespace_NULL_clean(void);
#endif
--- /dev/null
+/*
+ * 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_inodecount_NULL.h"
+
+
+
+int test_yaffs_inodecount_NULL(void)
+{
+ int output=0;
+ int error=0;
+ output = yaffs_inodecount(NULL);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("got the inodecount of a non existing mountpoint (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_inodecount_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_inodecount_NULL_h__
+#define __test_yaffs_inodecount_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_inodecount_NULL(void);
+int test_yaffs_inodecount_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_link_NULL.h"
+
+
+
+int test_yaffs_link_NULL(void)
+{
+ int output=0;
+ int error =0;
+ output = yaffs_link(NULL,HARD_LINK_PATH);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("created a hard link to a non-existing-file (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_link_NULL_clean(void)
+{
+ int output=0;
+ int error =0;
+ output= yaffs_unlink(HARD_LINK_PATH);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==ENOENT){
+ //if the file does not exist then the error should be ENOENT.
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ return 1; /* the file failed to open so there is no need to close it */
+ }
+}
+
--- /dev/null
+/*
+ * 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_link_NULL_h__
+#define __test_yaffs_link_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_link_NULL(void);
+int test_yaffs_link_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_link_NULL2.h"
+
+
+
+int test_yaffs_link_NULL2(void)
+{
+ int output=0;
+ int error =0;
+ output = yaffs_link(FILE_PATH,NULL);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("created a hard link to a non-existing-file (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_link_NULL2_clean(void)
+{
+ int output=0;
+ int error =0;
+ output= yaffs_unlink(HARD_LINK_PATH);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==ENOENT){
+ //if the file does not exist then the error should be ENOENT.
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ return 1; /* the file failed to open so there is no need to close it */
+ }
+}
+
--- /dev/null
+/*
+ * 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_link_NULL2_h__
+#define __test_yaffs_link_NULL2_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_link_NULL2(void);
+int test_yaffs_link_NULL2_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_lstat_NULL.h"
+
+
+int test_yaffs_lstat_NULL(void)
+{
+ int output = -1;
+ int error_code = -1;
+ struct yaffs_stat stat;
+
+ output =yaffs_lstat(NULL,&stat);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n", 2);
+ return -1;
+ }
+ } else {
+ print_message("lstatted a non-existing file\n", 2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_lstat_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_lstat_NULL_h__
+#define __test_yaffs_lstat_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+
+int test_yaffs_lstat_NULL(void);
+int test_yaffs_lstat_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_mkdir_NULL.h"
+
+static int output = -1;
+
+int test_yaffs_mkdir_NULL(void)
+{
+ int error_code = 0;
+
+
+ output = yaffs_mkdir(NULL,O_CREAT | O_RDWR);
+ if (output < 0){
+ error_code = yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n", 2);
+ return -1;
+ }
+ } else {
+ print_message("created a new directory on top of an non-existing directory (which is a bad thing)\n", 2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_mkdir_NULL_clean(void)
+{
+ if (output >= 0){
+ return yaffs_rmdir(DIR_PATH);
+ } else {
+ return 1;
+ }
+}
+
--- /dev/null
+/*
+ * 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_mkdir_NULL_h__
+#define __test_yaffs_mkdir_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_mkdir_NULL(void);
+int test_yaffs_mkdir_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_mount_NULL.h"
+
+
+
+int test_yaffs_mount_NULL(void)
+{
+ int output=0;
+ int error_code=0;
+
+ output = yaffs_mount(NULL);
+ if (output<0){
+ error_code = yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("mounted a null mount point.(which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+int test_yaffs_mount_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_mount_NULL_h__
+#define __test_yaffs_mount_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_mount_NULL(void);
+int test_yaffs_mount_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_open_NULL.h"
+
+static int handle = -1;
+
+int test_yaffs_open_NULL(void)
+{
+ int output = 0;
+ int error_code = 0;
+ /*printf("path %s\n",path); */
+ handle = yaffs_open(NULL, O_TRUNC| O_RDWR,FILE_MODE );
+ if (handle == -1){
+ error_code = yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ }
+ else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("a null path was opened.(which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+int test_yaffs_open_NULL_clean(void)
+{
+ if (handle >=0){
+ return yaffs_close(handle);
+ }
+ else {
+ return 1; /* the file failed to open so there is no need to close it*/
+ }
+}
+
--- /dev/null
+/*
+ * 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_open_NULL_h__
+#define __test_yaffs_open_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_open_NULL(void);
+int test_yaffs_open_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_remount_NULL.h"
+
+int test_yaffs_remount_NULL(void)
+{
+ int output = -1;
+ int error_code =0;
+
+
+ output = yaffs_remount(NULL,0,0);
+ if (output<0){
+ error_code = yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else {
+ print_message("remounted a non-existing-dir\n",2);
+ return -1;
+ }
+}
+
+int test_yaffs_remount_NULL_clean(void)
+{
+ int output=0;
+ int error_code =0;
+ output= yaffs_mount(YAFFS_MOUNT_POINT);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code) == EBUSY){
+ return 1;
+ } else {
+ return -1;
+ }
+ }
+ return 1;
+}
--- /dev/null
+/*
+ * 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_remount_NULL__
+#define __test_yaffs_remount_NULL__
+
+#include "yaffsfs.h"
+#include "lib.h"
+#include "test_yaffs_unmount.h"
+
+int test_yaffs_remount_NULL(void);
+int test_yaffs_remount_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_rename_NULL.h"
+
+
+int test_yaffs_rename_NULL(void)
+{
+ int output=0;
+ int error_code =0;
+
+ if (0 != yaffs_access(DIR_PATH,0)) {
+ output = yaffs_mkdir(DIR_PATH,S_IWRITE | S_IREAD);
+ if (output < 0) {
+ print_message("failed to create directory\n",2);
+ return -1;
+ }
+ }
+ output = yaffs_rename(NULL , RENAME_PATH);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else{
+ print_message("renamed a null path (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_rename_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_rename_NULL_h__
+#define __test_yaffs_rename_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_rename_NULL(void);
+int test_yaffs_rename_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_rename_NULL2.h"
+
+
+int test_yaffs_rename_NULL2(void)
+{
+ int output=0;
+ int error_code =0;
+
+ if (0 != yaffs_access(DIR_PATH,0)) {
+ output = yaffs_mkdir(DIR_PATH,S_IWRITE | S_IREAD);
+ if (output < 0) {
+ print_message("failed to create directory\n",2);
+ return -1;
+ }
+ }
+ output = yaffs_rename(FILE_PATH , NULL);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else{
+ print_message("renamed a null path (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_rename_NULL2_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_rename_NULL2_h__
+#define __test_yaffs_rename_NULL2_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_rename_NULL2(void);
+int test_yaffs_rename_NULL2_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_rmdir_NULL.h"
+
+
+int test_yaffs_rmdir_NULL(void)
+{
+ int output=0;
+ int error_code =0;
+
+ if (0 != yaffs_access(DIR_PATH,0)) {
+ output = yaffs_mkdir(DIR_PATH,S_IWRITE | S_IREAD);
+ if (output < 0) {
+ print_message("failed to create directory\n",2);
+ return -1;
+ }
+ }
+ output = yaffs_rmdir(NULL);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else{
+ print_message("removed a NULL directory (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_rmdir_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_rmdir_NULL_h__
+#define __test_yaffs_rmdir_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_rmdir_NULL(void);
+int test_yaffs_rmdir_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_stat_NULL.h"
+
+int test_yaffs_stat_NULL(void)
+{
+ int error_code=0;
+ struct yaffs_stat stat;
+ int output=0;
+ char text[100];
+ text[0] ='\0';
+ output=yaffs_stat(NULL, &stat);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else{
+ print_message("stated a NULL file (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+int test_yaffs_stat_NULL_clean(void)
+{
+ return 1;
+}
--- /dev/null
+/*
+ * 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_stat_NULL_h__
+#define __test_yaffs_stat_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+
+int test_yaffs_stat_NULL(void);
+int test_yaffs_stat_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_NULL.h"
+
+static int output = 0;
+
+int test_yaffs_symlink_NULL(void)
+{
+ int error_code = 0;
+ output = yaffs_symlink(NULL,SYMLINK_PATH);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else {
+ print_message("created a symlink to a NULL path (which is a bad thing)\n",2);
+ return -1;
+ }
+
+}
+
+int test_yaffs_symlink_NULL_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 */
+ }
+}
+
+
+
--- /dev/null
+/*
+ * 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_NULL_h__
+#define __test_yaffs_symlink_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_symlink_NULL(void);
+int test_yaffs_symlink_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_NULL2.h"
+
+static int output = 0;
+
+int test_yaffs_symlink_NULL2(void)
+{
+ int error_code = 0;
+ output = yaffs_symlink(FILE_PATH,NULL);
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else {
+ print_message("created a symlink to a NULL path (which is a bad thing)\n",2);
+ return -1;
+ }
+
+}
+
+int test_yaffs_symlink_NULL2_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 */
+ }
+}
+
+
+
--- /dev/null
+/*
+ * 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_NULL2_h__
+#define __test_yaffs_symlink_NULL2_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_symlink_NULL2(void);
+int test_yaffs_symlink_NULL2_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_sync_NULL.h"
+
+
+int test_yaffs_sync_NULL(void)
+{
+ int error_code=-1;
+ int output = yaffs_sync(NULL);
+
+ if (output<0){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EFAULT){
+ return 1;
+ } else {
+ print_message("returned error does not match the the expected error\n",2);
+ return -1;
+ }
+ } else {
+ print_message("synced a NULL path (which is a bad thing)\n",2);
+ return -1;
+ }
+
+
+}
+
+
+int test_yaffs_sync_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_sync_NULL_h__
+#define __test_yaffs_sync_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_sync_NULL(void);
+int test_yaffs_sync_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_totalspace_NULL.h"
+
+
+
+int test_yaffs_totalspace_NULL(void)
+{
+ int output=0;
+ int error=0;
+ output = yaffs_totalspace(NULL);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("got the totalspace of a NULL mountpoint (which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+
+int test_yaffs_totalspace_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_totalspace_NULL_h__
+#define __test_yaffs_totalspace_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_totalspace_NULL(void);
+int test_yaffs_totalspace_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_truncate_NULL.h"
+
+
+int test_yaffs_truncate_NULL(void)
+{
+ int error=0;
+ int output=0;
+
+
+ output= yaffs_truncate(NULL,FILE_SIZE_TRUNCATED );
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EFAULT){
+ return 1;
+ } else {
+ print_message("received a different error than expected\n",2);
+ return -1;
+ }
+ } else{
+ print_message("truncated a NULL path\n",2);
+ return -1;
+ }
+
+}
+
+int test_yaffs_truncate_NULL_clean(void)
+{
+ return 1;
+}
--- /dev/null
+/*
+ * 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_truncate_NULL_h__
+#define __test_yaffs_truncate_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+
+int test_yaffs_truncate_NULL(void);
+int test_yaffs_truncate_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_unlink_NULL.h"
+
+static int handle=-1;
+
+int test_yaffs_unlink_NULL(void)
+{
+ int error_code=0;
+
+ handle=yaffs_unlink(NULL);
+ if (handle==-1){
+ error_code=yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("NULL path unlinked.(which is a bad thing)\n",2);
+ return -1;
+ }
+
+}
+int test_yaffs_unlink_NULL_clean(void)
+{
+ if (handle >= 0){
+ return test_yaffs_open();
+ } else {
+ return 1; /* the file failed to open so there is no need to close it*/
+ }
+}
+
--- /dev/null
+/*
+ * 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_unlink_NULL_h__
+#define __test_yaffs_unlink_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+
+int test_yaffs_unlink_NULL(void);
+int test_yaffs_unlink_NULL_clean(void);
+
+#endif
--- /dev/null
+/*
+ * 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_unmount_NULL.h"
+
+static int handle = 0;
+
+int test_yaffs_unmount_NULL(void)
+{
+ int output=0;
+ int error_code=0;
+
+ handle = yaffs_unmount(NULL);
+ if (handle==-1){
+ error_code = yaffs_get_error();
+ if (abs(error_code) == EFAULT){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else if (output >=0){
+ print_message("NULL path opened.(which is a bad thing)\n",2);
+ return -1;
+ }
+}
+
+int test_yaffs_unmount_NULL_clean(void)
+{
+ return 1;
+}
+
--- /dev/null
+/*
+ * 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_unmount_NULL_h__
+#define __test_yaffs_unmount_NULL_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_unmount_NULL(void);
+int test_yaffs_unmount_NULL_clean(void);
+
+#endif