# When SCRATCH/TEST_* vars are defined in evironment and not
# in config file, this function is called after vars have already
# been overriden in the previous test.
-# In that case, TEST_DEV is a directory and not a blockdev and
+# In that case, TEST_DEV is a directory and not a blockdev/chardev and
# the function will return without overriding the SCRATCH/TEST_* vars.
_overlay_config_override()
{
# the new OVL_BASE_SCRATCH/TEST_DEV/MNT vars are set to the values
# of the configured base fs and SCRATCH/TEST_DEV vars are set to the
# overlayfs base and mount dirs inside base fs mount.
- [ -b "$TEST_DEV" ] || return 0
+ [ -b "$TEST_DEV" ] || [ -c "$TEST_DEV" ] || return 0
# Config file may specify base fs type, but we obay -overlay flag
[ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP"
export TEST_DIR="$OVL_BASE_TEST_DIR/$OVL_MNT"
export MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS"
- [ -b "$SCRATCH_DEV" ] || return 0
+ [ -b "$SCRATCH_DEV" ] || [ -c "$SCRATCH_DEV" ] || return 0
# Store original base fs vars
export OVL_BASE_SCRATCH_DEV="$SCRATCH_DEV"
# SCRATCH_DEV, in this case OVL_BASE_SCRATCH_DEV
# will be null, so check OVL_BASE_SCRATCH_DEV before
# running shutdown to avoid shutting down base fs accidently.
- _notrun "$SCRATCH_DEV is not a block device"
+ _notrun "This test requires a valid $OVL_BASE_SCRATCH_DEV as ovl base fs"
else
src/godown -f $OVL_BASE_SCRATCH_MNT 2>&1 \
|| _notrun "Underlying filesystem does not support shutdown"