From patchwork Thu Apr 26 06:45:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 904887 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cn.fujitsu.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40WnvQ5YcJz9s0W for ; Thu, 26 Apr 2018 16:57:50 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3A6FE3E6534 for ; Thu, 26 Apr 2018 08:57:47 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id 117EC3E64F9 for ; Thu, 26 Apr 2018 08:57:44 +0200 (CEST) Received: from heian.cn.fujitsu.com (unknown [183.91.158.132]) by in-5.smtp.seeweb.it (Postfix) with ESMTP id 2B1C8600042 for ; Thu, 26 Apr 2018 08:57:21 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="39332345" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 26 Apr 2018 14:56:32 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id DA1D34B3148E; Thu, 26 Apr 2018 14:56:29 +0800 (CST) Received: from RHEL7U5Alpha_SERVER.g08.fujitsu.local (10.167.220.185) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 26 Apr 2018 14:56:29 +0800 From: Xiao Yang To: Date: Thu, 26 Apr 2018 14:45:37 +0800 Message-ID: <1524725137-32739-2-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1524725137-32739-1-git-send-email-yangx.jy@cn.fujitsu.com> References: <1524725137-32739-1-git-send-email-yangx.jy@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.220.185] X-yoursite-MailScanner-ID: DA1D34B3148E.AB510 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com X-Spam-Status: No, score=1.3 required=7.0 tests=RDNS_NONE autolearn=disabled version=3.4.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Cc: ltp@lists.linux.it Subject: [LTP] [PATCH 2/2] commands/file01: Fix "python3" match failure X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" On some distros(e.g. RHEL6.9GA), we got the mismatched output by running 'file in.py': ---------------------------------------------- in.py: a /usr/bin/env python3 script text executable ---------------------------------------------- We just match both python and python3 to fix this issue. Signed-off-by: Xiao Yang --- testcases/commands/file/file01.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/commands/file/file01.sh b/testcases/commands/file/file01.sh index e04b32e..5a81b3b 100755 --- a/testcases/commands/file/file01.sh +++ b/testcases/commands/file/file01.sh @@ -84,8 +84,8 @@ do_test() 7) file_test in.pl "[pP]erl script, ASCII text executable" \ "[pP]erl script text executable" \ "a /usr/bin/perl script text";; - 8) file_test in.py "[pP]ython script, ASCII text executable" \ - "[pP]ython script text executable";; + 8) file_test in.py "[pP]ython3\{0,1\} script, ASCII text executable" \ + "[pP]ython3\{0,1\} script text executable";; 9) file_test in.m4 "M4 macro processor script, ASCII text" \ "ASCII M4 macro language pre-processor text";; 10) file_test in "ELF .*-bit $TEST_ARCH executable, .*" \