X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Fquick_tests.h;h=2c4210ee1f0a94a6fb747dc1e5910c29e3d73109;hp=8172345b2c2d98bd097e0501f78c67d8525329fc;hb=a11dd4924d16a4c3d6df13a4182f7729a1478a53;hpb=fa6335ddf55329c1ba1c50c68080a559461151cc diff --git a/direct/timothy_tests/quick_tests/quick_tests.h b/direct/timothy_tests/quick_tests/quick_tests.h index 8172345..2c4210e 100644 --- a/direct/timothy_tests/quick_tests/quick_tests.h +++ b/direct/timothy_tests/quick_tests/quick_tests.h @@ -1,13 +1,33 @@ +/* + * 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 __quick_tests_h__ #define __quick_tests_h__ #include #include "test_mount_yaffs.h" + #include "test_yaffs_open.h" #include "test_yaffs_open_EISDIR.h" #include "test_yaffs_open_EEXIST.h" #include "test_yaffs_open_ENOENT.h" #include "test_yaffs_open_ENOTDIR.h" + +#include "test_yaffs_close_EBADF.h" + + #include "test_yaffs_unlinking.h" #include "test_yaffs_ftruncate.h" #include "test_yaffs_truncate.h" @@ -20,11 +40,38 @@ #include "yaffs_error_converter.h" #include "lib.h" +typedef struct test { + int (*p_function)(void); /*pointer to test function*/ + int (*p_function_clean)(void); + /*char pass_message[50]; will not need a pass message*/ + char *fail_message; /*pointer to fail message, needs to include name of test*/ +}test_template; + + +test_template test_list[]={ + {mount_yaffs_test,mount_yaffs_test_clean,"mount_yaffs_test"}, + {test_yaffs_open,test_yaffs_open_clean,"test_yaffs_open"}, + {test_yaffs_open_EISDIR,test_yaffs_open_EISDIR_clean,"test_yaffs_open_EISDIR"}, + {test_yaffs_open_EEXIST,test_yaffs_open_EEXIST_clean,"test_yaffs_open_EEXIST"}, +// {test_yaffs_open_ENOTDIR,test_yaffs_open_ENOTDIR_clean,"test_yaffs_open_ENOTDIR"}, +// {test_yaffs_open_ENOENT,test_yaffs_open_ENOENT_clean,"test_yaffs_open_ENOENT"}, + + {test_yaffs_close_EBADF,test_yaffs_close_EBADF_clean,"test_yaffs_close_EBADF"}, + + {test_yaffs_access,test_yaffs_access_clean,"test_yaffs_access"}, + {test_yaffs_unlinking, test_yaffs_unlinking_clean,"test_yaffs_unlinking"}, + + {test_yaffs_lseek,test_yaffs_lseek_clean,"test_yaffs_lseek"}, + {test_yaffs_write,test_yaffs_write_clean,"test_yaffs_write"}, + {test_yaffs_read,test_yaffs_read_clean,"test_yaffs_read"}, + + + {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"} -#define YAFFS_MOUNT_POINT "/yaffs2/" + }; void init_quick_tests(void); -int dummy_test_pass(void); -int dummy_test_fail(void); void quit_quick_tests(int exit_code); #endif