X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_inodecount_EINVAL.c;fp=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_inodecount_EINVAL.c;h=36ae0d91ad6f7983769dec49e287ccc4665f4fc5;hb=fb21e9bff6cbb66f5e4f8f67083c864dc0b76650;hp=0000000000000000000000000000000000000000;hpb=239fd86892c59299042eabf617309a2d2ddf700b;p=yaffs2.git diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c new file mode 100644 index 0000000..36ae0d9 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.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_inodecount_EINVAL.h" + + + +int test_yaffs_inodecount_EINVAL(void) +{ + int output=0; + int error=0; + output = yaffs_inodecount("non-existing-mount-point"); + 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("got the inodecount of a non existing mountpoint (which is a bad thing)\n",2); + return -1; + } +} + + +int test_yaffs_inodecount_EINVAL_clean(void) +{ + return 1; +} +