logo

utils-std

Collection of commonly available Unix tools
commit: 6931046faab892405d9b2727a1ab27402ede4456
parent 50a5318fe308b1dfe2370a743a6964a092bbd959
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 10 Mar 2024 12:53:10 +0100

test-cmd: skip rather than xfail on test cases with portability issues

Diffstat:

Mtest-cmd/basename6+++---
Mtest-cmd/date6+++---
Mtest-cmd/env12++++++------
Mtest-cmd/id6+++---
Mtest-cmd/pwd6+++---
Mtest-cmd/strings6+++---
Mtest-cmd/tee6+++---
Mtest-cmd/tty6+++---
8 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/test-cmd/basename b/test-cmd/basename @@ -35,9 +35,9 @@ usage_body() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 -e 'inline:basename: puts: No space left on device\n' sh -c '../cmd/basename >/dev/full' atf_check -s exit:1 -e 'inline:basename: puts: No space left on device\n' sh -c '../cmd/basename "/usr/bin" >/dev/full' diff --git a/test-cmd/date b/test-cmd/date @@ -46,9 +46,9 @@ echolike_body() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 -e 'inline:date: puts: No space left on device\n' sh -c '../cmd/date >/dev/full' } diff --git a/test-cmd/env b/test-cmd/env @@ -4,7 +4,7 @@ atf_test_case noargs noargs_body() { - gentoo_sandbox && atf_expect_fail "sandbox (gentoo) interferes with the environment" + gentoo_sandbox && atf_skip "sandbox (gentoo) interferes with the environment" atf_check -o "inline:FOO=BAR\n" env -i FOO=BAR ../cmd/env } @@ -16,7 +16,7 @@ badarg_body() { atf_test_case iflag iflag_body() { - gentoo_sandbox && atf_expect_fail "sandbox (gentoo) interferes with the environment" + gentoo_sandbox && atf_skip "sandbox (gentoo) interferes with the environment" atf_check -o "inline:FOO=BAR\n" ../cmd/env -i FOO=BAR ../cmd/env atf_check -o "inline:FOO=BAR\n" ../cmd/env -i FOO=BAR @@ -26,7 +26,7 @@ iflag_body() { atf_test_case uflag uflag_body() { - gentoo_sandbox && atf_expect_fail "sandbox (gentoo) interferes with the environment" + gentoo_sandbox && atf_skip "sandbox (gentoo) interferes with the environment" atf_check -o "inline:FOO=BAR\n" ../cmd/env -i FOO=BAR BAR=FOO ../cmd/env -u BAR @@ -35,7 +35,7 @@ uflag_body() { atf_test_case unsetflag unsetflag_body() { - gentoo_sandbox && atf_expect_fail "sandbox (gentoo) interferes with the environment" + gentoo_sandbox && atf_skip "sandbox (gentoo) interferes with the environment" atf_check -o "inline:FOO=BAR\n" ../cmd/env -i FOO=BAR BAR=FOO ../cmd/env --unset=BAR @@ -44,8 +44,8 @@ unsetflag_body() { atf_test_case devfull devfull_body() { - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 -e 'inline:env: puts(environ[i]): No space left on device\n' sh -c '../cmd/env >/dev/full' } diff --git a/test-cmd/id b/test-cmd/id @@ -22,9 +22,9 @@ names_cleanup() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 sh -c '../cmd/id >/dev/full' atf_check -s exit:1 sh -c '../cmd/id -n >/dev/full' diff --git a/test-cmd/pwd b/test-cmd/pwd @@ -30,9 +30,9 @@ enoent_cleanup() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 sh -c '../cmd/pwd >/dev/full' } diff --git a/test-cmd/strings b/test-cmd/strings @@ -32,9 +32,9 @@ devnull_body() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s exit:1 -e 'inline:strings: Error writing: No space left on device\n' sh -c '../cmd/strings inputs/strings/true >/dev/full' } diff --git a/test-cmd/tee b/test-cmd/tee @@ -41,9 +41,9 @@ noperm_cleanup() { atf_test_case devfull devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for fputs()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for fputs()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for fputs()" + has_glibc && atf_skip "glibc ignoring write errors for fputs()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for fputs()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for fputs()" # shellcheck disable=SC1112 atf_check -s exit:1 -e 'inline:tee: Error writing ‘<stdout>’: No space left on device\n' sh -c '../cmd/tee <inputs/all_bytes >/dev/full' diff --git a/test-cmd/tty b/test-cmd/tty @@ -24,9 +24,9 @@ out_devnull_body() { atf_test_case out_devfull out_devfull_body() { - has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" - [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" - [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + has_glibc && atf_skip "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for puts()" atf_check -s "exit:2" sh -c '../cmd/tty >/dev/full' }