Skip to content

Commit

Permalink
debug: umount cgroup
Browse files Browse the repository at this point in the history
Signed-off-by: Bui Quang Minh <[email protected]>
  • Loading branch information
minhbq-99 committed Feb 12, 2024
1 parent 453f0a9 commit a30270f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/zdtm_umount_cgroups
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ cat /proc/self/cgroup | grep -q zdtmtst.defaultroot || exit 0
uuid=$1

tdir=`mktemp -d zdtm.XXXXXX`
set -e
for i in "zdtmtst" "zdtmtst.defaultroot"; do
mount -t cgroup -o none,name=$i zdtm $tdir || { rmdir $tdir; exit 1; }
mount -t cgroup -o none,name=$i zdtm $tdir
# remove a fake group if exists
if [ -d "$tdir/holder.$uuid" ]; then
rmdir $tdir/holder.$uuid || { umount -l $tdir && rmdir $tdir; exit 1; }
rmdir $tdir/holder.$uuid
fi
umount -l $tdir || exit 1;
umount -l $tdir
done
rmdir $tdir

0 comments on commit a30270f

Please sign in to comment.