]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341390, r341392, r341667
authorAlan Somers <asomers@FreeBSD.org>
Thu, 14 Feb 2019 20:26:59 +0000 (20:26 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Thu, 14 Feb 2019 20:26:59 +0000 (20:26 +0000)
commit98a11b476cf7adaca58651a534a1da40d49ed7e4
tree93d2fc16b52b6053e916a1de5146f642929e70ef
parentf8578df58e7aaf402c8e229c2017b36406fbe0c4
MFC r341390, r341392, r341667

r341390:
Remove some dead code from the geli tests

This is detritus in the Makefile, leftover from 327662.

r341392:
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
Pull Request: https://github.com/freebsd/freebsd/pull/241

r341667:
geom tests: Fix cleanup of ATF tests since r341392

r341392 changed common test cleanup routines in a way that allowed them to
be used by TAP tests as well as ATF tests.  However, a late change made
during code review resulted in cleanup being broken for ATF tests, which
source geom_subr.sh separately during the body and cleanup phases of the
test.  The result was that md(4) devices wouldn't get cleaned up.

X-MFC-With: 341392
15 files changed:
tests/sys/geom/class/eli/Makefile
tests/sys/geom/class/eli/attach_test.sh
tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/configure_test.sh
tests/sys/geom/class/eli/delkey_test.sh
tests/sys/geom/class/eli/detach_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_test.sh
tests/sys/geom/class/eli/kill_test.sh
tests/sys/geom/class/eli/misc_test.sh
tests/sys/geom/class/eli/onetime_test.sh
tests/sys/geom/class/eli/resize_test.sh
tests/sys/geom/class/eli/setkey_test.sh
tests/sys/geom/class/geom_subr.sh
tests/sys/geom/class/mirror/sync_error.sh