Age | Commit message (Collapse) | Author |
|
This patch brings common Makefile (in terms of mtd-utils project) to the
checkfs test suite. Additionally it fixes a build error related to usage of
open().
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
Instead of using printf() directly, use the shared mtd-utils printing
macros.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This patch appends Makefile to the tests subdirectory and introduces tests
target in the root Makefile.
Additionally the clean target removes temporary stuff under tests subdirectory
as well.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
- time() was used without prototype.
- the return value of read() and write() wasn't checked
- classificator in printf() was wrong for argument of size_t type
Don't continue to read the /proc/profile in case when write was failed.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
The sys_errlist[errno] is deprecated. We should use strerror(errno) instead.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
There are two warnings:
- strlen() is used without prototype
- argument of printf() is unsigned long, but used specifier is for int
This patch fixes them.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
"fileds" is "fields"
Signed-off-by: Brian Norris <norris@broadcom.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add a common seed_random_generator() and make tests use it
for seeding the random generator.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Just like we have in ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Just like we do in ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
For consistency with ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Mostly improvments in io_paral.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Teach integck properly save original mount options.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|