File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1997,6 +1997,12 @@ fn main() {
19971997 . requires ( "mount-point" )
19981998 . help ( "Mount FUSE with direct IO" ) ,
19991999 )
2000+ . arg (
2001+ Arg :: new ( "auto-unmount" )
2002+ . long ( "auto-unmount" )
2003+ . action ( ArgAction :: SetTrue )
2004+ . help ( "Automatically unmount FUSE when process exits" ) ,
2005+ )
20002006 . arg (
20012007 Arg :: new ( "fsck" )
20022008 . long ( "fsck" )
@@ -2037,12 +2043,9 @@ fn main() {
20372043 if matches. get_flag ( "suid" ) {
20382044 info ! ( "setuid bit support enabled" ) ;
20392045 options. push ( MountOption :: Suid ) ;
2040- } else {
2041- options. push ( MountOption :: AutoUnmount ) ;
20422046 }
20432047 }
2044- #[ cfg( not( feature = "abi-7-26" ) ) ]
2045- {
2048+ if matches. get_flag ( "auto-unmount" ) {
20462049 options. push ( MountOption :: AutoUnmount ) ;
20472050 }
20482051 if let Ok ( enabled) = fuse_allow_other_enabled ( ) {
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ function test_no_user_allow_other {
6262 DIR=$( su fusertestnoallow -c " mktemp --directory" )
6363 DATA_DIR=$( su fusertestnoallow -c " mktemp --directory" )
6464 cargo build --example simple $1 > /dev/null 2>&1
65- su fusertestnoallow -c " target/debug/examples/simple -vvv --data-dir $DATA_DIR --mount-point $DIR "
65+ su fusertestnoallow -c " target/debug/examples/simple --auto-unmount - vvv --data-dir $DATA_DIR --mount-point $DIR "
6666 exitCode=$?
6767 if [[ $exitCode -eq 2 ]]; then
6868 echo -e " $GREEN OK Detected lack of user_allow_other: $2 $NC "
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export RUST_BACKTRACE=1
1313DATA_DIR=$( mktemp --directory)
1414DIR=$( mktemp --directory)
1515
16- fuser -vvv --suid --data-dir $DATA_DIR --mount-point $DIR > /code/logs/mount.log 2>&1 &
16+ fuser -vvv --auto-unmount -- suid --data-dir $DATA_DIR --mount-point $DIR > /code/logs/mount.log 2>&1 &
1717FUSE_PID=$!
1818sleep 0.5
1919
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ echo "generic/531" >> xfs_excludes.txt
124124echo " generic/564" >> xfs_excludes.txt
125125
126126
127- FUSER_EXTRA_MOUNT_OPTIONS=" " TEST_DEV=" $TEST_DATA_DIR " TEST_DIR=" $TEST_DIR " SCRATCH_DEV=" $SCRATCH_DATA_DIR " SCRATCH_MNT=" $SCRATCH_DIR " \
127+ FUSER_EXTRA_MOUNT_OPTIONS=" --auto-unmount " TEST_DEV=" $TEST_DATA_DIR " TEST_DIR=" $TEST_DIR " SCRATCH_DEV=" $SCRATCH_DATA_DIR " SCRATCH_MNT=" $SCRATCH_DIR " \
128128./check-fuser -E xfs_excludes.txt " $@ " \
129129| tee /code/logs/xfstests.log
130130
You can’t perform that action at this time.
0 commit comments