tests: remove unbuffered ts_run feature
It's unnecessary as stdout and stderr are split in the tests. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
18c1f9e643
commit
eb61e95f1c
|
@ -1,7 +1,4 @@
|
|||
mkswap: error: swap area needs to be at least 10 pages
|
||||
mkswap: <swapfile>: insecure permissions <perm>, 0600 suggested.
|
||||
Setting up swapspace version 1, size = 9 pages (9xPGSZ bytes)
|
||||
mkswap: Label was truncated.
|
||||
LABEL=1234567890abcde, UUID=12345678-abcd-abcd-abcd-1234567890ab
|
||||
LABEL: 1234567890abcde
|
||||
UUID: 12345678-abcd-abcd-abcd-1234567890ab
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
mkswap: error: swap area needs to be at least 10 pages
|
||||
mkswap: <swapfile>: insecure permissions <perm>, 0600 suggested.
|
||||
mkswap: Label was truncated.
|
|
@ -3,5 +3,4 @@ RENAME_EXIT_NOTHING: 4
|
|||
`rename_exit_codes.2' -> `rename_exit_values.2'
|
||||
EXIT_SUCCESS: 0
|
||||
`rename_exit_values.1' -> `rename_exit_codes.1'
|
||||
rename: rename_exit_values.2: rename to rename_exit_codes.2 failed: Is a directory
|
||||
RENAME_EXIT_SOMEOK: 2
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
rename: rename_exit_values.2: rename to rename_exit_codes.2 failed: Is a directory
|
|
@ -436,21 +436,6 @@ function ts_init_py {
|
|||
}
|
||||
|
||||
function ts_run {
|
||||
local UNBUFFERED=
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
--unbuffered)
|
||||
UNBUFFERED=1
|
||||
shift;;
|
||||
--)
|
||||
shift
|
||||
break;;
|
||||
*)
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
declare -a args
|
||||
|
||||
#
|
||||
|
@ -460,17 +445,6 @@ function ts_run {
|
|||
args+=(env ASAN_OPTIONS=detect_leaks=1)
|
||||
fi
|
||||
|
||||
#
|
||||
# Disable buffering of stdout
|
||||
#
|
||||
if [ -n "$UNBUFFERED" ]; then
|
||||
if type unbuffer >/dev/null 2>&1; then
|
||||
args+=(unbuffer)
|
||||
elif type stdbuf >/dev/null 2>&1 && [ "$TS_ENABLE_ASAN" != "yes" ]; then
|
||||
args+=(stdbuf --output=0)
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# valgrind mode
|
||||
#
|
||||
|
|
|
@ -39,26 +39,29 @@ MIN_SWAP_SIZE_KB=$(( MIN_SWAP_SIZE / 1024 ))
|
|||
|
||||
rm -f $IMAGE
|
||||
fallocate_or_skip $(( $MIN_SWAP_SIZE - 1 )) $IMAGE
|
||||
ts_run --unbuffered $TS_CMD_MKSWAP \
|
||||
$TS_CMD_MKSWAP \
|
||||
--label 1234567890abcdef \
|
||||
--uuid 12345678-abcd-abcd-abcd-1234567890ab \
|
||||
$IMAGE 2>&1 |\
|
||||
sed -e "s/ $MIN_SWAP_SIZE_KB KiB/ 10 pages/" \
|
||||
-e "s:$IMAGE:<swapfile>:g" \
|
||||
-e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
|
||||
>> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
$IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
sed -i -e "s/ $MIN_SWAP_SIZE_KB KiB/ 10 pages/" \
|
||||
-e "s:$IMAGE:<swapfile>:g" \
|
||||
-e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
|
||||
$TS_OUTPUT $TS_ERRLOG
|
||||
|
||||
rm -f $IMAGE
|
||||
fallocate_or_skip $MIN_SWAP_SIZE $IMAGE
|
||||
ts_run --unbuffered $TS_CMD_MKSWAP \
|
||||
$TS_CMD_MKSWAP \
|
||||
--label 1234567890abcdef \
|
||||
--uuid 12345678-abcd-abcd-abcd-1234567890ab \
|
||||
$IMAGE 2>&1 |\
|
||||
sed -e "s/ $(( $MIN_SWAP_SIZE_KB - $PAGE_SIZE_KB )) KiB/ 9 pages/" \
|
||||
-e "s/($(( $MIN_SWAP_SIZE - $PAGE_SIZE )) bytes)/(9xPGSZ bytes)/" \
|
||||
-e "s:$IMAGE:<swapfile>:g" \
|
||||
-e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
|
||||
>> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
$IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
sed -i -e "s/ $(( $MIN_SWAP_SIZE_KB - $PAGE_SIZE_KB )) KiB/ 9 pages/" \
|
||||
-e "s/($(( $MIN_SWAP_SIZE - $PAGE_SIZE )) bytes)/(9xPGSZ bytes)/" \
|
||||
-e "s:$IMAGE:<swapfile>:g" \
|
||||
-e "s/insecure permissions [0-9]*/insecure permissions <perm>/g" \
|
||||
$TS_OUTPUT $TS_ERRLOG
|
||||
|
||||
$TS_CMD_SWAPLABEL $IMAGE >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
#rm -f $IMAGE
|
||||
|
|
|
@ -33,7 +33,7 @@ $TS_CMD_RENAME -v codes values rename_exit_codes.? >> $TS_OUTPUT 2>> $TS_ERRLOG
|
|||
echo "EXIT_SUCCESS: $?" >> $TS_OUTPUT
|
||||
|
||||
mkdir rename_exit_codes.2
|
||||
ts_run --unbuffered $TS_CMD_RENAME -v values codes rename_exit_values.? >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
$TS_CMD_RENAME -v values codes rename_exit_values.? >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
echo "RENAME_EXIT_SOMEOK: $?" >> $TS_OUTPUT
|
||||
|
||||
rmdir rename_exit_codes.2
|
||||
|
|
Loading…
Reference in New Issue