diff options
author | Ruediger Meier | 2017-06-01 03:17:25 +0200 |
---|---|---|
committer | Ruediger Meier | 2017-06-01 10:28:02 +0200 |
commit | 398b3148bedee936ee0b012b3b6e82b20547f218 (patch) | |
tree | fbfa97f2b13aad6430d85b29e8760ca42e018114 /tests/ts | |
parent | build-sys: fix library order when linking (diff) | |
download | kernel-qcow2-util-linux-398b3148bedee936ee0b012b3b6e82b20547f218.tar.gz kernel-qcow2-util-linux-398b3148bedee936ee0b012b3b6e82b20547f218.tar.xz kernel-qcow2-util-linux-398b3148bedee936ee0b012b3b6e82b20547f218.zip |
tests: use stdbuf when stderr and stdout is randomly ordered
glibc seems to flush stdout before stderr.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts')
-rwxr-xr-x | tests/ts/misc/swaplabel | 3 | ||||
-rwxr-xr-x | tests/ts/rename/exit_codes | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/ts/misc/swaplabel b/tests/ts/misc/swaplabel index 646304508..f934b2179 100755 --- a/tests/ts/misc/swaplabel +++ b/tests/ts/misc/swaplabel @@ -20,6 +20,7 @@ ts_init "$*" ts_check_test_command "$TS_CMD_MKSWAP" ts_check_test_command "$TS_CMD_SWAPLABEL" +ts_check_prog "stdbuf" # fallocate does not work on most file systems function fallocate_or_skip() @@ -49,7 +50,7 @@ $TS_CMD_MKSWAP \ rm -f $IMAGE fallocate_or_skip $MIN_SWAP_SIZE $IMAGE -$TS_CMD_MKSWAP \ +stdbuf -oL -eL $TS_CMD_MKSWAP \ --label 1234567890abcdef \ --uuid 12345678-abcd-abcd-abcd-1234567890ab \ $IMAGE 2>&1 |\ diff --git a/tests/ts/rename/exit_codes b/tests/ts/rename/exit_codes index 37028162b..3d46120ac 100755 --- a/tests/ts/rename/exit_codes +++ b/tests/ts/rename/exit_codes @@ -22,6 +22,7 @@ TS_DESC="exit codes" ts_init "$*" ts_check_test_command "$TS_CMD_RENAME" +ts_check_prog "stdbuf" ts_cd "$TS_OUTDIR" touch rename_exit_codes.{1..2} @@ -32,7 +33,7 @@ $TS_CMD_RENAME -v codes values rename_exit_codes.? >> $TS_OUTPUT 2>&1 echo "EXIT_SUCCESS: $?" >> $TS_OUTPUT mkdir rename_exit_codes.2 -$TS_CMD_RENAME -v values codes rename_exit_values.? >> $TS_OUTPUT 2>&1 +stdbuf -oL -eL $TS_CMD_RENAME -v values codes rename_exit_values.? >> $TS_OUTPUT 2>&1 echo "RENAME_EXIT_SOMEOK: $?" >> $TS_OUTPUT rmdir rename_exit_codes.2 |