git: 411a566d5652 - main - t_create.sh: use `ATF_TESTS_SH_SED` & remove local mods
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Feb 2026 18:38:54 UTC
The branch main has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=411a566d565277e47c9644d19a5efa0fe5b00179
commit 411a566d565277e47c9644d19a5efa0fe5b00179
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-02-15 18:26:52 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-02-15 18:36:29 +0000
t_create.sh: use `ATF_TESTS_SH_SED` & remove local mods
This particular change replaces all local modifications to the test
script like so:
- Use `ATF_TESTS_SH_SED_test` with a sed(1) statement in the Makefile,
instead of the equivalent local modifications.
- Remove the need for expecting the output of newfs_msdos to be empty.
There isn't much to gain from deviating from the upstream NetBSD test--it's
just another local modification that would need to be carried forward. If
it's worth testing this FreeBSD-specific behavior, it should be in a
FreeBSD-specific test.
This makes moving new modifications to the script easier moving forward.
MFC after: 1 week
---
contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh | 14 ++------------
sbin/newfs_msdos/tests/Makefile | 2 ++
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh b/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh
index 61ed927b8889..dc431166a469 100755
--- a/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh
+++ b/contrib/netbsd-tests/sbin/newfs_msdos/t_create.sh
@@ -31,21 +31,11 @@ validfat32_head() {
}
validfat32_body() {
- if true; then
- # FreeBSD
- exp_err=empty
- fsck=fsck_msdosfs
- else
- # NetBSD
- exp_err=ignore
- fsck=fsck_msdos
- fi
-
- atf_check -s eq:0 -o ignore -e $exp_err \
+ atf_check -s eq:0 -o ignore -e ignore \
newfs_msdos -b 512 -C 33m -F 32 msdos.img
# fsck_msdos/newfs_msdos have been fixed
# atf_expect_fail "PR bin/46743"
- atf_check -s eq:0 -o not-match:FIXED -e empty $fsck -p msdos.img
+ atf_check -s eq:0 -o not-match:FIXED -e empty fsck_msdos -p msdos.img
atf_expect_pass
}
diff --git a/sbin/newfs_msdos/tests/Makefile b/sbin/newfs_msdos/tests/Makefile
index 3f112c7f4710..47c77d8289de 100644
--- a/sbin/newfs_msdos/tests/Makefile
+++ b/sbin/newfs_msdos/tests/Makefile
@@ -2,5 +2,7 @@ TESTSRC=${SRCTOP}/contrib/netbsd-tests/sbin/newfs_msdos
NETBSD_ATF_TESTS_SH+= create
+ATF_TESTS_SH_SED_create= -e 's/fsck_msdos/fsck_msdosfs/'
+
.include <netbsd-tests.test.mk>
.include <bsd.test.mk>