logo

utils-std

Collection of commonly available Unix tools
commit: de43dbe2d573e783cb1a7d83e1b1de3af77d72b7
parent ed70de70a4e6833b261a484d64f46c5086485a4b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 28 Mar 2024 21:37:07 +0100

test-cmd/base64:devfull: NetBSD&FreeBSD gives a different errno status

== NetBSD ==
https://builds.sr.ht/~lanodan/job/1181298
$ uname -a
NetBSD build 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug  4 15:30:37 UTC 2022  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

== FreeBSD ==
https://builds.sr.ht/~lanodan/job/1181297

Diffstat:

Mtest-cmd/base6410+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test-cmd/base64 b/test-cmd/base64 @@ -81,9 +81,13 @@ noperm_cleanup() { atf_test_case devfull devfull_body() { - atf_check -s exit:1 -e 'inline:base64: Error writing: No space left on device\n' sh -c '../cmd/base64 inputs/all_bytes >/dev/full' - atf_check -s exit:1 -e 'inline:base64: Error writing: No space left on device\n' sh -c '../cmd/base64 <inputs/all_bytes >/dev/full' - atf_check -s exit:1 -e 'inline:base64: Error writing: No space left on device\n' sh -c '../cmd/base64 - <inputs/all_bytes >/dev/full' + error='inline:base64: Error writing: No space left on device\n' + [ "$(uname -s)" = "NetBSD" ] && error='inline:base64: Error writing: Inappropriate ioctl for device\n' + [ "$(uname -s)" = "FreeBSD" ] && error='inline:base64: Error writing: Inappropriate ioctl for device\n' + + atf_check -s exit:1 -e "$error" sh -c '../cmd/base64 inputs/all_bytes >/dev/full' + atf_check -s exit:1 -e "$error" sh -c '../cmd/base64 <inputs/all_bytes >/dev/full' + atf_check -s exit:1 -e "$error" sh -c '../cmd/base64 - <inputs/all_bytes >/dev/full' } atf_test_case readslash