public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Ari Sundholm <ari@tuxera.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common/encrypt: Create an encrypted equivalent of _scratch_mkfs_sized
Date: Thu, 21 Dec 2017 12:38:02 +1100	[thread overview]
Message-ID: <20171221013802.GP5858@dastard> (raw)
In-Reply-To: <1513792000-25462-1-git-send-email-ari@tuxera.com>

On Wed, Dec 20, 2017 at 07:46:40PM +0200, Ari Sundholm wrote:
> Test case generic/399 hardcodes "-O encrypt" in MKFS_OPTIONS when
> calling _scratch_mkfs_sized, which only works with the mkfs of certain
> filesystems. Create a new helper, _scratch_mkfs_sized_encrypted, for
> handling the differences between the mkfs tools of different
> filesystems. It also allows those filesystems whose mkfs doesn't accept
> "-O encrypt" to skip the test gracefully until proper support is added
> for them in the helper.
> 
> Signed-off-by: Ari Sundholm <ari@tuxera.com>
> ---
>  common/encrypt    | 12 ++++++++++++
>  tests/generic/399 |  3 +--
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/common/encrypt b/common/encrypt
> index a6fd89d..189c59e 100644
> --- a/common/encrypt
> +++ b/common/encrypt
> @@ -81,6 +81,18 @@ _scratch_mkfs_encrypted()
>  	esac
>  }
>  
> +_scratch_mkfs_sized_encrypted()
> +{
> +	case $FSTYP in
> +	ext4|f2fs)
> +		MKFS_OPTIONS="$MKFS_OPTIONS -O encrypt" _scratch_mkfs_sized $*
> +		;;

This does not need to screw around with MKFS_OPTIONS. This:

		_scratch_mkfs_sized -O encrypt $*

Will do just fine.

Also, _scratch_mkfs_encrypted() supports UBIFS, and this new
function doesn't. Seems like it should to me...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2017-12-21  1:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 17:46 [PATCH] common/encrypt: Create an encrypted equivalent of _scratch_mkfs_sized Ari Sundholm
2017-12-21  1:38 ` Dave Chinner [this message]
2017-12-21 13:52   ` Ari Sundholm
2017-12-21 17:40     ` Ari Sundholm
2017-12-21 21:46     ` Dave Chinner
2017-12-21 22:17       ` Ari Sundholm
2017-12-22  5:09       ` Eryu Guan
2017-12-21 22:10 ` [PATCH v2] " Ari Sundholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171221013802.GP5858@dastard \
    --to=david@fromorbit.com \
    --cc=ari@tuxera.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox