From patchwork Tue Apr 15 02:52:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 339139 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 006B0140087 for ; Tue, 15 Apr 2014 12:52:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751589AbaDOCwH (ORCPT ); Mon, 14 Apr 2014 22:52:07 -0400 Received: from imap.thunk.org ([74.207.234.97]:54389 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbaDOCwG (ORCPT ); Mon, 14 Apr 2014 22:52:06 -0400 Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.80) (envelope-from ) id 1WZtTg-0005DX-Rw; Tue, 15 Apr 2014 02:52:04 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id C40F4580287; Mon, 14 Apr 2014 22:52:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=thunk.org; s=ef5046eb; t=1397530323; bh=KMnYV41DAHVFHERyW6nTVP6QiBcFxdsNwb130Ok0I2M=; h=From:To:Cc:Subject:Date:From; b=RzKGzKB4GCO9eFcy2rWrZDME/HpqmRvapANoIjOvYGcJeElfMsODLTf/q32d24lwk 3djoXtl3ukdc0h/EKZKv84yLs29TQ+RFmChZC407lYvBluwqH1VhA7rODiadhK7TDq 1T6PZvhMXo7dH51XqyU3W6HG+Nn1QZw1Mqy62tdk= From: Theodore Ts'o To: xfs@oss.sgi.com Cc: Ext4 Developers List , Theodore Ts'o Subject: [PATCH] check: add support for an external test expunging file Date: Mon, 14 Apr 2014 22:52:00 -0400 Message-Id: <1397530320-20579-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.9.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Currently the -X option is intended to specify a set of expunging files which are stored in each test/* subdirectory. As described in the commit description for 0b1e8abd4, in order to exclude the test generic/280, the -X option is used as follows: $ cat tests/generic/3.0-stable-avoid 280 $ sudo ./check -X 3.0-stable-avoid generic/280 However, it is sometimes useful to store the set of expunged tests in a single file, outside of tests/* subdirectories. This commit allows the following: $ cat /root/conf/data_journal.exclude generic/068 ext4/301 $ sudo ./check -X /root/conf/data_journal.exclude -g auto If the argument to the -X option is a pathname (that is, includes a '/' character), treat it as the latter case. If it the argument to the -X option is just a bare filename (that is, does not include '/' character), treat it as the former. Signed-off-by: "Theodore Ts'o" --- check | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/check b/check index e7ace63..791a386 100755 --- a/check +++ b/check @@ -215,12 +215,22 @@ while [ $# -gt 0 ]; do ;; -X) xfile=$2; shift ; - for d in $SRC_GROUPS $FSTYP; do - [ -f $SRC_DIR/$d/$xfile ] || continue - for f in `cat $SRC_DIR/$d/$xfile`; do - echo $d/$f >> $tmp.xlist + case "$xfile" in + */*) if [ -f "$xfile" ]; then + cat "$xfile" >> $tmp.xlist + else + echo "Exclusion file $xfile not found" + exit 1 + fi + ;; + *) for d in $SRC_GROUPS $FSTYP; do + [ -f $SRC_DIR/$d/$xfile ] || continue + for f in `cat $SRC_DIR/$d/$xfile`; do + echo $d/$f >> $tmp.xlist + done done - done + ;; + esac ;; -s) RUN_SECTION="$RUN_SECTION $2"; shift ;; -l) diff="diff" ;;