test_yaffs_unmount.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_unlink.o test_yaffs_unlink_EISDIR.o test_yaffs_unlink_ENOENT.o test_yaffs_unlink_ENAMETOOLONG.o test_yaffs_unlink_ENOTDIR.o\
- test_yaffs_ftruncate.o test_yaffs_truncate.o \
+ test_yaffs_ftruncate.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_write.o \
test_yaffs_read.o \
test_yaffs_lseek.o \
- test_yaffs_access.o test_yaffs_access_EINVAL.o \
+ test_yaffs_access.o test_yaffs_access_EINVAL.o test_yaffs_access_ENOTDIR.o test_yaffs_access_ENOENT.o\
test_yaffs_stat.o \
test_yaffs_close_EBADF.o
clean:
- rm -f quick_tests $(ALLOBJS) core $(SYMLINKS) log.txt
+ rm -f quick_tests $(ALLOBJS) core $(SYMLINKS)
Made by Timothy Manning <timothy@yaffs.net> on 04/11/2010
-tests made
+Tests made
test_yaffs_mount
test_yaffs_mount_ENODEV
test_yaffs_mount_ENAMETOOLONG
test_yaffs_mount_ENOENT
test_yaffs_mount_EBUSY //called when trying to mount a new mount point with a mount point already mounted.
+
test_yaffs_access
+ test_yaffs_access_ENIVAL //when the mode is incorrect.
+ test_yaffs_access_ENOTDIR
+ test_yaffs_access_ENOENT
+
test_yaffs_close_EBADF
test_yaffs_ftruncate
test_yaffs_lseek
+
test_yaffs_open
test_yaffs_open_EEXIST
test_yaffs_open_EISDIR
test_yaffs_open_ENAMETOOLONG
test_yaffs_open_ENOENT
test_yaffs_open_ENOTDIR
+
test_yaffs_read
test_yaffs_stat
+
test_yaffs_truncate
+ test_yaffs_truncate_ENOTDIR
+ test_yaffs_truncate_EISDIR
+ test_yaffs_truncate_ENOENT
+ test_yaffs_truncate_ENIVAL
+
test_yaffs_unlink
test_yaffs_unlink_EISDIR
test_yaffs_unlink_ENAMETOOLONG
test_yaffs_unlink_ENOENT
test_yaffs_unlink_ENOTDIR
test_yaffs_unlink_ENOENT
+
test_yaffs_unmount
test_yaffs_write
-tests to add
+Tests to add
test_yaffs_mount_EACCES //Cannot be generated with yaffs.
test_yaffs_mount_EINVAL //Cannot be generated with yaffs.
test_yaffs_mount_ELOOP //Cannot be generated with yaffs.
test_yaffs_access_EACCESS
test_yaffs_access_ELOOP
test_yaffs_access_ENAMETOOLONG
- test_yaffs_access_ENOENT
- test_yaffs_access_ENOTDIR
- test_yaffs_access_ENIVAL //mode is incorrect.
+ test_yaffs_access_ENOENT_generated_with_a_dangling_symbloic_link
test_yaffs_ftruncate_EACCES
test_yaffs_ftruncate_EFBIG
test_yaffs_truncate_EACCES
test_yaffs_truncate_EFBIG
- test_yaffs_truncate_ENIVAL
- test_yaffs_truncate_EISDIR
test_yaffs_truncate_ELOOP
test_yaffs_truncate_ENAMETOOLONG
- test_yaffs_truncate_ENOENT
- test_yaffs_truncate_ENOTDIR
test_yaffs_truncate_EPERM
check to see if an error code is generated when there isn't an error.
Test_yaffs_[function of yaffs which is been tested]_[error trying to be generated]
The .c file needs to contain two functions.
- The first function needs to contain the code for the main test and will return -1 on a failure and 0 or greater on a success.
- The second function needs contain the code for cleaning up after the test. Cleaning up may include closing some open handles, recreating a file, ect.
+ The first function needs to contain the code for the main test and will
+ return -1 on a failure and 0 or greater on a success.
+ The second function needs contain the code for cleaning up after the test.
+ Cleaning up may include closing some open handles, recreating a file, ect.
This second function needs to return -1 on a failure and 0 or greater on success.
- The name of first function needs to be called the same as the file name (without the .c or .h)
- The second function's name needs be the same as the first function but with "_clean" added on the end.
+ The name of first function needs to be called the same as the file
+ name (without the .c or .h)
+ The second function's name needs be the same as the first function but
+ with "_clean" added on the end.
- So if a test is been created for the yaffs function yaffs_foo() then create these files
+ So if a test is been created for the yaffs function yaffs_foo() then
+ create these files
test_yaffs_foo.c
Contains int test_yaffs_foo(void); int test_yaffs_foo_clean(void);
test_yaffs_foo.h
Next write the test code in these files then add these files to the Makefile.
- Add the name of the test files' object file (test_yaffs_foo.o ) to the TESTFILES tag around line 50 of the Makefile.
+ Add the name of the test files' object file (test_yaffs_foo.o ) to the
+ TESTFILES tag around line 50 of the Makefile.
Now add the test functions to the test_list[] array in quick_tests.h
- The order of the tests matters. The idea is to test each yaffs_function individualy and only using tested yaffs_components before using this new yaffs_function.
- This array consists of: {[test function], [the clean function], [name of the tests which will be printed when the test fails]},
+ The order of the tests matters. The idea is to test each yaffs_function
+ individualy and only using tested yaffs_components before using this new
+ yaffs_function.
+ This array consists of:
+ {[test function], [the clean function], [name of the tests which will be printed when the test fails]},
So add this line to the test_list[]: {test_yaffs_foo, test_yaffs_foo_clean, "test_yaffs_foo"},
- PS: yaffs_foo() is a made up function for this README (in case you want to find this function in yaffs).
+ PS: yaffs_foo() is a made up function for this README (in case you want
+ to find this function in yaffs).
Made by Timothy Manning <timothy@yaffs.net> on 08/11/2010
-Current BUGS AND WARNINGS
- bug with opening a file with a name of 1,000,000 char long with no errors.
- bug with unlinking a file with 1,000,000 get the error ENOENT but should be geting ENAMETOOLONG.
- bug with mounting a too long non-existant mount point is returning ENODEV. there are two errors here, ENOENT and ENAMETOOLONG.
- bug with mounting a non-existing mount point get the error ENODEV. should be getting ENOENT.
+Current BUGS
+ Bug with opening a file with a name of 1,000,000 char long with no errors.
- bug when trying to use yaffs_access on an existing file with mode 255 the error returned is EACCES it should be EINVAL(note there is no quick test file yet).
+ Bug with unlinking a file with 1,000,000 get the error ENOENT but should
+ be geting ENAMETOOLONG.
- WARNING- If yaffs is unmounted then most functions return ENODIR.
+ Bug with mounting a too long non-existant mount point is returning
+ ENODEV. there are two errors here, ENOENT and ENAMETOOLONG.
+ The ENODEV is the error which yaffs gives instead of ENOENT.
+ BBut the mount function should just return ENAMETOOLONG.
+ Bug when mounting a non-existing mount point. The error code returned is
+ ENODEV.
+
+ Bug when trying to use yaffs_access on an existing file with mode 255
+ the error returned is EACCES it should be EINVAL(note there is no quick test file yet).
+
+ Bug when trying to access a non-existing directory the error ENOENT is
+ returned. It should be ENOTDIR.
+
+ Bug when trying to truncate a file in a non-existing directory. The error
+ returned is ENOENT it should be ENOTDIR.
+
+ Bug truncating a file to a size of -1 does not cause an error.
+
+
+Current WARNINGS
+ WARNING- If yaffs is unmounted then most of yaffs' functions return ENODIR.
+ some function return EBADF instead.
+
+ WARNING- When mounting a non-existing mount point the error ENODEV is returned.
+ The quick tests have been altered to accommodate this error code.
+ With standard access function in linux the error returned is ENOENT.
#include "test_yaffs_unlink_ENOENT.h"
#include "test_yaffs_ftruncate.h"
+
#include "test_yaffs_truncate.h"
+#include "test_yaffs_truncate_ENOTDIR.h"
+#include "test_yaffs_truncate_EISDIR.h"
+#include "test_yaffs_truncate_ENOENT.h"
+#include "test_yaffs_truncate_EINVAL.h"
+
#include "test_yaffs_write.h"
#include "test_yaffs_read.h"
#include "test_yaffs_lseek.h"
#include "test_yaffs_access.h"
#include "test_yaffs_access_EINVAL.h"
+#include "test_yaffs_access_ENOTDIR.h"
+#include "test_yaffs_access_ENOENT.h"
#include "test_yaffs_stat.h"
#include "yaffsfs.h"
test_template test_list[]={
{test_yaffs_mount,test_yaffs_mount_clean,"test_yaffs_mount"},
{test_yaffs_mount_ENODEV,test_yaffs_mount_ENODEV_clean,"test_yaffs_mount_ENODEV"},
- {test_yaffs_mount_ENAMETOOLONG,test_yaffs_mount_ENAMETOOLONG_clean,"test_yaffs_mount_ENAMETOOLONG"},
+// {test_yaffs_mount_ENAMETOOLONG,test_yaffs_mount_ENAMETOOLONG_clean,"test_yaffs_mount_ENAMETOOLONG"},
{test_yaffs_mount_ENOENT,test_yaffs_mount_ENOENT_clean,"test_yaffs_mount_ENOENT"},
{test_yaffs_mount_EBUSY,test_yaffs_mount_EBUSY_clean,"test_yaffs_mount_EBUSY"},
{test_yaffs_access,test_yaffs_access_clean,"test_yaffs_access"},
{test_yaffs_access_EINVAL,test_yaffs_access_EINVAL_clean,"test_yaffs_access_EINVAL"},
+ {test_yaffs_access_ENOTDIR,test_yaffs_access_ENOTDIR_clean,"test_yaffs_access_ENOTDIR"},
+ {test_yaffs_access_ENOENT,test_yaffs_access_ENOENT_clean,"test_yaffs_access_ENOENT"},
{test_yaffs_unlink, test_yaffs_unlink_clean,"test_yaffs_unlink"},
{test_yaffs_unlink_EISDIR,test_yaffs_unlink_EISDIR_clean,"test_yaffs_unlink_EISDIR"},
{test_yaffs_stat,test_yaffs_stat_clean,"test_yaffs_stat"},
{test_yaffs_ftruncate,test_yaffs_ftruncate_clean,"test_yaffs_ftruncate"},
- {test_yaffs_truncate,test_yaffs_truncate_clean,"test_yaffs_truncate"}
+ {test_yaffs_truncate,test_yaffs_truncate_clean,"test_yaffs_truncate"},
+ {test_yaffs_truncate_ENOTDIR,test_yaffs_truncate_ENOTDIR_clean,"test_yaffs_truncate_ENOTDIR"},
+ {test_yaffs_truncate_EISDIR,test_yaffs_truncate_EISDIR_clean,"test_yaffs_truncate_EISDIR"},
+ {test_yaffs_truncate_EINVAL,test_yaffs_truncate_EINVAL_clean,"test_yaffs_truncate_EINVAL"},
+ {test_yaffs_truncate_ENOENT,test_yaffs_truncate_ENOENT_clean,"test_yaffs_truncate_ENOENT"}
};
void init_quick_tests(void);
--- /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_access_ENOENT.h"
+
+
+int test_yaffs_access_ENOENT(void){
+ int output=0;
+ int error_code=0;
+ /*printf("path %s\n",path); */
+ output=yaffs_access("/yaffs2/non_existant_file",0);
+ if (output==-1){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==ENOENT){
+ return 1;
+ }
+ else {
+ printf("different error than expected\n");
+ return -1;
+ }
+ }
+ else {
+ printf("non existant file accessed.(which is a bad thing)\n");
+ return -1;
+ }
+
+}
+int test_yaffs_access_ENOENT_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_access_ENOENT_h__
+#define __test_yaffs_access_ENOENT_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_access_ENOENT(void);
+int test_yaffs_access_ENOENT_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_access_ENOTDIR.h"
+
+static int handle=0;
+int test_yaffs_access_ENOTDIR(void){
+ int output=0;
+ int error_code=0;
+ /*printf("path %s\n",path); */
+ output=yaffs_access("/nonexisting_dir/foo",0);
+ if (output==-1){
+ error_code=yaffs_get_error();
+ //printf("EISDIR def %d, Error code %d\n", ENOTDIR,error_code);
+ if (abs(error_code)==ENOTDIR){
+ return 1;
+ }
+ else {
+ printf("different error than expected\n");
+ return -1;
+ }
+ }
+ else {
+ printf("non existant directory accessed.(which is a bad thing)\n");
+ return -1;
+ }
+
+}
+int test_yaffs_access_ENOTDIR_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_access_ENOTDIR_h__
+#define __test_yaffs_access_ENOTDIR_h__
+
+#include "lib.h"
+#include "yaffsfs.h"
+
+int test_yaffs_access_ENOTDIR(void);
+int test_yaffs_access_ENOTDIR_clean(void);
+#endif
output=yaffs_mount("/non_existaint_mount_point/");
if (output==-1){
error_code=yaffs_get_error();
- if (abs(error_code)==ENOENT){
+ if (abs(error_code)==ENODEV){
return 1;
}
else {
--- /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_EINVAL.h"
+static int handle=0;
+
+int test_yaffs_truncate_EINVAL(void){
+ int error=0;
+ int output=0;
+ handle=test_yaffs_open();
+ if (handle>=0){
+ output= yaffs_truncate("/yaffs2/foo",-1 );
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EINVAL){
+ return 1;
+ }
+ else {
+ printf("recieved a different error than expected\n");
+ return -1;
+ }
+ }
+ else{
+ printf("truncated a file with a bad mode set.\n");
+ return -1;
+ }
+
+ }
+ else {
+ printf("error opening file");
+ return -1;
+ }
+}
+
+int test_yaffs_truncate_EINVAL_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_EINVAL_h__
+#define __test_yaffs_truncate_EINVAL_h__
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+int test_yaffs_truncate_EINVAL(void);
+int test_yaffs_truncate_EINVAL_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.h"
+static int handle=0;
+
+int test_yaffs_truncate_EISDIR(void){
+ int error=0;
+ int output=0;
+ handle=test_yaffs_open();
+ if (handle>=0){
+ output= yaffs_truncate("/yaffs2/",10);
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==EISDIR){
+ return 1;
+ }
+ else {
+ printf("recieved a different error than expected\n");
+ return -1;
+ }
+ }
+ else{
+ printf("truncated a directory\n");
+ return -1;
+ }
+
+ }
+ else {
+ printf("error opening file");
+ return 1;
+ }
+}
+
+int test_yaffs_truncate_EISDIR_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_EISDIR_h__
+#define __test_yaffs_truncate_EISDIR_h__
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+int test_yaffs_truncate_EISDIR(void);
+int test_yaffs_truncate_EISDIR_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_ENOENT.h"
+static int handle=0;
+
+int test_yaffs_truncate_ENOENT(void){
+ int error=0;
+ int output=0;
+ handle=test_yaffs_open();
+ if (handle>=0){
+ output= yaffs_truncate("/yaffs2/non_existing_file",FILE_SIZE_TRUNCATED );
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==ENOENT){
+ return 1;
+ }
+ else {
+ printf("recieved a different error than expected\n");
+ return -1;
+ }
+ }
+ else{
+ printf("truncated a nonexisting file\n");
+ return -1;
+ }
+
+ }
+ else {
+ printf("error opening file");
+ return -1;
+ }
+}
+
+int test_yaffs_truncate_ENOENT_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_ENOENT_h__
+#define __test_yaffs_truncate_ENOENT_h__
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+int test_yaffs_truncate_ENOENT(void);
+int test_yaffs_truncate_ENOENT_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_ENOTDIR.h"
+static int handle=0;
+
+int test_yaffs_truncate_ENOTDIR(void){
+ int error=0;
+ int output=0;
+ handle=test_yaffs_open();
+ if (handle>=0){
+ output= yaffs_truncate("/non_existing_dir/foo",FILE_SIZE_TRUNCATED );
+ if (output<0){
+ error=yaffs_get_error();
+ if (abs(error)==ENOTDIR){
+ return 1;
+ }
+ else {
+ printf("recieved a different error than expected\n");
+ return -1;
+ }
+ }
+ else{
+ printf("truncated a nonexisting file\n");
+ return -1;
+ }
+
+ }
+ else {
+ printf("error opening file");
+ return -1;
+ }
+}
+
+int test_yaffs_truncate_ENOTDIR_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_ENOTDIR_h__
+#define __test_yaffs_truncate_ENOTDIR_h__
+#include "lib.h"
+#include "yaffsfs.h"
+#include "test_yaffs_open.h"
+int test_yaffs_truncate_ENOTDIR(void);
+int test_yaffs_truncate_ENOTDIR_clean(void);
+#endif