mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: remove _need_to_be_root
The check script requires that it be run as root, so adding individualized checks for this in each teat is not needed. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
99fd47b2b2
commit
56ff01f471
@@ -168,10 +168,6 @@ Test script environment:
|
||||
3. By default, tests are run as the same uid as the person
|
||||
executing the control script "check" that runs the test scripts.
|
||||
|
||||
If you need to be root, add a call to the shell procedure
|
||||
_need_to_be_root ... this will do nothing or exit with an
|
||||
error message depending on your current uid.
|
||||
|
||||
4. Some other useful shell procedures:
|
||||
|
||||
_get_fqdn - echo the host's fully qualified
|
||||
|
||||
@@ -60,8 +60,6 @@ session_label="stress_$seq"
|
||||
nobody=4 # define this uid/gid as a number
|
||||
do_quota_check=true # do quota check if quotas enabled
|
||||
|
||||
_need_to_be_root
|
||||
|
||||
# install our cleaner
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
|
||||
@@ -1076,19 +1076,6 @@ _fix_malloc()
|
||||
'
|
||||
}
|
||||
|
||||
# check if run as root
|
||||
#
|
||||
_need_to_be_root()
|
||||
{
|
||||
id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`
|
||||
if [ "$id" -ne 0 ]
|
||||
then
|
||||
echo "Arrgh ... you need to be root (not uid=$id) to run this test"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# _df_device : get an IRIX style df line for a given device
|
||||
#
|
||||
|
||||
@@ -41,7 +41,6 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
|
||||
. ./common/rc
|
||||
. ./common/filter
|
||||
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -46,7 +46,6 @@ _cleanup()
|
||||
. ./common/rc
|
||||
. ./common/filter
|
||||
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -47,7 +47,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
. ./common/filter
|
||||
|
||||
# real QA test starts here
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -47,7 +47,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
. ./common/filter
|
||||
|
||||
# real QA test starts here
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -59,7 +59,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
. ./common/filter
|
||||
|
||||
# real QA test starts here
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_require_scratch_nocheck
|
||||
_require_scratch_dev_pool 4
|
||||
|
||||
@@ -48,7 +48,6 @@ _cleanup()
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -47,7 +47,6 @@ _cleanup()
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ _cleanup()
|
||||
. ./common/filter
|
||||
|
||||
# real QA test starts here
|
||||
_need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
|
||||
@@ -55,7 +55,6 @@ _supported_os Linux
|
||||
_require_test
|
||||
_require_scratch
|
||||
_require_cp_reflink
|
||||
_need_to_be_root
|
||||
|
||||
reflink_test_dir=$TEST_DIR/test-$seq
|
||||
rm -rf $reflink_test_dir
|
||||
|
||||
@@ -54,7 +54,6 @@ _supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_fssum
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ _supported_os Linux
|
||||
_require_test
|
||||
_require_scratch
|
||||
_require_cp_reflink
|
||||
_need_to_be_root
|
||||
|
||||
_checksum_files()
|
||||
{
|
||||
|
||||
@@ -44,7 +44,6 @@ _cleanup()
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ _cleanup()
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ _supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_fssum
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ _supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_fssum
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ _supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_fssum
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ _supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_test
|
||||
_require_scratch
|
||||
_need_to_be_root
|
||||
|
||||
rm -f $seqres.full
|
||||
mkdir $restore_dir
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user