From patchwork Thu Dec 8 13:34:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9466387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ED336071E for ; Thu, 8 Dec 2016 13:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A6BA28068 for ; Thu, 8 Dec 2016 13:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D64E2843C; Thu, 8 Dec 2016 13:34:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1B7428068 for ; Thu, 8 Dec 2016 13:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932234AbcLHNew (ORCPT ); Thu, 8 Dec 2016 08:34:52 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34616 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbcLHNew (ORCPT ); Thu, 8 Dec 2016 08:34:52 -0500 Received: by mail-wm0-f65.google.com with SMTP id g23so3627194wme.1 for ; Thu, 08 Dec 2016 05:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=+4RVaxP/6VdR/Ka0gAmBaM944hV+ASqEGB+Rsdvs27s=; b=X9pQsUDhtxWxgJyaHLnhmZ7FSWg9X2gd7nKLPl+zK+n3oYYj4lUUrVxlj2HuLpDO4X DwENKH3VlpPjTV6i4zVdG69/I7JWEAz+ZnC4TcbhIKSOQRYYB4nLrJHhqjolwvs3Kxnf QT3jiNwdtECLO9B0SX3qhV7BGsSFIdieZ78BO4y7104Jb0LkAv0wxWzlQxqyEunkaFjq +zYH//HU5EU0auqFi/W7M/a31/HtUHiyS9N1+lm7OyNdNzxJMMg3yVJc0C4UY8lZzrGp 0YGLDPlz3VAUpBnz7V2w+vygrT7qQZjaaczQAaEbe5HMj9Q2GajsrvDBszQRkccJWE2x fIXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+4RVaxP/6VdR/Ka0gAmBaM944hV+ASqEGB+Rsdvs27s=; b=FF/OQGauypFoXY3ctEN3N714xDpNrUETXJ/8tE3alHZQk+mkrEUWl49dJ82AJ06YoG Bn9iHfJoEsHoQlFE4rgKFte2ABI+PnzqMjSeHw8ecDsSVk7DVv0yIrGeehfU+lfvUP2X CkTI2WU27KDpiatmYcU1QkdJYNSSMdDwxyh1K6knqRoUhFNQmiP6pIPdXbs8Hh9FzlBp nw7hxtMsXYLWm1F5MngYn//YfMkrRMhb2N6E9SJ6VNyI1Z20MPheDgFDuISK4/MLQB5c TJSXxMkNga9KS0a54ZO6U5XXFRYm+XJEGsOKENjXqWJmqiCbns1FZRu+p7eWN7D9PFA9 n8BA== X-Gm-Message-State: AKaTC01UpWhlmW2BDysjTu1TJQrC38++ha4ihk0shz3w4vFOeqezxJQelsSXsDohjorinQ== X-Received: by 10.28.152.67 with SMTP id a64mr18629wme.1.1481204090358; Thu, 08 Dec 2016 05:34:50 -0800 (PST) Received: from amir-VirtualBox.ctera.local (bzq-82-81-193-202.cablep.bezeqint.net. [82.81.193.202]) by smtp.gmail.com with ESMTPSA id yg1sm37001397wjb.12.2016.12.08.05.34.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Dec 2016 05:34:49 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: Dave Chinner , fstests@vger.kernel.org Subject: [PATCH] common: fix excluding test groups Date: Thu, 8 Dec 2016 15:34:30 +0200 Message-Id: <1481204070-10881-1-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The -x flag is used to exclude tests that belong to certain groups from the test args list. When the test args list is expressed as a match pattern, -x fails to exclude the tests that match the pattern and belong to excluded groups. For example: $ ./check -n -x xfs/??? | wc -l 341 $ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l 341 After the fix: $ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l 315 This bug seems to date back to this git repo epoc. Signed-off-by: Amir Goldstein --- check | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/check b/check index 8f2a1bb..9732460 100755 --- a/check +++ b/check @@ -158,11 +158,14 @@ _timestamp() _prepare_test_list() { unset list + touch $tmp.list # Tests specified on the command line if [ -s $tmp.arglist ]; then - cat $tmp.arglist > $tmp.list - else - touch $tmp.list + # flatten multi tests line (tests/$fs/???) to 1 test per line + list=$(cat $tmp.arglist) + for t in $list; do + echo "$t" >> $tmp.list + done fi # Specified groups to include