mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Merge Some updates to modernize the mount regression test
Signed-off-by: Ryan Lee <ryan.lee@canonical.com> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1449 Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
commit
5bc1cd763c
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ mount_cleanup() {
|
|||
}
|
||||
do_onexit="mount_cleanup"
|
||||
|
||||
dd if=/dev/zero of=${mount_file} bs=1024 count=512 2> /dev/null
|
||||
fallocate -l 512K ${mount_file}
|
||||
/sbin/mkfs -t${fstype} -F ${mount_file} > /dev/null 2> /dev/null
|
||||
/bin/mkdir ${mount_point}
|
||||
/bin/mkdir ${mount_point2}
|
||||
|
@ -77,8 +77,8 @@ if [ ! -b /dev/loop0 ] ; then
|
|||
fi
|
||||
|
||||
# find the next free loop device and mount it
|
||||
loop_device=$(losetup -f) || fatalerror 'Unable to find a free loop device'
|
||||
/sbin/losetup "$loop_device" ${mount_file} > /dev/null 2> /dev/null
|
||||
/sbin/losetup -f ${mount_file} || fatalerror 'Unable to set up a loop device'
|
||||
loop_device="$(/sbin/losetup -n -O NAME -l -j ${mount_file})"
|
||||
|
||||
options=(
|
||||
# default and non-default options
|
||||
|
|
Loading…
Add table
Reference in a new issue