mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: ENOSPC Punch Hole: Move su routines in 123 to common.rc
This patch moves the su routines in test 123 to common.rc so that they can also be used in the new test 256 Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
ced9681ea4
commit
5c6a8cb5af
@@ -42,30 +42,6 @@ _cleanup()
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
|
||||
_filter_user_do()
|
||||
{
|
||||
perl -ne "
|
||||
s,.*Permission\sdenied.*,Permission denied,;
|
||||
s,.*no\saccess\sto\stty.*,,;
|
||||
s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
|
||||
s,^\s*$,,;
|
||||
print;"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
_user_do()
|
||||
{
|
||||
if [ "$HOSTOS" == "IRIX" ]
|
||||
then
|
||||
echo $1 | /bin/bash "su $qa_user 2>&1" | _filter_user_do
|
||||
else
|
||||
echo $1 | su $qa_user 2>&1 | _filter_user_do
|
||||
fi
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
@@ -867,6 +867,26 @@ _require_user()
|
||||
[ "$?" == "0" ] || _notrun "$qa_user user not defined."
|
||||
}
|
||||
|
||||
_filter_user_do()
|
||||
{
|
||||
perl -ne "
|
||||
s,.*Permission\sdenied.*,Permission denied,;
|
||||
s,.*no\saccess\sto\stty.*,,;
|
||||
s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
|
||||
s,^\s*$,,;
|
||||
print;"
|
||||
}
|
||||
|
||||
_user_do()
|
||||
{
|
||||
if [ "$HOSTOS" == "IRIX" ]
|
||||
then
|
||||
echo $1 | /bin/bash "su $qa_user 2>&1" | _filter_user_do
|
||||
else
|
||||
echo $1 | su $qa_user 2>&1 | _filter_user_do
|
||||
fi
|
||||
}
|
||||
|
||||
# check that xfs_io, glibc, kernel, and filesystem all (!) support
|
||||
# fallocate
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user