summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: fix some compiler warningsRuediger Meier2014-05-301-1/+1
| | | | | | | | | | | | Most of them catched on 32bit gcc and icc. disk-utils/fsck.cramfs.c: printf format type lib/boottime.c: unused variables misc-utils/cal.c: set but never used sys-utils/losetup.c: set but never used sys-utils/lscpu-dmi.c: defined but not used sys-utils/switch_root.c: comparison between signed and unsigned tests/helpers/test_sysinfo.c: printf format type
* tests: split off losetup scsi_debug partRuediger Meier2014-05-275-61/+90
| | | | | | | It's a pity that we would skip the whole test if scsi_debug is not available. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix, typo schedutils/cpusetRuediger Meier2014-05-271-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: run tests in deterministic orderRuediger Meier2014-05-271-0/+1
| | | | | | | Not really needed but it makes debugging of existing build logs much more easier. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ts_scsi_debug_init skip instead of dieRuediger Meier2014-05-271-6/+14
| | | | | | | | | | | | | | | If any of these modprobe commands fails then it's not a broken test. ALso ts_die often does not work correctly from subtests which should be fixed someday too. BTW modprobe dry-run (even the real modprobe) is not reliable. Moreover now we respect blacklisted modules (-b). This error handling is not only useful to let the test-suite succeed on broken systems but also to not fail all "scsi_debug tests" after just one of them failed to umount something. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'setarch' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-261-0/+11
|\ | | | | | | | | | | * 'setarch' of https://github.com/rudimeier/util-linux: setarch: add shortcut binary uname26 setarch: flush output streams before exec
| * setarch: flush output streams before execRuediger Meier2014-05-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following (non-deterministic) discrepancy: $ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success Switching on READ_IMPLIES_EXEC. Switching on ADDR_LIMIT_32BIT. Switching on SHORT_INODE. Switching on WHOLE_SECONDS. Switching on STICKY_TIMEOUTS. Switching on ADDR_LIMIT_3GB. Switching on UNAME26. success $ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success &> /tmp/bla; cat /tmp/bla success Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: skip umount-alltargets on regular mtabKarel Zak2014-05-261-0/+2
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove test_fsck.cramfs (reverts 6c32ae78)Ruediger Meier2014-05-191-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: refactor option -x/--extractRuediger Meier2014-05-191-4/+1Star
| | | | | | | | | | | | | | | | | We want to clean it up to compile it later per default (not only if defined INCLUDE_FS_TESTS). - Rename option --destination to --extract. - DIR argument is now optional because we want to keep the use case "test uncompression without writing files" ... but we don't want it always. - Remove shortopt -x because shortopts with optional args are evil. Changing the cmd interface is no compatibility issue here because all affected options errored out per default in past. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix fsck.cramfs for systems with certain page sizesRuediger Meier2014-05-191-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests, fix cramfs for systems with certain page sizesRuediger Meier2014-05-182-3/+6
| | | | | | | This is only a partial fix to get comparable image md5sums. fsck.cramfs still fails if system page size > 4096 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'tests-mount' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-164-4/+27
|\ | | | | | | | | | | | | | | * 'tests-mount' of https://github.com/rudimeier/util-linux: tests: use ts_mount for cramfs tests: ts_mount knows which fs is expected tests: ts_mount validates error message tests, add function ts_mount
| * tests: use ts_mount for cramfsRuediger Meier2014-05-162-2/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_mount knows which fs is expectedRuediger Meier2014-05-162-2/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_mount validates error messageRuediger Meier2014-05-161-3/+9
| | | | | | | | | | | | | | Skip only if mount reports a non-empty fs which is not available in /proc/filesystems. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests, add function ts_mountRuediger Meier2014-05-162-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to generalize mounts similar to how we do it already in minix/mkfs. Currently most of our other checks just fail if "fs not supported". Note that the new function checks a bit stronger than before in minix/mkfs. It respects mount's return value and stderr goes to $TS_OUTPUT too. It's a bit ugly that we write to $TS_OUTPUT from inside of the function. But if the caller would do it then we couldn't ts_skip and the whole function would be pointless. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: check for mkfs.ext{2,3,4}Ruediger Meier2014-05-1527-0/+29
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: consolidate some checks for commandsRuediger Meier2014-05-158-22/+21Star
| | | | | | | | | | | | | | | | | | | | | | Use ts_check_prog for mdadm, readelf, file, ntpdate, bc (mdadm was not always checked so far). There are some positive side-effects. We are using always $PATH now instead of randomly hardcoded /usr/bin, /sbin, etc. If we ever want to change this again, we should do this generically in ts_init. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add function ts_check_progRuediger Meier2014-05-151-0/+5
|/ | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Merge branch 'travis-root-checks-v2' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-1449-148/+217
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux: travis-ci: enable root checks travis-ci: minor cleanup and speedup tests: introduce TS_CMD_UUIDGEN (never use installed one) tests, don't write TS_DEVICE to stdout anymore tests: ts_scsi_debug_init must not run in a subshell tests: cleanup ts_scsi_debug_init tests: some more tests need loop support tests: ts_device_init requires loop support tests: use ts_check_losetup in losetup test tests: add function ts_check_losetup tests: ts_device_init remove useless error handling
| * tests: introduce TS_CMD_UUIDGEN (never use installed one)Ruediger Meier2014-05-135-4/+10
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests, don't write TS_DEVICE to stdout anymoreRuediger Meier2014-05-131-1/+0Star
| |
| * tests: ts_scsi_debug_init must not run in a subshellRuediger Meier2014-05-1317-130/+146
| | | | | | | | | | | | | | | | | | | | | | ts_skip and ts_die won't work from subshell. Now we simply use TS_DEVICE which is globally set in that function. I've made sure that we never change TS_DEVICE variable after we've got it. So we could use it again for cleanup on exit in ts_{finalize,die,skip} functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: cleanup ts_scsi_debug_initRuediger Meier2014-05-131-6/+7
| | | | | | | | | | | | | | | | Sort out global and local vars. Now we set TS_DEVICE globally to be use later. Skip really quiet if modprobe fails. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: some more tests need loop supportRuediger Meier2014-05-132-0/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_device_init requires loop supportRuediger Meier2014-05-1328-1/+28
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: use ts_check_losetup in losetup testRuediger Meier2014-05-131-0/+9
| | | | | | | | | | | | | | In losetup test we have to handle the special case that ts_check_losetup requires a working losetup binary. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add function ts_check_losetupRuediger Meier2014-05-131-0/+12
| | | | | | | | | | | | Unfortunately losetup -f does not return an error nowadays. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: ts_device_init remove useless error handlingRuediger Meier2014-05-121-7/+4Star
| | | | | | | | | | | | | | Don't know why we should deinit the empty string. This patch prepares further refactoring or error handling. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add .BE hexdump test results (from s390)Karel Zak2014-05-1423-0/+707
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests, script/race is known to failRuediger Meier2014-05-131-0/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: script/race would work with variable loop countRuediger Meier2014-05-132-2/+10
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: ipcs/limits2 is known to failRuediger Meier2014-05-131-0/+5
| | | | | | | | | | | | | | See github issue #51, comment 2 https://github.com/karelzak/util-linux/issues/51 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix hexdump for big endianRuediger Meier2014-05-132-1/+32
| | | | | | | | | | | | | | | | For now endianess dependent subtests have undefined output on BE systems until sombody re-checks this and provides expected output files with .BE suffix. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests, add missing output for hexdumpRuediger Meier2014-05-132-0/+41
| | | | | | | | | | | | One file was missing and one was too much. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix hexdump, add ts_finalizeRuediger Meier2014-05-131-0/+2
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: fix "KNOWN FAILED" for subtestsRuediger Meier2014-05-131-15/+12Star
|/ | | | | | | | | It didn't worked for tests with subtests. Here we consolidate both cases which fixes the issue by the way. This is basically a rewrite of 7641ccec. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* cytune: remove from util-linuxSami Kerola2014-05-1219-19/+0Star
| | | | | | | | | | | Assumption is there are not many who need this tool. Whom ever they might be the recommendation is to use the command from old util-linux release. Second reason to removal is difficulty to test hardware specific command when none of the active project members does not seem to have such. Basically the command has reached dead end what comes to maintainability of it. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check /proc availability, and go-around if it is incompleteSami Kerola2014-05-121-13/+17
| | | | | | | | | | | | | | | | | | Unavailability of /proc is fatal for kill, and continuing with the test in that case does not make sense as it will only mean false positive errors. Where /proc/<pid>/status file(s) does not exist the check will perform opportunistic sleep with assumption the test_sigreceive will be ready to be killed if it has some time to init. [kzak@redhat.com: - remove dependence on gawk, just use shell - fix typo in "test /proc"] CC: Ruediger Meier <sweet_f_a@gmx.de> Reference: https://travis-ci.org/rudimeier/util-linux/jobs/24561058 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'tests-features' of https://github.com/rudimeier/util-linuxKarel Zak2014-05-122-8/+44
|\ | | | | | | | | | | | | | | | | | | * 'tests-features' of https://github.com/rudimeier/util-linux: tests: style Makefile and make output tests: allow to add or override test suite options tests: add exit case "KNOWN FAILED" tests: fix var names tests: allow test options to be overridden by env tests: call ts_init_env as early as possible
| * tests: style Makefile and make outputRuediger Meier2014-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | We break long lines and make output sill looks nice with and without V=1. As a side effect we can now run make TS_COMMAND="true" to do nothing but building all check_PROGRAMS. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: allow to add or override test suite optionsRuediger Meier2014-05-121-1/+2
| | | | | | | | | | | | | | | | | | Now we can do something like this make check TS_OPTS="--fake --parallel=32" Note we still always set --parallel but the last one wins. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add exit case "KNOWN FAILED"Ruediger Meier2014-05-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | Now we can mark tests as known to be broken without bothering users with exit failure. In the build log this "KNOWN FAILED" may be interpreted as TODO ;) The main advantage of "known-fail" instead of just skipping is that we will still find the test diff. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: fix var namesRuediger Meier2014-05-101-2/+5
| | | | | | | | | | | | | | Translate "." and "-" to "_". We assume that nobody will add completely stupid test file names. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: allow test options to be overridden by envRuediger Meier2014-05-101-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specially for automated builds the user may want to have some fine granulated influence like export TS_OPT_libmount_verbose="yes" export TS_OPT_ipcs_fake="yes" export TS_OPT_ipcs_limits2_fake="no" if <big endian> then export TS_OPT_hexdump_fake="yes" fi make check Even for interactive developers this could be useful for example to debug just one particuar test while having a regular run with stress: TS_OPT_script_verbose="yes" \ TS_OPT_script_memcheck="yes" \ ../tests/run.sh --parallel=256 --srcdir=.. --builddir=. --nonroot Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: call ts_init_env as early as possibleRuediger Meier2014-05-101-7/+8
| | | | | | | | | | | | | | Soon we want to use some env vars within ts_has_option(). That's why we move some lines to make this possible. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | last: avoid leading "-" before "no logout"Ruediger Meier2014-05-101-1/+1
| | | | | | | | | | | | This affects option --time-format=notime. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: add test case for last -time-format=fullRuediger Meier2014-05-082-2/+22
|/ | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* column: inform user when multibyte conversion error occursSami Kerola2014-05-072-0/+31
| | | | | | | | | The column(1) read input until conversion error, and used incomplete input when outputing, that made at least me to wonder where the rest disappeared without explanation. IMHO it is better to fail immediately rather than do only half of the task. Signed-off-by: Sami Kerola <kerolasa@iki.fi>