summaryrefslogtreecommitdiff
path: root/tests/fs-tests
AgeCommit message (Collapse)Author
2011-04-18fs-tests: integck: shrink write_info even moreArtem Bityutskiy
The 'struct write_info' data strucutre records information about truncation, and has a separate integer field to specify if this is a truncation or not. But it is too wasteful because we have huge amount of these objects. But it is easy to notice that the 'random_seed' field is not used for truncation records, so we can use that as the truncation flag. This patch introduces MAX_RANDOM_SEED macro and when the 'random_seed' field is greater than that, we treat it as the truncation flag. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-18fs-tests: integck: abuse random_offset field nicerArtem Bityutskiy
Currently integck uses the 'random_offset' filed to store the new file length sometimes, thus abusing this field. But we can do this nicer - introduce an anonymous union and add 'new_length' filed which will be used instead of 'random_offset' to make the code look nicer. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-18fs-tests: integck: srink file_info structure even moreArtem Bityutskiy
The 'check_run_no' field does not have to be 64-bit, it can be 32-bit instead and we can save 4 bytes per object. Actually, it could also be 16-bit, and we could make link_count 16-bit as well, but that would need a bit more work. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-18fs-tests: integck: shrink file_info structure sizeArtem Bityutskiy
We do not have to store boolean flags in 'int' variables which consume 4 bytes each, we can store those in bit-fields instead. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-18fs-tests: integck: shrink dir_entry_info structure sizeArtem Bityutskiy
Turn "int checked" flag into 'char' flag to lessen memory consumption a bit. Indeed, the test allocates a lot of these data objects, so the size decrease from 36 to 32 bytes on 32-bit platforms is good to have. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-14tests: fs-tests: read() returns ssize_t valueAndy Shevchenko
Use ssize_t instead of size_t. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: use common printing macrosArtem Bityutskiy
Instead of using printf() directly, use the shared mtd-utils printing macros. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: include the common mtd-utils headerArtem Bityutskiy
Include the commong mtd-utils "common.h" header in integck test to make it possible to use shared macros. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: remove unnecessary checkArtem Bityutskiy
The 'link_new()' function has only one user, and the user checks that the third 'file' argument is non NULL, so remove this check from 'link_new()'. Let's be consistent and assume the 3rd argument is never NULL, just like the first and the second ones. This is just a minor improvement. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: simplify dir_entry_info fieldsArtem Bityutskiy
Instead of using named union 'entry' in 'struct dir_entry_info' and having to type long 'entry->entry.file', 'entry->entry.symlink', etc, use anonymous union which makes the syntax simpler: 'entry->file', 'entry->symlink', etc. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: do not cast void pointersArtem Bityutskiy
The malloc function returns 'void *', so it is not necessary to cast it when assigning. This is just a small clean-up patch. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-11fs-tests: integck: introduce zallocArtem Bityutskiy
The integck test often allocates memory and fills it with zeroes. Introduce a helper function for this frequent operation. This is just a clean-up patch which makes the code 23 lines shorter. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-09fs_tests: make the test-suite finish fasterArtem Bityutskiy
Currently the stress tests may run up to 1 hour, make the limit to be 6 minutes instead. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-05tests: fs-tests: check return value of functionsAndy Shevchenko
chdir() returns negative value in case of error. fscanf() returns amount of successfully parsed parameters. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-03-24fs-tests: integck: improve re-mounting test coverageArtem Bityutskiy
The integck tests re-mounts the file-system from time to time and checks the integrity afterwords. And it re-mounts always the same-way: unmount and then mount R/W back. However, it is better to do it differently some times, e.g.: * re-mount R/O then re-mount R/W * unmount then mount R/W * both of the above * unmount, mount R/O, then re-mount R/W * etc. This will give better test coverage. This patch does exactly that by improving the 'tests_remount()' function. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-03-24fs-tests: perf: fix compilation warningArtem Bityutskiy
Fix the following compilation warning: perf.c: In function ‘perf’: perf.c:144: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘int64_t’ by adding a (long long int) cast. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-03-24fs-tests: test_1: fix compilation warningsArtem Bityutskiy
Fix the following compilation warnings: test_1.c: In function ‘test_1’: test_1.c:67:4: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ test_1.c:88:3: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ The fix is to cast the argument with (unsigned long long). Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-01-14fs-tests: fix remounting in integckArtem Bityutskiy
Teach integck properly save original mount options. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-08fs-tests: also preserve mount options when mounting againAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: allow for symlink name too long in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: fix max file name length in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: fix symlink bug in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-06-17fs-tests: fix rename bug in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: add symlinks to integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: check link count in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: add rename to integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: add linking/unlinking to integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: make integrity test shrink fasterAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: add mmapping to integrity test for ubifsAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: preserve mount options when mounting againAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: stop integrity test looping foreverAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: fix bug in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: add simple performance testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: make integrity test record truncationsAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: make integrity test shrink betterAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-06-16fs-tests: allow for ENOSPC in test fwrite00Adrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2008-02-19Revert ubi-tools changesArtem Bityutskiy
Restore ubi tools to their "original" state, which means to the state they were before I stareted cleaning them up. Instead, create a "new-utils" subdirectory and move my work there. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-09-17fs-tests: fix bug in simple test_2Adrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-09-11Add test program orph.cAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-07-18Add more information to integrity test error messageAdrian Hunter
When the integrity test encounters a file that does not contain the expected data, it lists the data that it expected to find in terms of writes to the file. Now the test also displays a list of "raw" writes that includes writes that have been truncated away, or completely overwritten by other writes. The test also now displays the pid because it is used as the initial random seed. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2007-07-18Correct integrity test calculations of free spaceAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2007-07-18Amend tests not to insist that file system type is JFFS2Adrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
2007-03-15Add fs-tests from Adrian HunterAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>