From patchwork Mon Feb 10 12:10:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 3618461 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D90019F2D6 for ; Mon, 10 Feb 2014 12:13:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCE03201B6 for ; Mon, 10 Feb 2014 12:13:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 110CA2017D for ; Mon, 10 Feb 2014 12:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337AbaBJMNN (ORCPT ); Mon, 10 Feb 2014 07:13:13 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:49995 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbaBJMNN (ORCPT ); Mon, 10 Feb 2014 07:13:13 -0500 Received: by mail-pa0-f54.google.com with SMTP id fa1so6160241pad.27 for ; Mon, 10 Feb 2014 04:13:12 -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=AEJxpW21Iequ7mcMcC5TcaSPOo+qfcscS7DJBoYrL2o=; b=g6vOU9TxUPFcfD7rlu56q37/TgkE92i+OiQmBxRq7aUdrSUHy71oQNaj5zam3Qp6ZK dlfOO8v/cnJ7mWmwtDHQ+TUELguFL7DqijXNj/gvHOqn5FzUdzRR+UsUBWCKXlTfHyEH qcA/Jj0JLesU2zHHdKBlmuAxerPkYAgixjmTAiBzkPCy4Fxx6MRl/ugI/XhNhrNIDtWk hThHZZsm+ULPLb0i5CptCQrbBwlYGIXdkdVqh8JgGGDsre5LPH4roznc/ZGRk+RKAS3m HrFSOMRmA6gzl+GougGQhrbEDYxfjI4tzwoElZO7a8TwTxIsCOa7GaVnFvutrNxPyyh5 mIeg== X-Received: by 10.66.194.2 with SMTP id hs2mr25148359pac.79.1392034392503; Mon, 10 Feb 2014 04:13:12 -0800 (PST) Received: from linux-b0ol.site ([223.65.191.132]) by mx.google.com with ESMTPSA id da3sm41923788pbc.30.2014.02.10.04.13.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2014 04:13:11 -0800 (PST) From: Wang Shilong To: xfs@oss.sgi.com Cc: linux-btrfs@vger.kernel.org, Wang Shilong Subject: [PATCH] xfstests: btrfs/004: fix to make test really work Date: Mon, 10 Feb 2014 20:10:56 +0800 Message-Id: <1392034256-2412-1-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.8.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wang Shilong So i was wandering why test 004 could pass my previous wrong kernel patch while it defenitely should not. By some debugging, i found here perl script is wrong, we did not filter out anything and this unit test did not work acutally.so it came out we will never fail this test. Signed-off-by: Wang Shilong --- tests/btrfs/004 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) mode change 100755 => 100644 tests/btrfs/004 diff --git a/tests/btrfs/004 b/tests/btrfs/004 old mode 100755 new mode 100644 index 14da9f1..17a6e34 --- a/tests/btrfs/004 +++ b/tests/btrfs/004 @@ -57,10 +57,9 @@ _require_command "/usr/sbin/filefrag" rm -f $seqres.full -FILEFRAG_FILTER='if (/, blocksize (\d+)/) {$blocksize = $1; next} ($ext, '\ -'$logical, $physical, $expected, $length, $flags) = (/^\s*(\d+)\s+(\d+)'\ -'\s+(\d+)\s+(?:(\d+)\s+)?(\d+)\s+(.*)/) or next; $flags =~ '\ -'/(?:^|,)inline(?:,|$)/ and next; print $physical * $blocksize, "#", '\ +FILEFRAG_FILTER='if (/blocks of (\d+) bytes/) {$blocksize = $1; next} ($ext, '\ +'$logical, $physical, $length) = (/^\s*(\d+):\s+(\d+)..\s+\d+:'\ +'\s+(\d+)..\s+\d+:\s+(\d+):/) or next; print $physical * $blocksize, "#", '\ '$length * $blocksize, "#", $logical * $blocksize, " "' # this makes filefrag output script readable by using a perl helper.