Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5443055iob; Mon, 9 May 2022 16:59:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHjC9pVVJtf9WTmVcqPB6Us64g4/OS3bMgSO1rdPLAmRtuhTD6cvVWvYhUlxFsfqC5wcc3 X-Received: by 2002:a05:620a:113c:b0:69f:cc58:f8ee with SMTP id p28-20020a05620a113c00b0069fcc58f8eemr13657469qkk.162.1652140794444; Mon, 09 May 2022 16:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652140794; cv=none; d=google.com; s=arc-20160816; b=mzslGKX4nIhKMrZj7sYcXxpHz8MvdKY+19eIThXeuduV2iRppxZJCrUCQNMDxLrktO 65lHm2WTK8jodKj9tBUXCTG3oudQFXd57SKUECdpoo31y9XJGjMsKvFX1Ds9lZDA/D4k O37gNLMOTqFWtn8MbFj103awsWy/1RWAGjRGjfz73Hua6Ipxzd7oI2zJjIak2j0TqKwR GL//nnSDNFHOjwiwaqjmMV7x/BlqRsw5m9mY7g3ecqaQVkkEdUIk1TBMjFJhEgGuOiyc 3vwMd2FwNeVeA0AVqpU+Pa/Fjb1nUymPkE67h31RzBiSdJ1KdJxbjK3SdubIKlNx0tos o8TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cUhEouTqYHT1ph/hVBay7GhpSxzeO3KxW72/kVjrZus=; b=e+qyjI7LbiarONcEHolwkjkNaCMcTNvzlLmRC2u5ux6gQX2YenrjO1UefFRXBC0cxD S5qlLtubU/fbHFYlMpPGFv0paQvG/Lvk++KYHfh02PUytaA4WnwLqzdKvTy9el6tTIqt fBdZnhfwn3ZW+J4sgbDqlIv7ozlp64ujaas447NtoT6G9jD4zv7w/2fQVgftORS4GXSD Be3imSRoQeA38PD0HYwThdrkIgLfuLvbNT0HwiNpeWhucZWMm4PMz1ZDWrSVcP8Ihdre jxB2N4DBCoyObRwv6RmWIABh8tmyeCqUiOQ89tXPL+D/SaEPP7RrIj5kEZqciEGdnoDj 50XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfJSeXVz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020a05622a144200b002f35aeef1f3si9367954qtx.397.2022.05.09.16.59.39; Mon, 09 May 2022 16:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfJSeXVz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbiEIXse (ORCPT + 99 others); Mon, 9 May 2022 19:48:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233324AbiEIXrn (ORCPT ); Mon, 9 May 2022 19:47:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845B21BADEA; Mon, 9 May 2022 16:42:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3C651B819D6; Mon, 9 May 2022 23:42:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B549DC385C5; Mon, 9 May 2022 23:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652139724; bh=5OD7u2labX3wXoga7vb5M7KUlFJtdxZpM/1BshqCnfk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OfJSeXVz5iDYMtN+3exeZQzUnY6o9Ksr/BscLY2rPbjyXWdNzUBM39yafRxV79S16 I+avtLBZoDNKdkFc67ZCtOB8DnLWd5wmGv6/4FRc/+DQQXn7NaDZzwojRJZafaG/0n to56yvUwy2CuHV68sWkHBUJ0HmCqC8u4lpE1xxup2XVbgUCLzVHyeHcAvYiKDO2GjB AAbQKHY42AQVQtZxfpVzOCvZRpT0n3pXYx49cXQ++haNQNeeOOya1IBqW26aHweZST ODYcvFM/mqY+CwzJvndKzsmaO6UA6HJ+rNn1qyeF2X4rY58ukVZFabi0nijZv5vdz5 sQznrfy7mcjCA== Date: Mon, 9 May 2022 16:42:03 -0700 From: Eric Biggers To: Lukas Czerner Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [xfstests PATCH] ext4/053: fix the rejected mount option testing Message-ID: References: <20220430192130.131842-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220430192130.131842-1-ebiggers@kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Apr 30, 2022 at 12:21:30PM -0700, Eric Biggers wrote: > From: Eric Biggers > > 'not_mnt OPTIONS' seems to have been intended to test that the > filesystem cannot be mounted at all with the given OPTIONS, meaning that > the mount fails as opposed to the options being ignored. However, this > doesn't actually work, as shown by the fact that the test case 'not_mnt > test_dummy_encryption=v3' is passing in the !CONFIG_FS_ENCRYPTION case. > Actually ext4 ignores this mount option when !CONFIG_FS_ENCRYPTION. > (The ext4 behavior might be changed, but that is besides the point.) > > The problem is that the do_mnt() helper function is being misused in a > context where a mount failure is expected, and it does some additional > remount tests that don't make sense in that context. So if the mount > unexpectedly succeeds, then one of these later tests can still "fail", > causing the unexpected success to be shadowed by a later failure, which > causes the overall test case to pass since it expects a failure. > > Fix this by reworking not_mnt() and not_remount_noumount() to use > simple_mount() in cases where they are expecting a failure. Also fix > up some of the naming and calling conventions to be less confusing. > Finally, make sure to test that remounting fails too, not just mounting. > > Signed-off-by: Eric Biggers > --- > tests/ext4/053 | 148 ++++++++++++++++++++++++++----------------------- > 1 file changed, 78 insertions(+), 70 deletions(-) Lukas, any thoughts on this patch? You're the author of this test. - Eric