do {
found = 0;
if (tests_random_no(5) == 1) {
- int i, n = tests_random_no(255) + 1;
+ int i, n = tests_random_no(tests_max_fname_len) + 1;
CHECK(n > 0 && n < 256);
for (i = 0; i < n; i++)
/* Whether it is ok to test on the root file system */
static int rootok = 0;
+/* Maximum file name length of test file system (from statfs) */
+long tests_max_fname_len = 255;
+
/* Function invoked by the CHECK macro */
void tests_test(int test,const char *msg,const char *file,unsigned line)
{
"TEST_FILE_SYSTEM_MOUNT_DIR\n");
CHECK(0);
}
+ tests_max_fname_len = fs_info.f_namelen;
if (strcmp(tests_file_system_type, "jffs2") == 0 &&
fs_info.f_type != JFFS2_SUPER_MAGIC) {
fprintf(stderr, "File system type is not jffs2\n");
/* Program name from argv[0] */
extern char *program_name;
+/* Maximum file name length of test file system (from statfs) */
+extern long tests_max_fname_len;
+
#endif