public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: fstests@vger.kernel.org, linux-mtd@lists.infradead.org,
	David Gstir <david@sigma-star.at>,
	"Theodore Y . Ts'o" <tytso@mit.edu>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Eric Biggers <ebiggers@google.com>
Subject: Re: [RFC][PATCH 0/2] xfstests on ubifs
Date: Mon, 19 Dec 2016 11:25:20 -0800	[thread overview]
Message-ID: <20161219192520.GA37112@gmail.com> (raw)
In-Reply-To: <16b0ba94-bdef-00c5-acd9-d19200f81ecd@nod.at>

On Mon, Dec 19, 2016 at 08:12:07PM +0100, Richard Weinberger wrote:
> 
> > Note 2: since mkfs.ubifs doesn't support creating encryption-capable filesystems
> > yet (ubifs v5), to get the encryption tests to work I also had to hack
> > _scratch_mkfs_encrypted() to use ubirmvol/ubimkvol instead of mkfs.  I assume
> > that the ubifs developers are planning to update mkfs.ubifs.
> 
> You don't have to run mkfs.ubifs, just mount an empty UBI volume, UBIFS will auto-
> crate a encryption capable fs.

Yeah, that's what I ended up doing.  I didn't include it in the official patch
since it was a complete hack, but here's what I did.  Of course the real
solution would be to update mkfs.ubifs and then just use _scratch_mkfs:

diff --git a/common/encrypt b/common/encrypt
index f09104d..261a1f7 100644
--- a/common/encrypt
+++ b/common/encrypt
@@ -71,6 +71,11 @@ _scratch_mkfs_encrypted()
 	ext4|f2fs)
 		_scratch_mkfs -O encrypt
 		;;
+	ubifs)
+		local ubi=${SCRATCH_DEV%_0}
+		ubirmvol $ubi -N vol
+		ubimkvol $ubi -N vol -m
+		;;
 	*)
 		_notrun "No encryption support for $FSTYP"
 		;;

  reply	other threads:[~2016-12-19 19:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 18:45 [RFC][PATCH 0/2] xfstests on ubifs Eric Biggers
2016-12-19 18:45 ` [RFC][PATCH 1/2] xfstests: add experimental support for ubifs Eric Biggers
2016-12-19 18:45 ` [RFC][PATCH 2/2] xfstests-bld: " Eric Biggers
2016-12-19 19:12 ` [RFC][PATCH 0/2] xfstests on ubifs Richard Weinberger
2016-12-19 19:25   ` Eric Biggers [this message]
2016-12-19 21:31   ` Eric Biggers
2016-12-19 19:48 ` Richard Weinberger
2016-12-19 19:59   ` Eric Biggers
2016-12-19 20:02     ` Richard Weinberger

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=20161219192520.GA37112@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=david@sigma-star.at \
    --cc=ebiggers@google.com \
    --cc=fstests@vger.kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=tytso@mit.edu \
    /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