diff options
author | Andrey Vagin <avagin@openvz.org> | 2014-08-26 15:26:00 +0400 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2014-08-26 21:34:58 +0400 |
commit | 457a70dabb2e61ae40f1d0f6f9e91cba2b32f258 (patch) | |
tree | 2ba9ace0076b2191d644e55238ce8d44b637ad2d | |
parent | 02ecc822873a797e324cd170f94d343294fe804b (diff) |
zdtm: don't hide errors in cgroup02.hook
rmdir is executed for non-existent directories, so we don't check
an exit code of this operation.
This patch executs rmdir only for existent directories and check
an exit code of rmdir.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
-rwxr-xr-x | test/zdtm/live/static/cgroup02.hook | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/zdtm/live/static/cgroup02.hook b/test/zdtm/live/static/cgroup02.hook index 5f4d042f3..75bfb42ef 100755 --- a/test/zdtm/live/static/cgroup02.hook +++ b/test/zdtm/live/static/cgroup02.hook @@ -7,11 +7,9 @@ rmroots() { mount -t cgroup none $tname -o "$1" - set +e - rmdir "$tname/oldroot" - rmdir "$tname/newroot" - rmdir "$tname/zdtmtstroot" - set -e + for d in "$tname/oldroot" "$tname/newroot" "$tname/zdtmtstroot"; do + test -d "$d" && rmdir "$d" + done echo "Left there is:" ls "$tname" |