Date: Sun, 22 Feb 2026 03:36:14 +0000 From: Enji Cooper <ngie@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 02d896af3bca - stable/14 - t_create.sh: use `ATF_TESTS_SH_SED` & remove local mods Message-ID: <699a79ae.21cab.41c01697@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=02d896af3bca3e2bf0432ca751ed3d4ec1ee543b commit 02d896af3bca3e2bf0432ca751ed3d4ec1ee543b Author: Enji Cooper <ngie@FreeBSD.org> AuthorDate: 2026-02-15 18:26:52 +0000 Commit: Enji Cooper <ngie@FreeBSD.org> CommitDate: 2026-02-22 03:35:31 +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 (cherry picked from commit 411a566d565277e47c9644d19a5efa0fe5b00179) --- 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>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?699a79ae.21cab.41c01697>
