summaryrefslogtreecommitdiff
path: root/direct/timothy_tests/quick_tests/quick_tests.h
blob: 725ead233ee19cfcf55f3562bc304e9165185ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
/*
 * 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 __quick_tests_h__
#define __quick_tests_h__
#include <stdio.h>
#include <getopt.h>

#include "test_yaffs_mount.h"
#include "test_yaffs_mount_ENODEV.h"
#include "test_yaffs_mount_ENAMETOOLONG.h"
#include "test_yaffs_mount_EBUSY.h"
#include "test_yaffs_mount_NULL.h"

#include "test_yaffs_unmount.h"
#include "test_yaffs_unmount_ENODEV.h"
#include "test_yaffs_unmount_ENAMETOOLONG.h"
#include "test_yaffs_unmount_EBUSY.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_open_ENAMETOOLONG.h"
#include "test_yaffs_open_EINVAL.h"
#include "test_yaffs_open_EINVAL2.h"
#include "test_yaffs_open_ELOOP.h"
#include "test_yaffs_open_ELOOP_dir.h"
#include "test_yaffs_open_EROFS.h"
#include "test_yaffs_open_EACCES.h"
#include "test_yaffs_open_NULL.h"

#include "test_yaffs_close_EBADF.h"
#include "test_yaffs_close_NULL.h"

#include "test_yaffs_unlink.h"
#include "test_yaffs_unlink_EISDIR.h"
#include "test_yaffs_unlink_ENOENT.h"
#include "test_yaffs_unlink_ENAMETOOLONG.h"
#include "test_yaffs_unlink_ENOTDIR.h"
#include "test_yaffs_unlink_ENOENT.h"
#include "test_yaffs_unlink_ENOENT2.h"
#include "test_yaffs_unlink_ELOOP_dir.h"
#include "test_yaffs_unlink_EROFS.h"
#include "test_yaffs_unlink_NULL.h"

#include "test_yaffs_ftruncate.h"
#include "test_yaffs_ftruncate_EBADF.h"
#include "test_yaffs_ftruncate_EINVAL.h"
#include "test_yaffs_ftruncate_big_file.h"
#include "test_yaffs_ftruncate_EROFS.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_truncate_big_file.h"
#include "test_yaffs_truncate_ENOENT2.h"
#include "test_yaffs_truncate_ELOOP.h"
#include "test_yaffs_truncate_ELOOP_dir.h"
#include "test_yaffs_truncate_EROFS.h"
#include "test_yaffs_truncate_ENAMETOOLONG.h"
#include "test_yaffs_truncate_NULL.h"

#include "test_yaffs_write.h"
#include "test_yaffs_write_EBADF.h"
#include "test_yaffs_write_big_file.h"
#include "test_yaffs_write_EROFS.h"

#include "test_yaffs_read.h"
#include "test_yaffs_read_EBADF.h"
#include "test_yaffs_read_EINVAL.h"

#include "test_yaffs_lseek.h"
#include "test_yaffs_lseek_EBADF.h"
#include "test_yaffs_lseek_EINVAL.h"
#include "test_yaffs_lseek_big_file.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_access_ENOENT2.h"
#include "test_yaffs_access_ELOOP_dir.h"
#include "test_yaffs_access_ELOOP.h"
#include "test_yaffs_access_EROFS.h"
#include "test_yaffs_access_EACCES.h"
#include "test_yaffs_access_ENAMETOOLONG.h"
#include "test_yaffs_access_NULL.h"

#include "test_yaffs_stat.h"
#include "test_yaffs_stat_ENOENT.h"
#include "test_yaffs_stat_ENOTDIR.h"
#include "test_yaffs_stat_ENOENT2.h"
#include "test_yaffs_stat_ELOOP.h"
#include "test_yaffs_stat_ELOOP_dir.h"
#include "test_yaffs_stat_ENAMETOOLONG.h"
#include "test_yaffs_stat_NULL.h"

#include "test_yaffs_fstat.h"
#include "test_yaffs_fstat_EBADF.h"


#include "test_yaffs_chmod.h"
#include "test_yaffs_chmod_ENOENT.h"
#include "test_yaffs_chmod_ENOTDIR.h"
#include "test_yaffs_chmod_EINVAL.h"
#include "test_yaffs_chmod_ENOENT2.h"
#include "test_yaffs_chmod_ELOOP_dir.h"
#include "test_yaffs_chmod_ELOOP.h"
#include "test_yaffs_chmod_EROFS.h"
#include "test_yaffs_chmod_ENAMETOOLONG.h"
#include "test_yaffs_chmod_NULL.h"

#include "test_yaffs_fchmod.h"
#include "test_yaffs_fchmod_EBADF.h"
#include "test_yaffs_fchmod_EINVAL.h"
#include "test_yaffs_fchmod_EROFS.h"
#include "test_yaffs_fchmod_NULL.h"

#include "test_yaffs_fsync.h"
#include "test_yaffs_fsync_EBADF.h"
#include "test_yaffs_fsync_EROFS.h"

#include "test_yaffs_fdatasync.h"
#include "test_yaffs_fdatasync_EBADF.h"
#include "test_yaffs_fdatasync_EROFS.h"
#include "test_yaffs_fdatasync_NULL.h"

#include "test_yaffs_mkdir.h"
#include "test_yaffs_mkdir_EEXIST.h"
#include "test_yaffs_mkdir_ENOTDIR.h"
#include "test_yaffs_mkdir_ENOENT.h"
#include "test_yaffs_mkdir_ELOOP_dir.h"
#include "test_yaffs_mkdir_EROFS.h"
#include "test_yaffs_mkdir_ENAMETOOLONG.h"
#include "test_yaffs_mkdir_NULL.h"

#include "test_yaffs_symlink.h"
#include "test_yaffs_symlink_ENOTDIR.h"
#include "test_yaffs_symlink_EEXIST.h"
#include "test_yaffs_symlink_ENOENT.h"
#include "test_yaffs_symlink_ENOENT2.h"
#include "test_yaffs_symlink_ELOOP_dir.h"
#include "test_yaffs_symlink_EROFS.h"
#include "test_yaffs_symlink_ENAMETOOLONG.h"
#include "test_yaffs_symlink_NULL.h"
#include "test_yaffs_symlink_NULL2.h"

#include "test_yaffs_mount2.h"
#include "test_yaffs_mount2_ENODEV.h"

#include "test_yaffs_unmount2.h"
#include "test_yaffs_unmount2_ENODEV.h"
#include "test_yaffs_unmount2_EINVAL.h"
#include "test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h"
#include "test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h"
#include "test_yaffs_unmount_NULL.h"

#include "test_yaffs_sync.h"
#include "test_yaffs_sync_ENODEV.h"
#include "test_yaffs_sync_EROFS.h"
#include "test_yaffs_sync_ENAMETOOLONG.h"
#include "test_yaffs_sync_NULL.h"

#include "test_yaffs_remount_force_off_read_only_off.h"
#include "test_yaffs_remount_force_on_read_only_off.h"
#include "test_yaffs_remount_ENODEV.h"
#include "test_yaffs_remount_EINVAL.h"
#include "test_yaffs_remount_ENAMETOOLONG.h"
#include "test_yaffs_remount_NULL.h"

#include "test_yaffs_freespace.h"
#include "test_yaffs_freespace_EINVAL.h"
#include "test_yaffs_freespace_ENAMETOOLONG.h"
#include "test_yaffs_freespace_NULL.h"

#include "test_yaffs_totalspace.h"
#include "test_yaffs_totalspace_EINVAL.h"
#include "test_yaffs_totalspace_ENAMETOOLONG.h"
#include "test_yaffs_totalspace_NULL.h"

#include "test_yaffs_inodecount.h"
#include "test_yaffs_inodecount_EINVAL.h"
#include "test_yaffs_inodecount_ENAMETOOLONG.h"
#include "test_yaffs_inodecount_NULL.h"

#include "test_yaffs_link.h"
#include "test_yaffs_link_ENOENT.h"
#include "test_yaffs_link_EEXIST.h"
#include "test_yaffs_link_ENOTDIR.h"
#include "test_yaffs_link_ENOTDIR2.h"
#include "test_yaffs_link_ENOENT2.h"
#include "test_yaffs_link_ENOENT3.h"
#include "test_yaffs_link_ENOENT4.h"
#include "test_yaffs_link_ELOOP_dir.h"
#include "test_yaffs_link_EROFS.h"
#include "test_yaffs_link_ENAMETOOLONG.h"
#include "test_yaffs_link_ENAMETOOLONG2.h"
#include "test_yaffs_link_NULL.h"
#include "test_yaffs_link_NULL2.h"

#include "test_yaffs_rmdir.h"
#include "test_yaffs_rmdir_EBUSY.h"
#include "test_yaffs_rmdir_EINVAL.h"
#include "test_yaffs_rmdir_ENOENT.h"
#include "test_yaffs_rmdir_ENOTDIR.h"
#include "test_yaffs_rmdir_ELOOP_dir.h"
#include "test_yaffs_rmdir_EROFS.h"
#include "test_yaffs_rmdir_ENAMETOOLONG.h"
#include "test_yaffs_rmdir_ENOTEMPTY.h"

#include "test_yaffs_rename.h"
#include "test_yaffs_rename_ENOENT.h"
#include "test_yaffs_rename_ENOTDIR.h"
#include "test_yaffs_rename_EINVAL.h"
#include "test_yaffs_rename_dir.h"
#include "test_yaffs_rename_dir_ENOENT.h"
#include "test_yaffs_rename_dir_ENOENT2.h"
#include "test_yaffs_rename_dir_to_file.h"
#include "test_yaffs_rename_file_to_dir.h"
#include "test_yaffs_rename_EEXISTS.h"
#include "test_yaffs_rename_ELOOP_dir.h"
#include "test_yaffs_rename_EROFS.h"
#include "test_yaffs_rename_ENAMETOOLONG.h"
#include "test_yaffs_rename_ENAMETOOLONG2.h"
#include "test_yaffs_rename_NULL.h"
#include "test_yaffs_rename_NULL2.h"

#include "test_yaffs_lstat.h"
#include "test_yaffs_lstat_ENOENT.h"
#include "test_yaffs_lstat_ENOTDIR.h"
#include "test_yaffs_lstat_ENAMETOOLONG.h"
#include "test_yaffs_lstat_NULL.h"

#include "test_yaffs_flush.h"
#include "test_yaffs_flush_EBADF.h"
#include "test_yaffs_flush_EROFS.h"

#include "test_yaffs_dup.h"
#include "test_yaffs_dup_EBADF.h"

#include "yaffsfs.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 *name_of_test;	/*pointer to fail message, needs to include name of test*/
}test_template;


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_EBUSY,test_yaffs_mount_EBUSY_clean,"test_yaffs_mount_EBUSY"},
	{test_yaffs_mount_NULL,test_yaffs_mount_NULL_clean,"test_yaffs_mount_NULL"},

	{test_yaffs_unmount,test_yaffs_unmount_clean,"test_yaffs_unmount"},
	{test_yaffs_unmount_ENODEV,test_yaffs_unmount_ENODEV_clean,"test_yaffs_unmount_ENODEV"},
	{test_yaffs_unmount_ENAMETOOLONG,test_yaffs_unmount_ENAMETOOLONG_clean,"test_yaffs_unmount_ENAMETOOLONG"},
	{test_yaffs_unmount_EBUSY,test_yaffs_unmount_EBUSY_clean,"test_yaffs_unmount_EBUSY"},

	{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_open_ENAMETOOLONG,test_yaffs_open_ENAMETOOLONG_clean,"test_yaffs_open_ENAMETOOLONG"},
	{test_yaffs_open_EINVAL,test_yaffs_open_EINVAL_clean,"test_yaffs_open_EINVAL"},
	{test_yaffs_open_EINVAL2,test_yaffs_open_EINVAL2_clean,"test_yaffs_open_EINVAL2"},
	{test_yaffs_open_ELOOP,test_yaffs_open_ELOOP_clean,"test_yaffs_open_ELOOP"},
	{test_yaffs_open_ELOOP_dir,test_yaffs_open_ELOOP_dir_clean,"test_yaffs_open_ELOOP_dir"},
	{test_yaffs_open_EROFS,test_yaffs_open_EROFS_clean,"test_yaffs_open_EROFS"},
	{test_yaffs_open_EACCES,test_yaffs_open_EACCES_clean,"test_yaffs_open_EACCES"},
	{test_yaffs_open_NULL,test_yaffs_open_NULL_clean,"test_yaffs_open_NULL"},


	{test_yaffs_close_EBADF,test_yaffs_close_EBADF_clean,"test_yaffs_close_EBADF"},
	{test_yaffs_close_NULL,test_yaffs_close_NULL_clean,"test_yaffs_close_NULL"},

	{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_access_ENOENT2,test_yaffs_access_ENOENT2_clean,"test_yaffs_access_ENOENT2"},
	{test_yaffs_access_ELOOP_dir,test_yaffs_access_ELOOP_dir_clean,"test_yaffs_access_ELOOP_dir"},
	{test_yaffs_access_ELOOP,test_yaffs_access_ELOOP_clean,"test_yaffs_access_ELOOP"},
	{test_yaffs_access_EROFS,test_yaffs_access_EROFS_clean,"test_yaffs_access_EROFS"},
	{test_yaffs_access_EACCES,test_yaffs_access_EACCES_clean,"test_yaffs_access_EACCES"},
	{test_yaffs_access_ENAMETOOLONG,test_yaffs_access_ENAMETOOLONG_clean,"test_yaffs_access_ENAMETOOLONG"},
	{test_yaffs_access_NULL,test_yaffs_access_NULL_clean,"test_yaffs_access_NULL"},

	{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_unlink_ENOENT,test_yaffs_unlink_ENOENT_clean,"test_yaffs_unlink_ENOENT"},
	{test_yaffs_unlink_ENAMETOOLONG,test_yaffs_unlink_ENAMETOOLONG_clean,"test_yaffs_unlink_ENAMETOOLONG"},
	{test_yaffs_unlink_ENOTDIR,test_yaffs_unlink_ENOTDIR_clean,"test_yaffs_unlink_ENOTDIR"},
	{test_yaffs_unlink_ENOENT,test_yaffs_unlink_ENOENT_clean,"test_yaffs_unlink_ENOENT"},
	{test_yaffs_unlink_ENOENT2,test_yaffs_unlink_ENOENT2_clean,"test_yaffs_unlink_ENOENT2"},
	{test_yaffs_unlink_ELOOP_dir,test_yaffs_unlink_ELOOP_dir_clean,"test_yaffs_unlink_ELOOP_dir"},
	{test_yaffs_unlink_EROFS,test_yaffs_unlink_EROFS_clean,"test_yaffs_unlink_EROFS"},
	{test_yaffs_unlink_NULL,test_yaffs_unlink_NULL_clean,"test_yaffs_unlink_NULL"},

	{test_yaffs_lseek,test_yaffs_lseek_clean,"test_yaffs_lseek"},
	{test_yaffs_lseek_EBADF,test_yaffs_lseek_EBADF_clean,"test_yaffs_lseek_EBADF"},
	{test_yaffs_lseek_EINVAL,test_yaffs_lseek_EINVAL_clean,"test_yaffs_lseek_EINVAL"},
//	{test_yaffs_lseek_big_file,test_yaffs_lseek_big_file_clean,"test_yaffs_lseek_big_file"}, //this test does not work because the large number becomes 0 when the file is compiled.

	{test_yaffs_write,test_yaffs_write_clean,"test_yaffs_write"},
	{test_yaffs_write_EBADF,test_yaffs_write_EBADF_clean,"test_yaffs_write_EBADF"},
	{test_yaffs_write_big_file,test_yaffs_write_big_file_clean,"test_yaffs_write_big_file"},
	{test_yaffs_write_EROFS,test_yaffs_write_EROFS_clean,"test_yaffs_write_EROFS"},

	{test_yaffs_read,test_yaffs_read_clean,"test_yaffs_read"},
	{test_yaffs_read_EBADF,test_yaffs_read_EBADF_clean,"test_yaffs_read_EBADF"},
	{test_yaffs_read_EINVAL,test_yaffs_read_EINVAL_clean,"test_yaffs_read_EINVAL"},

	{test_yaffs_stat,test_yaffs_stat_clean,"test_yaffs_stat"},
	{test_yaffs_stat_ENOENT,test_yaffs_stat_ENOENT_clean,"test_yaffs_stat_ENOENT"},
	{test_yaffs_stat_ENOTDIR,test_yaffs_stat_ENOTDIR_clean,"test_yaffs_stat_ENOTDIR"},
	{test_yaffs_stat_ENOENT2,test_yaffs_stat_ENOENT2_clean,"test_yaffs_stat_ENOENT2"},
	{test_yaffs_stat_ELOOP,test_yaffs_stat_ELOOP_clean,"test_yaffs_stat_ELOOP"},
	{test_yaffs_stat_ENAMETOOLONG,test_yaffs_stat_ENAMETOOLONG_clean,"test_yaffs_stat_ENAMETOOLONG"},
	{test_yaffs_stat_NULL,test_yaffs_stat_NULL_clean,"test_yaffs_stat_NULL"},

	{test_yaffs_fstat,test_yaffs_fstat_clean,"test_yaffs_fstat"},
	{test_yaffs_fstat_EBADF,test_yaffs_fstat_EBADF_clean,"test_yaffs_fstat_EBADF"},

	{test_yaffs_ftruncate,test_yaffs_ftruncate_clean,"test_yaffs_ftruncate"},
	{test_yaffs_ftruncate_EBADF,test_yaffs_ftruncate_EBADF_clean,"test_yaffs_ftruncate_EBADF"},
	{test_yaffs_ftruncate_EINVAL,test_yaffs_ftruncate_EINVAL_clean,"test_yaffs_ftruncate_EINVAL"},
	{test_yaffs_ftruncate_big_file,test_yaffs_ftruncate_big_file_clean,"test_yaffs_ftruncate_big_file"},
	{test_yaffs_ftruncate_EROFS,test_yaffs_ftruncate_EROFS_clean,"test_yaffs_ftruncate_EROFS"},

	{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"},
	{test_yaffs_truncate_ENOENT2,test_yaffs_truncate_ENOENT2_clean,"test_yaffs_truncate_ENOENT2"},
	{test_yaffs_truncate_ELOOP,test_yaffs_truncate_ELOOP_clean,"test_yaffs_truncate_ELOOP"},
	{test_yaffs_truncate_ELOOP_dir,test_yaffs_truncate_ELOOP_dir_clean,"test_yaffs_truncate_ELOOP_dir"},
	{test_yaffs_truncate_EROFS,test_yaffs_truncate_EROFS_clean,"test_yaffs_truncate_EROFS"},
	{test_yaffs_truncate_ENAMETOOLONG,test_yaffs_truncate_ENAMETOOLONG_clean,"test_yaffs_truncate_ENAMETOOLONG"},
	{test_yaffs_truncate_NULL,test_yaffs_truncate_NULL_clean,"test_yaffs_truncate_NULL"},
//	{test_yaffs_truncate_big_file,test_yaffs_truncate_big_file_clean,"test_yaffs_truncate_big_file"}, //this test does not work because the large number becomes 0 when the file is compiled.

	{test_yaffs_chmod,test_yaffs_chmod_clean,"test_yaffs_chmod"},
	{test_yaffs_chmod_ENOENT,test_yaffs_chmod_ENOENT_clean,"test_yaffs_chmod_ENOENT"},
	{test_yaffs_chmod_ENOTDIR,test_yaffs_chmod_ENOTDIR_clean,"test_yaffs_chmod_ENOTDIR"},
	{test_yaffs_chmod_EINVAL,test_yaffs_chmod_EINVAL_clean,"test_yaffs_chmod_EINVAL"},
	{test_yaffs_chmod_ELOOP_dir,test_yaffs_chmod_ELOOP_dir_clean,"test_yaffs_chmod_ELOOP_dir"},
	{test_yaffs_chmod_ELOOP,test_yaffs_chmod_ELOOP_clean,"test_yaffs_chmod_ELOOP"},
	{test_yaffs_chmod_EROFS,test_yaffs_chmod_EROFS_clean,"test_yaffs_chmod_EROFS"},
	{test_yaffs_chmod_ENAMETOOLONG,test_yaffs_chmod_ENAMETOOLONG_clean,"test_yaffs_chmod_ENAMETOOLONG"},
	{test_yaffs_chmod_NULL,test_yaffs_chmod_NULL_clean,"test_yaffs_chmod_NULL"},

	{test_yaffs_fchmod,test_yaffs_fchmod_clean,"test_yaffs_fchmod"},
	{test_yaffs_fchmod_EBADF,test_yaffs_fchmod_EBADF_clean,"test_yaffs_fchmod_EBADF"},
	{test_yaffs_fchmod_EINVAL,test_yaffs_fchmod_EINVAL_clean,"test_yaffs_fchmod_EINVAL"},
	{test_yaffs_fchmod_EROFS,test_yaffs_fchmod_EROFS_clean,"test_yaffs_fchmod_EROFS"},
	{test_yaffs_fchmod_NULL,test_yaffs_fchmod_NULL_clean,"test_yaffs_fchmod_NULL"},

	{test_yaffs_fsync,test_yaffs_fsync_clean,"test_yaffs_fsync"},
	{test_yaffs_fsync_EBADF,test_yaffs_fsync_EBADF_clean,"test_yaffs_fsync_EBADF"},
	{test_yaffs_fsync_EROFS,test_yaffs_fsync_EROFS_clean,"test_yaffs_fsync_EROFS"},

	{test_yaffs_fdatasync,test_yaffs_fdatasync_clean,"test_yaffs_fdatasync"},
	{test_yaffs_fdatasync_EBADF,test_yaffs_fdatasync_EBADF_clean,"test_yaffs_fdatasync_EBADF"},
	{test_yaffs_fdatasync_EROFS,test_yaffs_fdatasync_EROFS_clean,"test_yaffs_fdatasync_EROFS"},
	{test_yaffs_fdatasync_NULL,test_yaffs_fdatasync_NULL_clean,"test_yaffs_fdatasync_NULL"},

	{test_yaffs_mkdir,test_yaffs_mkdir_clean,"test_yaffs_mkdir"},
	{test_yaffs_mkdir_EEXIST,test_yaffs_mkdir_EEXIST_clean,"test_yaffs_mkdir_EEXIST"},
	{test_yaffs_mkdir_ENOTDIR,test_yaffs_mkdir_ENOTDIR_clean,"test_yaffs_mkdir_ENOTDIR"},
	{test_yaffs_mkdir_ENOENT,test_yaffs_mkdir_ENOENT_clean,"test_yaffs_mkdir_ENOENT"},
	{test_yaffs_mkdir_ELOOP_dir,test_yaffs_mkdir_ELOOP_dir_clean,"test_yaffs_mkdir_ELOOP_dir"},
	{test_yaffs_mkdir_EROFS,test_yaffs_mkdir_EROFS_clean,"test_yaffs_mkdir_EROFS"},
	{test_yaffs_mkdir_ENAMETOOLONG,test_yaffs_mkdir_ENAMETOOLONG_clean,"test_yaffs_mkdir_ENAMETOOLONG"},
	{test_yaffs_mkdir_NULL,test_yaffs_mkdir_NULL_clean,"test_yaffs_mkdir_NULL"},


	{test_yaffs_symlink,test_yaffs_symlink_clean,"test_yaffs_symlink"},
	{test_yaffs_symlink_ENOTDIR,test_yaffs_symlink_ENOTDIR_clean,"test_yaffs_symlink_ENOTDIR"},
	{test_yaffs_symlink_EEXIST,test_yaffs_symlink_EEXIST_clean,"test_yaffs_symlink_EEXIST"},
	{test_yaffs_symlink_ENOENT,test_yaffs_symlink_ENOENT_clean,"test_yaffs_symlink_ENOENT"},
	{test_yaffs_symlink_ENOENT2,test_yaffs_symlink_ENOENT2_clean,"test_yaffs_symlink_ENOENT2"},
	{test_yaffs_symlink_ELOOP_dir,test_yaffs_symlink_ELOOP_dir_clean,"test_yaffs_symlink_ELOOP_dir"},
	{test_yaffs_symlink_EROFS,test_yaffs_symlink_EROFS_clean,"test_yaffs_symlink_EROFS"},
	{test_yaffs_symlink_ENAMETOOLONG,test_yaffs_symlink_ENAMETOOLONG_clean,"test_yaffs_symlink_ENAMETOOLONG"},
	{test_yaffs_symlink_NULL,test_yaffs_symlink_NULL_clean,"test_yaffs_symlink_NULL"},
	{test_yaffs_symlink_NULL2,test_yaffs_symlink_NULL2_clean,"test_yaffs_symlink_NULL2"},

	{test_yaffs_mount2,test_yaffs_mount2_clean,"test_yaffs_mount2"},
	{test_yaffs_mount2_ENODEV,test_yaffs_mount2_ENODEV_clean,"test_yaffs_mount2_ENODEV"},
	

	{test_yaffs_unmount2,test_yaffs_unmount2_clean,"test_yaffs_unmount2"},
	{test_yaffs_unmount2_ENODEV,test_yaffs_unmount2_ENODEV_clean,"test_yaffs_unmount2_ENODEV"},
	{test_yaffs_unmount2_EINVAL,test_yaffs_unmount2_EINVAL_clean,"test_yaffs_unmount2_EINVAL"},
{test_yaffs_unmount2_with_handle_open_and_forced_mode_on,test_yaffs_unmount2_with_handle_open_and_forced_mode_on_clean,"test_yaffs_unmount2_with_handle_open_and_forced_mode_on"},
{test_yaffs_unmount2_with_handle_open_and_forced_mode_off,test_yaffs_unmount2_with_handle_open_and_forced_mode_off_clean,"test_yaffs_unmount2_with_handle_open_and_forced_mode_off"},
	{test_yaffs_unmount_NULL,test_yaffs_unmount_NULL_clean,"test_yaffs_unmount_NULL"},

	{test_yaffs_sync,test_yaffs_sync_clean,"test_yaffs_sync"},
	{test_yaffs_sync_ENODEV,test_yaffs_sync_ENODEV_clean,"test_yaffs_sync_ENODEV"},
	{test_yaffs_sync_EROFS,test_yaffs_sync_EROFS_clean,"test_yaffs_sync_EROFS"},
	{test_yaffs_sync_ENAMETOOLONG,test_yaffs_sync_ENAMETOOLONG_clean,"test_yaffs_sync_ENAMETOOLONG"},
	{test_yaffs_sync_NULL,test_yaffs_sync_NULL_clean,"test_yaffs_sync_NULL"},


	{test_yaffs_remount_force_off_read_only_off,test_yaffs_remount_force_off_read_only_off_clean,"test_yaffs_remount_force_off_read_only_off"},
{test_yaffs_remount_force_on_read_only_off,test_yaffs_remount_force_on_read_only_off_clean,"test_yaffs_remount_force_on_read_only_off"},
	{test_yaffs_remount_ENODEV,test_yaffs_remount_ENODEV_clean,"test_yaffs_remount_ENODEV"},
	{test_yaffs_remount_EINVAL,test_yaffs_remount_EINVAL_clean,"test_yaffs_remount_EINVAL"},
	{test_yaffs_remount_ENAMETOOLONG,test_yaffs_remount_ENAMETOOLONG_clean,"test_yaffs_remount_ENAMETOOLONG"},
	{test_yaffs_remount_NULL,test_yaffs_remount_NULL_clean,"test_yaffs_remount_NULL"},

	{test_yaffs_freespace,test_yaffs_freespace_clean,"test_yaffs_freespace"},
	{test_yaffs_freespace_EINVAL,test_yaffs_freespace_EINVAL_clean,"test_yaffs_freespace_EINVAL"},
	{test_yaffs_freespace_ENAMETOOLONG,test_yaffs_freespace_ENAMETOOLONG_clean,"test_yaffs_freespace_ENAMETOOLONG"},
	{test_yaffs_freespace_NULL,test_yaffs_freespace_NULL_clean,"test_yaffs_freespace_NULL"},

	{test_yaffs_totalspace,test_yaffs_totalspace_clean,"test_yaffs_totalspace"},
	{test_yaffs_totalspace_EINVAL,test_yaffs_totalspace_EINVAL_clean,"test_yaffs_totalspace_EINVAL"},
	{test_yaffs_totalspace_ENAMETOOLONG,test_yaffs_totalspace_ENAMETOOLONG_clean,"test_yaffs_totalspace_ENAMETOOLONG"},
	{test_yaffs_totalspace_NULL,test_yaffs_totalspace_NULL_clean,"test_yaffs_totalspace_NULL"},

	{test_yaffs_inodecount,test_yaffs_inodecount_clean,"test_yaffs_inodecount"},
	{test_yaffs_inodecount_EINVAL,test_yaffs_inodecount_EINVAL_clean,"test_yaffs_inodecount_EINVAL"},
	{test_yaffs_inodecount_ENAMETOOLONG,test_yaffs_inodecount_ENAMETOOLONG_clean,"test_yaffs_inodecount_ENAMETOOLONG"},
	{test_yaffs_inodecount_NULL,test_yaffs_inodecount_NULL_clean,"test_yaffs_inodecount_NULL"},

	{test_yaffs_link,test_yaffs_link_clean,"test_yaffs_link"},
	{test_yaffs_link_ENOENT,test_yaffs_link_ENOENT_clean,"test_yaffs_link_ENOENT"},
	{test_yaffs_link_EEXIST,test_yaffs_link_EEXIST_clean,"test_yaffs_link_EEXIST"},
	{test_yaffs_link_ENOTDIR,test_yaffs_link_ENOTDIR_clean,"test_yaffs_link_ENOTDIR"},
	{test_yaffs_link_ENOTDIR2,test_yaffs_link_ENOTDIR2_clean,"test_yaffs_link_ENOTDIR2"},
	{test_yaffs_link_ENOENT2,test_yaffs_link_ENOENT2_clean,"test_yaffs_link_ENOENT2"},
	{test_yaffs_link_ENOENT3,test_yaffs_link_ENOENT3_clean,"test_yaffs_link_ENOENT3"},
	{test_yaffs_link_ENOENT4,test_yaffs_link_ENOENT4_clean,"test_yaffs_link_ENOENT4"},
	{test_yaffs_link_ELOOP_dir,test_yaffs_link_ELOOP_dir_clean,"test_yaffs_link_ELOOP_dir"},
	{test_yaffs_link_EROFS,test_yaffs_link_EROFS_clean,"test_yaffs_link_EROFS"},
	{test_yaffs_link_ENAMETOOLONG,test_yaffs_link_ENAMETOOLONG_clean,"test_yaffs_link_ENAMETOOLONG"},
	{test_yaffs_link_ENAMETOOLONG2,test_yaffs_link_ENAMETOOLONG2_clean,"test_yaffs_link_ENAMETOOLONG2"},
	{test_yaffs_link_NULL,test_yaffs_link_NULL_clean,"test_yaffs_link_NULL"},
	{test_yaffs_link_NULL2,test_yaffs_link_NULL2_clean,"test_yaffs_link_NULL2"},

	{test_yaffs_rmdir,test_yaffs_rmdir_clean,"test_yaffs_rmdir"},
	{test_yaffs_rmdir_EBUSY,test_yaffs_rmdir_EBUSY_clean,"test_yaffs_rmdir_EBUSY"},
	{test_yaffs_rmdir_EINVAL,test_yaffs_rmdir_EINVAL_clean,"test_yaffs_rmdir_EINVAL"},
	{test_yaffs_rmdir_ENOENT,test_yaffs_rmdir_ENOENT_clean,"test_yaffs_rmdir_ENOENT"},
	{test_yaffs_rmdir_ENOTDIR,test_yaffs_rmdir_ENOTDIR_clean,"test_yaffs_rmdir_ENOTDIR"},
	{test_yaffs_rmdir_ELOOP_dir,test_yaffs_rmdir_ELOOP_dir_clean,"test_yaffs_rmdir_ELOOP_dir"},
	{test_yaffs_rmdir_EROFS,test_yaffs_rmdir_EROFS_clean,"test_yaffs_rmdir_EROFS"},
	{test_yaffs_rmdir_ENAMETOOLONG,test_yaffs_rmdir_ENAMETOOLONG_clean,"test_yaffs_rmdir_ENAMETOOLONG"},
	{test_yaffs_rmdir_ENOTEMPTY,test_yaffs_rmdir_ENOTEMPTY_clean,"test_yaffs_rmdir_ENOTEMPTY"},

	{test_yaffs_stat_ELOOP_dir,test_yaffs_stat_ELOOP_dir_clean,"test_yaffs_stat_ELOOP_dir"},

	{test_yaffs_rename,test_yaffs_rename_clean,"test_yaffs_rename"},
	{test_yaffs_rename_ENOENT,test_yaffs_rename_ENOENT_clean,"test_yaffs_rename_ENOENT"},
	{test_yaffs_rename_ENOTDIR,test_yaffs_rename_ENOTDIR_clean,"test_yaffs_rename_ENOTDIR"},
	{test_yaffs_rename_EINVAL,test_yaffs_rename_EINVAL_clean,"test_yaffs_rename_EINVAL"},
	{test_yaffs_rename_dir,test_yaffs_rename_dir_clean,"test_yaffs_rename_dir"},
	{test_yaffs_rename_dir_ENOENT,test_yaffs_rename_dir_ENOENT_clean,"test_yaffs_rename_dir_ENOENT"},
	{test_yaffs_rename_dir_ENOENT2,test_yaffs_rename_dir_ENOENT2_clean,"test_yaffs_rename_dir_ENOENT2"},
	{test_yaffs_rename_dir_to_file,test_yaffs_rename_dir_to_file_clean,"test_yaffs_rename_dir_to_file"},
	{test_yaffs_rename_file_to_dir,test_yaffs_rename_file_to_dir_clean,"test_yaffs_rename_file_to_dir"},
	{test_yaffs_rename_EEXISTS,test_yaffs_rename_EEXISTS_clean,"test_yaffs_rename_EEXISTS"},
	{test_yaffs_rename_ELOOP_dir,test_yaffs_rename_ELOOP_dir_clean,"test_yaffs_rename_ELOOP_dir"},
	{test_yaffs_rename_EROFS,test_yaffs_rename_EROFS_clean,"test_yaffs_rename_EROFS"},
	{test_yaffs_rename_ENAMETOOLONG,test_yaffs_rename_ENAMETOOLONG_clean,"test_yaffs_rename_ENAMETOOLONG"},
	{test_yaffs_rename_ENAMETOOLONG2,test_yaffs_rename_ENAMETOOLONG2_clean,"test_yaffs_rename_ENAMETOOLONG2"},
	{test_yaffs_rename_NULL,test_yaffs_rename_NULL_clean,"test_yaffs_rename_NULL"},
	{test_yaffs_rename_NULL2,test_yaffs_rename_NULL2_clean,"test_yaffs_rename_NULL2"},

	{test_yaffs_lstat,test_yaffs_lstat_clean,"test_yaffs_lstat"},
	{test_yaffs_lstat_ENOENT,test_yaffs_lstat_ENOENT_clean,"test_yaffs_lstat_ENOENT"},
	{test_yaffs_lstat_ENOTDIR,test_yaffs_lstat_ENOTDIR_clean,"test_yaffs_lstat_ENOTDIR"},
	{test_yaffs_lstat_ENAMETOOLONG,test_yaffs_lstat_ENAMETOOLONG_clean,"test_yaffs_lstat_ENAMETOOLONG"},
	{test_yaffs_lstat_NULL,test_yaffs_lstat_NULL_clean,"test_yaffs_lstat_NULL"},

	{test_yaffs_flush,test_yaffs_flush_clean,"test_yaffs_flush"},
	{test_yaffs_flush_EBADF,test_yaffs_flush_EBADF_clean,"test_yaffs_flush_EBADF"},
	{test_yaffs_flush_EROFS,test_yaffs_flush_EROFS_clean,"test_yaffs_flush_EROFS"},

	{test_yaffs_dup,test_yaffs_dup_clean,"test_yaffs_dup"},
	{test_yaffs_dup_EBADF,test_yaffs_dup_EBADF_clean,"test_yaffs_dup_EBADF"},

	};

void logical_run_of_tests(void);
void init_quick_tests(int argc, char *argv[]);
void quit_quick_tests(int exit_code);
void get_error(void);
void run_random_test_loop(void);
void run_test(int x);
#endif