mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-01-25 17:39:01 +00:00
tests: Squeeze spaces in case od print two space between hexbytes (OpenBSD)
The OpenBSD implementation of 'od -tx1' prints two spaces between hexbytes, thus the grep for "00 00 00 00" fails and we report an invalid error. This patch fixes this by squeezing the two consecutive spaces. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
4f56102e96
commit
2f86b62722
@ -131,7 +131,7 @@ for (( i=0; i<${#PARAMETERS[*]}; i++)); do
|
||||
# We expect sequences of 4 0-bytes in unencrypted state
|
||||
# and no such sequences in encrypted state.
|
||||
nullseq="$(cat $TPMDIR/tpm-00.permall | \
|
||||
od -t x1 -A n | tr -d '\n' |
|
||||
od -t x1 -A n | tr -d '\n' | tr -s ' ' |
|
||||
grep "00 00 00 00")"
|
||||
if [[ "${PARAMETERS[$i]}" =~ (keyfile|pwdfile) ]]; then
|
||||
if [ -n "${nullseq}" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user