From 5c6a8cb5afb833eb03d54f06aca8470c14a6ab47 Mon Sep 17 00:00:00 2001 From: Allison Henderson Date: Tue, 28 Jun 2011 14:45:00 +0000 Subject: [PATCH] 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 Signed-off-by: Alex Elder --- 123 | 24 ------------------------ common.rc | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/123 b/123 index 27c1e660..ee1194da 100755 --- a/123 +++ b/123 @@ -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 diff --git a/common.rc b/common.rc index 680631d7..cb23a02f 100644 --- a/common.rc +++ b/common.rc @@ -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 # -- 2.47.3