From patchwork Wed Feb 3 16:02:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 8204731 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28454BEEE5 for ; Wed, 3 Feb 2016 16:02:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 574502025B for ; Wed, 3 Feb 2016 16:02:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6119D201FE for ; Wed, 3 Feb 2016 16:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756900AbcBCQCP (ORCPT ); Wed, 3 Feb 2016 11:02:15 -0500 Received: from casper.infradead.org ([85.118.1.10]:52775 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756406AbcBCQCP (ORCPT ); Wed, 3 Feb 2016 11:02:15 -0500 Received: from chello080109146114.tirol.surfer.at ([80.109.146.114] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.85 #2 (Red Hat Linux)) id 1aQzsj-00026Y-SW; Wed, 03 Feb 2016 16:02:14 +0000 From: Christoph Hellwig To: darrick.wong@oracle.com Cc: fstests@vger.kernel.org Subject: [PATCH 4/4] xfstests: 899 requires a working filefrag Date: Wed, 3 Feb 2016 17:02:08 +0100 Message-Id: <1454515328-1586-5-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454515328-1586-1-git-send-email-hch@lst.de> References: <1454515328-1586-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 See http://www.infradead.org/rpr.html NFS has neither FIBMAP nor FIEMAP so filefrag will fail. Handle this case gracefully. Signed-off-by: Christoph Hellwig --- tests/generic/899 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generic/899 b/tests/generic/899 index 9b3f973..ce3db38 100755 --- a/tests/generic/899 +++ b/tests/generic/899 @@ -67,6 +67,10 @@ nr=64 _pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full" _pwrite_byte 0x62 0 $((blksz * nr)) "$testdir/file3" >> "$seqres.full" _pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1.chk" >> "$seqres.full" + +filefrag -v "$testdir/file1" 2>&1 | grep -q "FIBMAP: Invalid argument" && \ + _notrun "filefrag not support on file system type \"$FSTYP\"" + seq 1 2 $((nr-1)) | while read f; do _reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full" done