From patchwork Thu Jun 9 18:41:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 9167735 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 8D10860467 for ; Thu, 9 Jun 2016 18:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8333C2835B for ; Thu, 9 Jun 2016 18:41:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 782682835E; Thu, 9 Jun 2016 18:41:49 +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_SIGNED, 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 051BD2835B for ; Thu, 9 Jun 2016 18:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751344AbcFISls (ORCPT ); Thu, 9 Jun 2016 14:41:48 -0400 Received: from imap.thunk.org ([74.207.234.97]:33770 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbcFISls (ORCPT ); Thu, 9 Jun 2016 14:41:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=Message-Id:Date:Subject:Cc:To:From; bh=dAriXzowtHLhqc1O2ELRIC9F4Iv/lohspaKU+OF48Xo=; b=GsOe8c0tl4dxbARrcDSTsGSfAaBmTPkPj9Ic0bbSS5nQgF0gnz5A8nINr7OPfnxtEunwMyrDY5Qeerx6jA0B+anZCv79HXuRow5ibTHABKM0/EhZfgE4dLz223tOIGJ35H6sd4iDU+5dsWSmhyOlMZ37wnGadYEGcSb+P6Nekyk=; Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.84_2) (envelope-from ) id 1bB4tm-0005Zr-JO; Thu, 09 Jun 2016 18:41:46 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 0208282EF0E; Thu, 9 Jun 2016 14:41:45 -0400 (EDT) From: Theodore Ts'o To: fstests@vger.kernel.org Cc: Theodore Ts'o Subject: [PATCH] defrag: test $TEST_DEV for extents for ext4 defrag Date: Thu, 9 Jun 2016 14:41:09 -0400 Message-Id: <1465497669-3137-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 2.5.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: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 902223bdbbf2: "defrag: require extents support for ext4 defrag" added a test to make sure the ext4 file system has extents enabled by testing the scratch device. Unfortunately at the time when _require_defrag is run, the scratch file system hasn't been initialized yet by the test, so its contents are undefined. If the previous test explicitly creates a file system with extents disabled on $SCRATCH_DEV (such as ext4/306), then subsequent tests (e.g., ext4/307 and ext4/306) will refuse to run. Fix this by testing $TEST_DEV instead of $SCRATCH_DEV. Signed-off-by: Theodore Ts'o --- common/defrag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/defrag b/common/defrag index 44fc536..7db0cb4 100644 --- a/common/defrag +++ b/common/defrag @@ -33,7 +33,7 @@ _require_defrag() else DEFRAG_PROG="$E4DEFRAG_PROG" fi - dumpe2fs -h $SCRATCH_DEV 2> /dev/null | grep -wq extent || \ + dumpe2fs -h $TEST_DEV 2> /dev/null | grep -wq extent || \ _notrun "file system does not have extents, needed for defrag" ;; btrfs)