-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
}
function ts_run {
- local UNBUFFERED=
-
- while true; do
- case "$1" in
- --unbuffered)
- UNBUFFERED=1
- shift;;
- --)
- shift
- break;;
- *)
- break;;
- esac
- done
-
declare -a args
#
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
#
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
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