From patchwork Fri Jun 1 10:44:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10442953 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 A4194601D3 for ; Fri, 1 Jun 2018 10:42:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95C4228E85 for ; Fri, 1 Jun 2018 10:42:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A12828E8D; Fri, 1 Jun 2018 10:42:51 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 36C6528E85 for ; Fri, 1 Jun 2018 10:42:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbeFAKmu (ORCPT ); Fri, 1 Jun 2018 06:42:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34255 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbeFAKmt (ORCPT ); Fri, 1 Jun 2018 06:42:49 -0400 Received: by mail-wm0-f67.google.com with SMTP id q4-v6so5972819wmq.1; Fri, 01 Jun 2018 03:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fMMTVEIaZK62SANok7gCnBt/uLRg4SjjdTQrtNNF6Zs=; b=dHllSCkpdIJH/4D3LNVZRFvxTGKv7dEoD+MIK8JOVg6g6UE/bPs+e0MlZ+FLmjXzwO b2noCpucBoHIjMD58gw4UAIBGMr13JBDHm9G8gE0OoARg4+8aM4n5d6l7inExgvS4WBj 2HbBt9gyb3vOH9mZBYUshLa8ChddSXFQrhj7lAwHlPj6NztUY/hxUgQDnWyoo8elTBjU O5Z/2gf7kAL2xLX6CPcyqevqrWX25RiZon5zQ3PRqo4fXkcGC91lzsFsJUZF8dkxPhNY KDEGaBJ2EraxRmjcfDQ/Vw/XcTU2Ai9hO2ut/48RvvZ0HUfD9YmkwUd3u+1ox/JvHij2 u3/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fMMTVEIaZK62SANok7gCnBt/uLRg4SjjdTQrtNNF6Zs=; b=ckvoayfma8vyF2BcI1yzGhUn9J94kY2CqpPPxgOSgG6ImyCV/pqdvHJxSR5cd5UFnE wA1rfx80V+H2FoJZpYX4ibEmFXetUnrmmT0Ngb8Zwgrh98zHLWPYH2mzF18Zdu5qRPTe azohuYxL9xJTRoTNQ82svJmEXXpagMisoCZKL6krL47EA3rJvDhbFPaM/k0XEY8Z7kJO FPRPbcTj5SDlGR/A/UjZ32Rjsj93IANjPFcb1HN9znc9iCCq/pJeNfbH5IFuBSPRpy9d GCNZO6Bpti+Yp8nbSE1wgZK7WLx3fXa32WwphLLdX6utca4Tff9yjjb3vdnL96RMH/XD Vp8w== X-Gm-Message-State: APt69E3EYfr9GEKTJrNCh53yXKYmGM9i1nrVgvDTJ+GGg0HILGNb6b4j MGJxllWC1NYkj/3bQXLxlR8= X-Google-Smtp-Source: ADUXVKLZekNBe715pfplprKvljLYZzVNmX3inVwC5sVei9RxiLqFCMtMdoTNEEgFAxr5LbU6mqomzw== X-Received: by 2002:a1c:6f5a:: with SMTP id k87-v6mr2143690wmc.142.1527849768210; Fri, 01 Jun 2018 03:42:48 -0700 (PDT) Received: from localhost.localdomain ([141.226.15.87]) by smtp.gmail.com with ESMTPSA id 135-v6sm2975578wmx.21.2018.06.01.03.42.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Jun 2018 03:42:47 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , Vivek Goyal , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 1/2] overlay: nicer report when features are not supported Date: Fri, 1 Jun 2018 13:44:16 +0300 Message-Id: <1527849857-22951-2-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527849857-22951-1-git-send-email-amir73il@gmail.com> References: <1527849857-22951-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit ea7ad43 ("fstests: implement require of multiple overlayfs features") changed the message when tests are not run due to missing overlayfs feature. Restore the check for existing module param before trying to mount which restores the old message format, e.g.: [not run] feature 'metacopy' not supported by overlay Signed-off-by: Amir Goldstein --- common/overlay | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/overlay b/common/overlay index e99e64f..b526f24 100644 --- a/common/overlay +++ b/common/overlay @@ -140,9 +140,6 @@ __check_scratch_overlay_feature() # configurable from Kconfig (the build default), by module # parameter (the system default) and per mount by mount # option ${feature}=[on|off]. - # - # If the module parameter does not exist then there is no - # point in checking the mount option. local default=`_get_fs_module_param ${feature}` [ "$default" = Y ] || [ "$default" = N ] || \ _notrun "feature '${feature}' not supported by ${FSTYP}" @@ -164,12 +161,16 @@ _require_scratch_overlay_features() local opts="rw" for feature in ${features[*]}; do + # If the module parameter does not exist then there is no + # point in checking the mount option. + _get_fs_module_param ${feature} > /dev/null 2>&1 || \ + _notrun "feature '${feature}' not supported by overlay" opts+=",${feature}=on" done _scratch_mkfs > /dev/null 2>&1 _try_scratch_mount -o $opts || \ - _notrun "overlay options '$opts' cannot be enabled on ${SCRATCH_DEV}" + _notrun "overlay features '${features[*]}' cannot be enabled on ${SCRATCH_DEV}" for feature in ${features[*]}; do __check_scratch_overlay_feature ${feature}