Commit Graph

9341 Commits

Author SHA1 Message Date
Karel Zak d7030b0441 docs: document --exclude for tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-26 13:00:24 +01:00
Ruediger Meier f1e744f283 tests: add documentation about environment variables
Introduced in 8e3ac29e, now advertised :)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-26 12:17:39 +01:00
Ruediger Meier d06aed236e tests: verify logger return value
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-26 12:17:39 +01:00
Ruediger Meier ba51d3f453 tests: avoid &>> for bash compatibility
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-26 12:17:38 +01:00
Ruediger Meier ae9f65a191 tests: fix getopt for old glibc
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-26 12:17:38 +01:00
Karel Zak b2ae8c571b build-sys: python is optional, don't fail when missing
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-26 12:09:50 +01:00
Karel Zak 43cc76e263 build-sys: ncurses is optional, don't fail when missing
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-26 11:50:15 +01:00
Karel Zak c8aa62a8dc tests: add --exclude=<list> for run.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 19:32:22 +01:00
Karel Zak 15eba21796 build-sys: support static build with readline
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 17:55:22 +01:00
Karel Zak 87db0047ea tests: more(1) depends on terminal, force to TERM=linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 17:36:28 +01:00
Karel Zak 6a7a5eac34 docs: remove obsolete things from TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 16:09:32 +01:00
Karel Zak 7159b496d5 sfdisk: add readline support
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 16:06:39 +01:00
Karel Zak 84ab260aa2 fdisk: fix readline wrapper
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 16:06:26 +01:00
Karel Zak 5cdbe36fbc libfdisk: add fgets() callback for scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 16:05:14 +01:00
Karel Zak 310399cafe libfdisk: fix symbols versioning script
Really stupid copy & past mistake. The libfdisk symbols should not be
prefixed by MOUNT_ suffix.

This change makes binaries linked with libfdisk 2.26 incompatible with
new libfdisk. Fortunately, 2.26 has been the first release and very
probably the library has been used for util-linux fdisks only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 11:32:00 +01:00
Karel Zak 740c36f657 fdisk: add GNU Readline support to fdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 10:31:37 +01:00
Ondrej Oprala 0273afda3c build-sys: add --with-readline
[kzak@redhat.com: - define READLINE_LIBS]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 10:26:40 +01:00
Stanislav Brabec d1bba731c6 fsck: fix fsck -C {fd} parsing
Both fsck(8) and fsck --help documents progress bar redirection as
-C {fd}

This did not work, and only -C{fd} and "-C {fd}" worked.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 09:26:23 +01:00
Karel Zak 9c6f3de60f libfdisk: (gpt) check header size before verify CRC
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780834
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-23 12:03:30 +01:00
Karel Zak 5a34fb8a07 dmesg: use GMT in tests, add DMESG_TEST_BOOTIME
We don't want to hardcode anything to the test, just use
env.variable DMESG_TEST_BOOTIME.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-23 11:40:59 +01:00
Karel Zak 98e90a4901 logger: fix LOGGER_TEST_TIMEOFDAY check
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-23 11:40:45 +01:00
Sami Kerola 711ebe0e6b tests: check dmesg message coloring
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-23 10:34:49 +01:00
Sami Kerola acc57d8f38 tests: check timestamp formats
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-23 10:34:49 +01:00
Sami Kerola 5fac518cef tests: add test_dmesg that has fixed boot time
This allows testing time stamp formats.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-23 10:34:49 +01:00
Sami Kerola fa69a8b94f tests: add dmesg multiline message check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-23 10:34:49 +01:00
Sami Kerola f1300e2cea dmesg: fix shadow declaration
sys-utils/dmesg.c:650:9: warning: declaration of 's' shadows a previous local [-Wshadow]
sys-utils/dmesg.c:619:12: warning: shadowed declaration is here [-Wshadow]

And since the code had to be touched deprecate loop printing one character
at a time, in favour of printf and instruction to repeat spaces the number
required.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-23 10:34:49 +01:00
Karel Zak f0f22e9c6f unshare: add --propagation, use MS_PRIVATE by default
After "unshare --mount" users assume that mount operations within the
new namespaces are unshared (invisible for the rest of the system).

Unfortunately, this is not true and the behavior depends on the
current mount propagation setting. The kernel default is "private",
but for example systemd based distros use "shared". The solution is to
use (for example) "mount --make-private" after unshare(1).

I have been requested many times to provide less fragile and more
unified unshared mount setting *by default* to make things user
friendly.

The patch forces unshare(1) to explicitly use MS_REC|MS_PRIVATE for all
tree by default.

We can use something less (e.g MS_SLAVE), but "private" is the kernel
default, so for many users this change (feature) will be invisible.

This feature is possible to disable by "--propagation unchanged" or it's
possible to specify another propagation flag, supported are:

	<slave|shared|private|unchanged>

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-23 10:12:48 +01:00
Karel Zak 355ee3b898 nsenter: add -Z to set selinux context
The new context is copied from --target <PID>. This solution allows to
keep SELinux happy when you enter container by nsenter(1).

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1116100
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-20 15:39:38 +01:00
Karel Zak 8b5b94685b mount: don't remount read-only on --bind
mount(8) tries to mount read-only when the previous attempt ends with
EROFS or EACCES. This is bad idea for bind mounts as "ro,bind" has
a special semantic.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-20 12:42:33 +01:00
Karel Zak 172d6eed1b tests: remove private2 dir from mount/move
The directory is unnecessary, all we need is to create from "private"
directory a mount point (so "--bind $DIR_PRIVATE $DIR_PRIVATE").

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-20 11:05:42 +01:00
Ruediger Meier bb3df8218b tests: some more mount error handling
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-19 17:12:15 +01:00
Ruediger Meier d38c04261d tests: more error handling in mount/move (refactor)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-19 17:12:00 +01:00
Ruediger Meier 51d455ce16 tests: mount/move also tests findmnt vs. mountpoint
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-19 17:11:43 +01:00
Karel Zak 0009f510cb findmnt: add --mountpoint command line option
The current --target <path> implementation check the <path> elements in
reverse order to get the mountpoint. The feature may be inwanted in
some cases when we really want to check for mountpoint specified by
the <path>. The new option "--mountpoint <path>" allows to be strict.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-19 12:12:21 +01:00
Karel Zak 8ba3f35e07 tests: start script/race test only when --force specified
The test generates 1000 processes and it seems too invasive for
test/build machines and containers.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-19 12:06:35 +01:00
J William Piggott a0e215fb2d hwclock: non-root access in test mode
Allow a non-root user to call all hwclock
functions when the --test option is used.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-17 10:17:26 -04:00
J William Piggott a36a9026ea hwclock: increase debug output precision
Increased the precision in debug output showing
the clock drift and the time lapsed.

Showing a clock drift of 0.0 while giving a value that the
drift factor was adjusted by makes no sense.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-03-17 10:17:26 -04:00
Karel Zak 266f856260 travis: add MAKE_CHECK_OPTS
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 12:03:28 +01:00
Karel Zak d995c2f082 tests: add --skip-loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 11:34:22 +01:00
Karel Zak f586080352 Merge branch 'drone-ci' of https://github.com/rudimeier/util-linux 2015-03-17 11:25:57 +01:00
Karel Zak ec4fe40b59 tests: use ts_skip for logger/journald
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 11:21:39 +01:00
Karel Zak 95305cec15 Since 569d1dac7b we read device start
sector from the /sys/block/.../start file. The file exists only for
partitions, for wholedisk is the start of the device always zero.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1202443
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 11:10:20 +01:00
Karel Zak 8979e7024e hwclock: cosmetic changes to man page
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 10:55:46 +01:00
Karel Zak 8e96dfa2c8 Merge branch 'hwman312' of https://github.com/jwpi/util-linux 2015-03-17 10:37:13 +01:00
Karel Zak 4230d576fd build-sys: add new compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 10:15:50 +01:00
Karel Zak bd0673f95a Merge branch 'tests_logger' of https://github.com/kerolasa/lelux-utiliteetit 2015-03-17 10:01:35 +01:00
Ruediger Meier 3e64a01e28 tests: remove warning from test output
This was added in 3f8478a7 but it's only printed in --help.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-17 09:59:10 +01:00
Sami Kerola cf92286084 libblkid: fix compiler warnings
warning: extra ';' outside of a function [-Wextra-semi]

warning: embedding a directive within macro arguments has undefined
behavior [-Wembedded-directive]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-16 23:43:24 +00:00
Sami Kerola a0fd24e070 tests: add logger(1) journald test
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-16 23:42:57 +00:00
Sami Kerola b3d4c9862c tests: add logger(1) error condition tests
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-16 23:25:10 +00:00