overlay+tmpfs cycle_mount should be like tmpfs cycle_mount, otherwise some test cases may have issue like "xxx: No such file or directory". Signed-off-by: Baokun Li <libaokun1@xxxxxxxxxx> --- common/rc | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/common/rc b/common/rc index 553ae350..ca465438 100644 --- a/common/rc +++ b/common/rc @@ -410,10 +410,19 @@ _scratch_cycle_mount() { local opts="$1" - if [ "$FSTYP" = tmpfs ]; then - _scratch_remount "$opts" - return - fi + case "$FSTYP" in + tmpfs) + _scratch_remount "$opts" + return + ;; + overlay) + if [ "$OVL_BASE_FSTYP" = tmpfs ]; then + _scratch_remount "$opts" + return + fi + ;; + esac + if test -n "$opts"; then opts="-o $opts" fi @@ -522,9 +531,17 @@ _test_unmount() _test_cycle_mount() { - if [ "$FSTYP" = tmpfs ]; then - return - fi + case "$FSTYP" in + tmpfs) + return + ;; + overlay) + if [ "$OVL_BASE_FSTYP" = tmpfs ]; then + return + fi + ;; + esac + _test_unmount _test_mount } -- 2.31.1