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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user