diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-24 00:39:01 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-24 12:23:07 +0100 |
commit | a126dde069ada9380ba2f7ab7e520ba4ce3e2a90 (patch) | |
tree | c4320b2552d2878b7bd8be8ccf61ae90ed3cd7f5 | |
parent | 18f2475fa18bfe8b08af830bb8335d41928206fe (diff) | |
download | lvm2-a126dde069ada9380ba2f7ab7e520ba4ce3e2a90.tar.gz |
tests: remove more file in teardonw
Our tests may result in producation of huge set of
invalid links in /dev/disk directory depeding on version
of udev and various kinds of failures.
Also we happen to invoke some on-system pvscans generating
local /etc/lvm/archive & backups - remove them when
test is finished.
-rw-r--r-- | test/lib/aux.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 08eeac55b..f81d03e88 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -580,6 +580,12 @@ teardown() { rm -rf "${TESTDIR:?}" || echo BLA } + # Remove any dangling symlink in /dev/disk (our tests can confuse udev) + find /dev/disk -type l ! -exec test -e {} \; -print | xargs rm -f + + # Remove any metadata archives and backups from this test on system + rm -f /etc/lvm/archive/${PREFIX}* /etc/lvm/backup/${PREFIX}* + echo "ok" } |