mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-01 06:20:55 +00:00
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>
This commit is contained in:
parent
02ecc82287
commit
457a70dabb
1 changed files with 3 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue