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>
* '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-known' of https://github.com/rudimeier/util-linux:
tests, script/race is known to fail
tests: script/race would work with variable loop count
tests: ipcs/limits2 is known to fail
tests: fix hexdump for big endian
tests, add missing output for hexdump
tests: fix hexdump, add ts_finalize
tests: fix "KNOWN FAILED" for subtests
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>
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>
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>
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>
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>
The issue file escape sequences \4 and \6 prints the host IP when no
interface is specified. That's useless on some virtual machines where
gethostname()+getaddrinfo() returns 127.0.0.1.
The seems better to print IP of the "best" interface (UP, RUNNING, non-LOOPBACK)
and use gethostname() as painful fallback only.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1090935
Signed-off-by: Karel Zak <kzak@redhat.com>
* parse terminal-colors.d/*.scheme files, expected format is
<name> <color-sequence>
* supported color sequences:
- color name (e.g. "red")
- dir_colors compatible xx;yy (e.g. 01;31) where the sequence may
contains control chars like \e \a ..etc.
* scheme is parsed on demand
Signed-off-by: Karel Zak <kzak@redhat.com>