We don't control mount options in the mountinfo file and the options
depend on kernel version. It does not make sense to hardcode the
options in the expected outputs.
Note that libmount should be portable enough to be able to work with
all kernel versions. It seems better to check libmount functionality
than kernel mount options formatting.
Signed-off-by: Karel Zak <kzak@redhat.com>
Treat missing expected files as empty and let the test fail if
there is non-empty output.
Expected output may be missing in these cases:
1. forgot to commit the file after changing/adding a (sub)test
2. a bug in a test where we do tricks with TS_EXPECTED
3. and most notable if ts_die() is called before a subtest is
initialized, e.g. in ts_scsi_debug_init()
I always wondered why we don't treat this as FAILED. Now we do
so, ts_finalize and ts_gen_diff looks much cleaner now.
The change discovers that tests with subtest were ignoring the
"non-sub" expected files which had to be fixed. BTW we removed
any zero sized files.
Moreover now we respect diff's return value. In past all test
succeeded when diff was not able to write to diffdir, e.g. when
running tests as normal user after they run as root.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Sudo may login as group wheel or may use user's original group.
Note that group 0 is not named "root" on all Unix systems.
We have some more tests with similar issues but they are Linux-only
(losetup, scsi_debug). We don't fix them unless somebody complains.
BTW we use hexdump instead of md5sum.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This is to force the one-line results also for non-parallel case.
We are using it for travis auto-build and on other build farms.
Moreover you can set this (and any other) option globally by env
which is the only way to pass it to make distcheck.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Like in non-parallel case we are printing only one line per
(sub)test now. The output lines must contain the full test name
to be useful.
This patch does not change anything for the non-parallel output
format except a bit code cleanup.
BTW changed blkid/low-probe test description to have shorter
lines.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
For minix v2/v3 on big endian systems the inode number of the unwanted
".badblocks" file was not set to zero. This was introduced when v3 was
added in a2657ae3.
Actually it did not seem to cause any problems but since we zero it out
at all we should do it correctly. Now we zero out the whole directory
entry (inclusive ".badblocks" file name, also for v1). Unfortunately we
have to update the test data checksums.
CC: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
- move generic "check_minix_fs_type" tests to the top
- add some todos/notes about potential issues
- add "real" badblocks test (-l)
- don't check sed's but fsck's return value
- to see debian bug 773892 we would need "-f"
- add some more hexdumps
CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
These two problems should be fixed now:
- BSD awk only accepts 1-char field seperator
- ts_has_option() did not returned "yes" if an option was given
multiple times
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Add a new fstab tests which check loop mount of the same source multiple times
in multiple steps.
The test is currently failing, but it should not fail once the triggering bug
will be fixed.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Many tests do.
2>&1 >> $TS_OUTPUT
It redirects stdout to $TS_OUTPUT and stderr to stdout.
It could cause unintended ignoring of errors on strerr and false positive result
of the test.
Use
>> $TS_OUTPUT 2>&1
instead to redirect both stdout and stderr to $TS_OUTPUT.
Automatically created by:
cd tests/ts
sed -i 's:2>\&1 >> \$TS_OUTPUT:>> $TS_OUTPUT 2>\&1:g' $(fgrep -rl '2>&1 >> $TS_OUTPUT' .)
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
btrfs needs a special support in mount. Add a testcase for btrfs specific
problems.
Coverage:
352740e8: bind mounts pointing to btrfs
2cd28fc8: mounting default subvolume
d2f82678: use of "auto"
618a8814: use of "subvolid"
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
It's a pity a pity that we have to remove it. In past our test suite
could discover a kernel bug (4.4). But now they've changed optimal
iosizes on purpose.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
The reimplementation caused output to change in some corner cases, such as
how binary inputs, long lines with underscores, and white space trimming,
are handled.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Output formats are based on colcrt before recent asan fixes and magic
constant replace, that are the commits ee24ab6f1..70e3fcf29. It seems the
fixes caused unintentional, and not detected change to output format - which
to me means colcrt has a regression that got to be part of release v2.27.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
We set SA_SIGINFO flag, so we should not get NULL.
[tests/helpers/test_sigreceive.c:45] -> [tests/helpers/test_sigreceive.c:47]: (warning) Either the condition 'if(info)' is redundant or there is possible null pointer dereference: info.
The least annoying and most useful order is this one:
1. check for compiled UL commands
2. check for root
3. check for loop support
4. check for external progs
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
xz decompression creates sparse files if possible. This saves about 1G
disk space in build directory and a lot I/O and time.
BTW regarding compatibility ... CentOS 7 is the first system I've met
which does not install bzip2 but xz only by default.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>