From patchwork Tue Jun 28 14:45:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 102397 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 918E0B6F62 for ; Wed, 29 Jun 2011 00:47:52 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752Ab1F1OqQ (ORCPT ); Tue, 28 Jun 2011 10:46:16 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:51772 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756965Ab1F1OnJ (ORCPT ); Tue, 28 Jun 2011 10:43:09 -0400 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e38.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p5SEYcWh024078; Tue, 28 Jun 2011 08:34:38 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p5SEgiae131320; Tue, 28 Jun 2011 08:42:44 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5SEgg6J012118; Tue, 28 Jun 2011 08:42:43 -0600 Received: from elm3c80.beaverton.ibm.com (elm3c80.beaverton.ibm.com [9.47.69.80]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p5SEgexO011493; Tue, 28 Jun 2011 08:42:42 -0600 From: Allison Henderson To: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Allison Henderson Subject: [PATCH 1/2 v7] XFS TESTS: ENOSPC Punch Hole: Move su routines in 123 to common.rc Date: Tue, 28 Jun 2011 07:45:00 -0700 Message-Id: <1309272301-5742-2-git-send-email-achender@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1309272301-5742-1-git-send-email-achender@linux.vnet.ibm.com> References: <1309272301-5742-1-git-send-email-achender@linux.vnet.ibm.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This patch moves the su routines in test 123 to common.rc so that they can also be used in the new test 255 Signed-off-by: Allison Henderson Reviewed-by: Alex Elder --- :100755 100755 27c1e66... ee1194d... M 123 :100644 100644 680631d... 9d68574... M common.rc 123 | 24 ------------------------ common.rc | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/123 b/123 index 27c1e66..ee1194d 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 680631d..9d68574 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 #