From patchwork Wed Feb 11 17:11:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 5813831 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 8F923BF440 for ; Wed, 11 Feb 2015 17:11:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EDF420211 for ; Wed, 11 Feb 2015 17:11:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF7D0201FE for ; Wed, 11 Feb 2015 17:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753103AbbBKRLM (ORCPT ); Wed, 11 Feb 2015 12:11:12 -0500 Received: from sandeen.net ([63.231.237.45]:51067 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344AbbBKRLL (ORCPT ); Wed, 11 Feb 2015 12:11:11 -0500 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 1022D60EF996; Wed, 11 Feb 2015 11:11:10 -0600 (CST) Message-ID: <54DB8D2D.20104@sandeen.net> Date: Wed, 11 Feb 2015 11:11:09 -0600 From: Eric Sandeen MIME-Version: 1.0 To: Boaz Harrosh , Dave Chinner , xfs@oss.sgi.com, linux-fsdevel , fstests@vger.kernel.org Subject: [PATCH] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin References: <54DB35F0.1010203@plexistor.com> In-Reply-To: <54DB35F0.1010203@plexistor.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 mkfs programs may live in either /sbin or /usr/sbin, and the current regexp in this test only catches the latter, and so the test wont' run properly for the former. Fix this by iterating over each full path to every mkfs.${FS} program in ${MKFS.PROG}.*, and extracting the ${FS} part. We found the paths in the first place by using a wildcard with the found ${MKFS_PROG}, so we can use that string to filter out everything except the wildcard match at the end, which is the fs name we are looking for. Reported-by: Boaz Harrosh Signed-off-by: Eric Sandeen --- -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/shared/032 b/tests/shared/032 index a410003..8ffb54b 100755 --- a/tests/shared/032 +++ b/tests/shared/032 @@ -50,8 +50,9 @@ if [ "$FSTYP" == "btrfs" ]; then fi echo "Silence is golden." -for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'` +for mkfs in `echo ${MKFS_PROG}.*` do + fs=`echo $mkfs | sed -e s:${MKFS_PROG}.::` preop="" # for special input needs preargs="" # for any special pre-device options postargs="" # for any special post-device options