opnsense-src/usr.sbin/makefs/tests
Mark Johnston fbc5610259 makefs/zfs/tests: Force-destroy md devices
Most of these tests create a md(4) device backed by a makefs-generated
image, then import the pool, using the md device as a pool vdev.  When
a test finishes, it destroys the pool, then destroys the md device.

Once in a while md device destruction fails with EBUSY.  This happens
when a GEOM consumer is holding the device open; kern_mddetach_locked()
simply fails if any consumers are present.  zpool destruction is
synchronous so ZFS is innocent, rather, the problem seems to be that
GEOM re-tastes the device after the zpool reference goes away.  This
operation creates a transient reference that causes the spurious
failure.

Use "mdconfig -o force" to work around this.

MFC after:	2 weeks

(cherry picked from commit d6bc31f92991b6d67da54868f3563278015389ca)
2026-02-09 18:03:42 +00:00
..
Makefile makefs/tests: Use require.kmods property instead of ad-hoc checks 2026-01-15 19:36:52 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
makefs_cd9660_tests.sh makefs: tests: Fix timestamp-related tests 2026-01-15 19:38:41 +00:00
makefs_ffs_tests.sh makefs: tests: Fix timestamp-related tests 2026-01-15 19:38:41 +00:00
makefs_msdos_tests.sh makefs: tests: Fix timestamp-related tests 2026-01-15 19:38:41 +00:00
makefs_tests_common.sh makefs: tests: Fix timestamp-related tests 2026-01-15 19:38:41 +00:00
makefs_zfs_tests.sh makefs/zfs/tests: Force-destroy md devices 2026-02-09 18:03:42 +00:00