Skip to content

Commit

Permalink
tests/short-first-segment: fix uname(1) usage and skip message
Browse files Browse the repository at this point in the history
Replace non-portable GNU `-i, --hardware-platform` with `-m[, --machine]`
to fix "unknown error" usage error on, e.g. OpenBSD.

Also fix the check's backwards logic.  OpenBSD/spar64 now prints
	-skipping test: not supported on x86_64 Linux
	+skipping test: amd64 Linux required
  • Loading branch information
klemensn committed Oct 18, 2023
1 parent 917ea45 commit e9f38e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/short-first-segment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ if ! gzip --version >/dev/null; then
exit 77
fi

if test "$(uname -i)" != x86_64 || test "$(uname)" != Linux; then
echo "skipping test: not supported on x86_64 Linux"
if test "$(uname -m)" != amd64 || test "$(uname)" != Linux; then
echo "skipping test: amd64 Linux required"
exit 77
fi

Expand Down

0 comments on commit e9f38e6

Please sign in to comment.