mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-28 14:44:36 +08:00
btrfs-progs: tests: misc-tests/034: use sudo helper for module probing
All module operations need root, add the helper support and run the critical calls with checks. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
8dd3e5dc2d
commit
7caf934f04
@ -182,14 +182,14 @@ function failure_recovery {
|
||||
}
|
||||
|
||||
function reload_btrfs {
|
||||
rmmod btrfs
|
||||
modprobe btrfs
|
||||
run_check $SUDO_HELPER rmmod btrfs
|
||||
run_check $SUDO_HELPER modprobe btrfs
|
||||
}
|
||||
|
||||
# for full coverage we need btrfs to actually be a module
|
||||
modinfo btrfs > /dev/null 2>&1 || _not_run "btrfs must be a module"
|
||||
modprobe -r btrfs || _not_run "btrfs must be unloadable"
|
||||
modprobe btrfs || _not_run "loading btrfs module failed"
|
||||
run_mayfail $SUDO_HELPER modprobe -r btrfs || _not_run "btrfs must be unloadable"
|
||||
run_mayfail $SUDO_HELPER modprobe btrfs || _not_run "loading btrfs module failed"
|
||||
|
||||
run_check_mkfs_test_dev
|
||||
check_btrfstune
|
||||
|
Loading…
Reference in New Issue
Block a user