mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/rc: add scratch shutdown support for overlayfs
Enable shutdown tests on overlayfs. This requires configuring overlayfs with TEST|SCRATCH_DEV pointing to block device, which act as base fs of overlay. The legacy config (pointing TEST|SCRATCH_DEV to existing directories) won't support shutdown. Extend _require_scratch_shutdown() to deal with overlay by checking shutdown support on $OVL_BASE_SCRATCH_MNT instead of $SCRATCH_MNT, so we check shutdown support status against the underlying upper fs of overlay. Introduce new _scratch_shutdown() helper to do the actual shutdown work and shutdown upper fs in the case of overlay. Also converting existing bare 'src/godown' calls to use this helper to avoid false failures when testing overlayfs. generic/042 and generic/050 assume $SCRATCH_DEV to be a local device, so add _require_local_device $SCRATCH_DEV rule. [eguan: rewrite commit log] Signed-off-by: Chengguang Xu <cgxu519@icloud.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ do
|
||||
ls -RF $SCRATCH_MNT >$tmp.ls1
|
||||
|
||||
_echofull "godown"
|
||||
src/godown -v -f $SCRATCH_MNT >> $seqres.full
|
||||
_scratch_shutdown -v -f >> $seqres.full
|
||||
|
||||
_echofull "unmount"
|
||||
_scratch_unmount >>$seqres.full 2>&1 \
|
||||
|
||||
Reference in New Issue
Block a user