From: Ruediger Meier Date: Wed, 2 Dec 2015 14:24:27 +0000 (+0100) Subject: tests: avoid sed -E X-Git-Tag: v2.28-rc1~228^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2142701ac6f86815dc85688efcbe1a221bef22e;p=thirdparty%2Futil-linux.git tests: avoid sed -E GNU sed's -E option for BSD compatibility is relatively new (>=4.2) and undocumented. Signed-off-by: Ruediger Meier --- diff --git a/tests/ts/uuid/uuidd b/tests/ts/uuid/uuidd index 147f289a46..17cf29d064 100755 --- a/tests/ts/uuid/uuidd +++ b/tests/ts/uuid/uuidd @@ -33,7 +33,7 @@ fi test_flag() { echo "options: $*" >> $TS_OUTPUT $TS_CMD_UUIDD -s $UUIDD_SOCKET $* | - sed -E '/List of UUIDs:/d; s/^[[:space:]]+//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT + sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>&1 ret=$? if [ $ret -ne 0 ]; then diff --git a/tests/ts/wipefs/wipefs b/tests/ts/wipefs/wipefs index f921625c53..d472678272 100755 --- a/tests/ts/wipefs/wipefs +++ b/tests/ts/wipefs/wipefs @@ -20,7 +20,7 @@ $TS_CMD_WIPEFS --all --backup ${TS_DEVICE} &>/dev/null || ts_die "wipefs failed" #there should be just one magic string/backup file in this case INFILE=$(ls $HOME/wipefs-$(basename ${TS_DEVICE})-*.bak) -OFFT=$(echo $INFILE | sed -E 's/^.*-(.*).bak$/\1/') +OFFT=$(echo $INFILE | sed 's/^.*-\(.*\).bak$/\1/') dd if=$INFILE of=$TS_DEVICE bs=1 conv=notrunc seek=$(($OFFT)) &>/dev/null #the bytes should be copied back, check if wipefs can recognize it