test/system: fix mount external container test

Checking for the mountdir is not relevent, a recent c/storage change[1] no
longer deletes the mount point directory so the check will cause a false
positive. findmnt exits 1 when the given path is not a mountpoint so
let's use that to check.

[1] 3f2e81abb3

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2024-02-29 13:39:58 +01:00
parent 8377483145
commit 99b2f369db
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 3 additions and 6 deletions

View File

@ -249,14 +249,11 @@ EOF
reported_mountpoint=$(echo "$output" | awk '{print $2}')
is "$reported_mountpoint" "$mount_path" "mountpoint reported by 'podman mount'"
# umount, and make sure files are gone
# umount, and make sure mountpoint no longer exists
run_podman umount $external_cid
if [ -d "$mount_path" ]; then
# Under VFS, mountpoint always exists even despite umount
if [[ "$(podman_storage_driver)" != "vfs" ]]; then
if findmnt "$mount_path" >/dev/null ; then
die "'podman umount' did not umount $mount_path"
fi
fi
buildah rm $external_cid
}