From patchwork Thu May 8 18:38:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 4138171 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5338BFF02 for ; Thu, 8 May 2014 18:38:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F318820212 for ; Thu, 8 May 2014 18:38:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DBE3201D3 for ; Thu, 8 May 2014 18:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755289AbaEHSio (ORCPT ); Thu, 8 May 2014 14:38:44 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:57506 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752485AbaEHSio (ORCPT ); Thu, 8 May 2014 14:38:44 -0400 Received: from pps.filterd (m0004077 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id s48IZi9W025844; Thu, 8 May 2014 11:38:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : mime-version : content-type; s=facebook; bh=kRzl2i6qv+WyFk8GeVcCb1qA+RZoEUtKMbzkZ2pwXtc=; b=LCvjfgOqv3PBDT07+B3s5ZKHV7iQa0HDRc1XA5QbcpkDuA+lABnknMTd//AIbO1aCYvG 1tBclf7XRI8GZpeGM26XZozmjlivkrG1UUzeB6fLG7KRqIFYvUCiTLNkBipR60NZPvwt xc6e4HlxEBA5lU7UN0h0qIk+zPTahCOFkC8= Received: from mail.thefacebook.com (mailwest.thefacebook.com [173.252.71.148]) by mx0b-00082601.pphosted.com with ESMTP id 1kqvva4105-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK); Thu, 08 May 2014 11:38:38 -0700 Received: from localhost (192.168.57.29) by mail.thefacebook.com (192.168.16.23) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 8 May 2014 11:38:31 -0700 From: Josef Bacik To: , , Subject: [PATCH] xfstests: fix flink test V2 Date: Thu, 8 May 2014 14:38:30 -0400 Message-ID: <1399574310-13718-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [192.168.57.29] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-05-08_07:2014-05-08, 2014-05-08, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 kscore.is_bulkscore=7.31639595019651e-08 kscore.compositescore=0 circleOfTrustscore=104.175033599216 compositescore=0.999738115633958 urlsuspect_oldscore=0.999738115633958 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=64355 rbsscore=0.999738115633958 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1405080179 X-FB-Internal: deliver 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_SIGNED, 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 I don't have flink support in my xfsprogs, but it doesn't fail with "command not found" or whatever, it fails because I don't have the -T option, whereas Eric gets an error about $TEST_DIR being a directory because his xfs_io tries to open the directory first before it parses the options. So fix this by checking flink with these two cases and don't run if we hit either of them. Thanks, Signed-off-by: Josef Bacik Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- V1->V2: check for "Is a directory" errors that Eric mentioned, move test up into the flink specific case. common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 5c13db5..f37b310 100644 --- a/common/rc +++ b/common/rc @@ -1248,6 +1248,8 @@ _require_xfs_io_command() "flink" ) testio=`$XFS_IO_PROG -T -F -c "flink $testfile" \ $TEST_DIR 2>&1` + echo $testio | egrep -q "invalid option|Is a directory" && \ + _notrun "xfs_io $command support is missing" ;; *) testio=`$XFS_IO_PROG -c "$command help" 2>&1`