freebsd-dev/tests/sys
Alan Somers cf551b8a98 Unbreak geli/gmirror testcases if their geom classes cannot be loaded
The problem with the logic prior to this commit was twofold:

1. The wrong set of idioms (TAP-compatible) were being applied to the ATF
   testcases when run, resulting in confusing ATF failure results on setup.
2. The cleanup subroutines were broken when the geom classes could not be
   loaded as they exited with 0 unexpectedly.

This commit changes the test code to source the class-specific configuration
(conf.sh) once globally, instead of sourcing it per testcase and per cleanup
subroutine, and to call the ATF-specific setup subroutine(s) inline in
the testcases.

The refactoring done is effectively a no-op for the TAP testcases, modulo
any refactoring done to create common code between the ATF and TAP
testcases.

This unbreaks the geli testcases converted to ATF in r327662 and r327683,
and the gmirror testcases added in r327780, respectively, when the geom
class could not be loaded.

tests/sys/geom/class/mirror/...
    While here, ignore errors when turning debug failpoint sysctl off, which
    could occur if the gmirror class was not loaded.

Submitted by:	ngie
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/241
2018-12-02 05:06:37 +00:00
..
acl Add a very basic regression test for setfacl -R with NFSv4 ACLs. 2018-10-26 21:20:04 +00:00
aio Revert r337929 2018-08-16 22:04:00 +00:00
audit audit(4): add tests for sysctl(3) and sysarch(2) 2018-07-29 20:34:44 +00:00
auditpipe Introduce test program for auditpipe(4) 2018-07-26 00:16:41 +00:00
capsicum Disable connectat/bindat with AT_FDCWD in capmode 2018-04-30 17:31:06 +00:00
cddl Strip trailing / from TESTSDIR 2018-05-11 16:11:24 +00:00
fifo other: Fix several typos and minor errors 2017-12-27 03:23:58 +00:00
file Revert r337929 2018-08-16 22:04:00 +00:00
fs Fix sys.fs.tmpfs.mknod_test.{char, block} by reverting r321967 2018-07-21 20:14:01 +00:00
geom Unbreak geli/gmirror testcases if their geom classes cannot be loaded 2018-12-02 05:06:37 +00:00
kern Maybe make gcc happy 2018-11-30 23:47:57 +00:00
kqueue Make whitespace more consistent in libkqueue tests. 2018-11-27 15:12:34 +00:00
mac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mqueue DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
net Add tests for lagg(4) and other cloned network interfaces 2018-02-23 18:18:42 +00:00
netinet Plug a trivial memory leak. 2018-11-20 18:13:18 +00:00
netipsec Fix sys/netipsec/tunnel tests after r337736 2018-08-17 18:37:22 +00:00
netpfil pf tests: Test name handling 2018-12-01 09:59:32 +00:00
opencrypto Add test cases for Poly1305 from RFC 7539 2018-08-17 00:32:00 +00:00
pjdfstest DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
posixshm Revert r337929 2018-08-16 22:04:00 +00:00
sys DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
vfs vfs_lookup: Allow PATH_MAX-1 symlinks 2017-11-17 19:25:39 +00:00
vm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Makefile Introduce test program for auditpipe(4) 2018-07-26 00:16:41 +00:00
Makefile.depend DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
Makefile.inc Use MK_CHECK_USE_SANDBOX in tests/..., to deal with the fact that 2017-08-02 22:24:08 +00:00