X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Fquick_tests.c;h=6c548fbbc3803e1c2e8c25f908ffdc3e857bf076;hp=1c23eb2f6b48c323f9988970866db96a486f9498;hb=c118b37070fa47650ca61c8c740da7461450d139;hpb=26592c53da98ac887099559afbcb8dda05264e1c diff --git a/direct/timothy_tests/quick_tests/quick_tests.c b/direct/timothy_tests/quick_tests/quick_tests.c index 1c23eb2..6c548fb 100644 --- a/direct/timothy_tests/quick_tests/quick_tests.c +++ b/direct/timothy_tests/quick_tests/quick_tests.c @@ -1,6 +1,6 @@ #include "quick_tests.h" -#include "yaffsfs.h" + int random_seed; int simulate_power_failure = 0; @@ -31,14 +31,18 @@ test_template test_list[]={ //{dummy_test_pass,dummy_test_pass_clean,"dummy_test_pass"}, //{dummy_test_fail,dummy_test_fail_clean,"dummy_test_fail"}, {mount_yaffs_test,mount_yaffs_test_clean,"mount_yaffs_test"}, - - {test_open_file,test_open_file_clean,"test_open_file"}, + {test_yaffs_open_file,test_yaffs_open_file_clean,"test_yaffs_open_file"}, + {test_yaffs_open_file_ENOENT,test_yaffs_open_file_ENOENT_clean,"test_yaffs_open_file_ENOENT"}, + + {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_read,test_yaffs_read_clean,"test_yaffs_read"}, {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"} @@ -90,10 +94,17 @@ int main(){ } void quit_quick_tests(int exit_code){ + int error_code=0; if (num_of_tests_pass==total_number_of_tests && num_of_tests_failed==0){ printf("\t OK \n"); } + else { + error_code=yaffs_get_error(); + printf("yaffs_error code %d\n",error_code); + printf("error is : %s\n",yaffs_error_to_str(error_code)); + } printf("tests: %d passed %d failed\n\n\n",num_of_tests_pass,num_of_tests_failed); + yaffs_unmount(YAFFS_MOUNT_POINT); exit(exit_code); }