* [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file
@ 2018-04-19 20:50 Eric Biggers
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Eric Biggers @ 2018-04-19 20:50 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Eric Biggers, fstests, linux-f2fs-devel
From: Eric Biggers <ebiggers@google.com>
setup_mount_opts() is supposed to prepend "-o " to the mount options,
but it failed to do so in the case where mount options are specified in
a config file rather than on the command line. Fix it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
index b0c2196..94c402b 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
@@ -31,12 +31,9 @@ function format_filesystem()
function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
- if test -n "$F2FS_MOUNT_OPTIONS" ; then
- export F2FS_MOUNT_OPTIONS="$F2FS_MOUNT_OPTIONS,$MNTOPTS"
- else
- export F2FS_MOUNT_OPTIONS="-o $MNTOPTS"
- fi
+ F2FS_MOUNT_OPTIONS+="${F2FS_MOUNT_OPTIONS:+,}$MNTOPTS"
fi
+ export F2FS_MOUNT_OPTIONS="${F2FS_MOUNT_OPTIONS:+-o }$F2FS_MOUNT_OPTIONS"
}
function get_mkfs_opts()
--
2.17.0.484.g0c8726318c-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs
2018-04-19 20:50 [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
@ 2018-04-19 20:50 ` Eric Biggers
2018-04-30 19:13 ` Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
2018-04-30 19:13 ` [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
2 siblings, 2 replies; 6+ messages in thread
From: Eric Biggers @ 2018-04-19 20:50 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Eric Biggers, fstests, linux-f2fs-devel
From: Eric Biggers <ebiggers@google.com>
Allow testing f2fs using the test_dummy_encryption mount option,
available with f2fs in kernel 4.17 and later. E.g.,
gce-xfstests -c f2fs/encrypt -g auto
This is the f2fs equivalent of ext4/encrypt.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
.../test-appliance/files/root/fs/f2fs/cfg/all.list | 1 +
.../test-appliance/files/root/fs/f2fs/cfg/encrypt | 5 +++++
.../test-appliance/files/root/fs/f2fs/config | 12 ++++++++++++
3 files changed, 18 insertions(+)
create mode 100644 kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
index 4ad96d5..bc796ff 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
@@ -1 +1,2 @@
default
+encrypt
diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
new file mode 100644
index 0000000..0e4e8ab
--- /dev/null
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
@@ -0,0 +1,5 @@
+SIZE=small
+export MKFS_OPTIONS="-O encrypt"
+export F2FS_MOUNT_OPTIONS="test_dummy_encryption"
+REQUIRE_FEATURE=encryption
+TESTNAME="F2FS encryption"
diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
index 94c402b..3857d5d 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
@@ -33,6 +33,18 @@ function setup_mount_opts()
if test -n "$MNTOPTS" ; then
F2FS_MOUNT_OPTIONS+="${F2FS_MOUNT_OPTIONS:+,}$MNTOPTS"
fi
+ if echo ",$F2FS_MOUNT_OPTIONS," | grep -q ',test_dummy_encryption,'; then
+ local mode='\x00\x00\x00\x00'
+ local raw="$(printf ""\\\\x%02x"" $(seq 0 63))"
+ if lscpu | grep "Byte Order" | grep -q Little ; then
+ local size='\x40\x00\x00\x00'
+ else
+ local size='\x00\x00\x00\x40'
+ fi
+ local key="${mode}${raw}${size}"
+ keyctl new_session >& /dev/null
+ echo -n -e "${key}" | keyctl padd logon fscrypt:4242424242424242 @s >& /dev/null
+ fi
export F2FS_MOUNT_OPTIONS="${F2FS_MOUNT_OPTIONS:+-o }$F2FS_MOUNT_OPTIONS"
}
--
2.17.0.484.g0c8726318c-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file
2018-04-19 20:50 [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
@ 2018-04-30 19:13 ` Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
2 siblings, 0 replies; 6+ messages in thread
From: Eric Biggers @ 2018-04-30 19:13 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Eric Biggers, fstests, linux-f2fs-devel
On Thu, Apr 19, 2018 at 01:50:19PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> setup_mount_opts() is supposed to prepend "-o " to the mount options,
> but it failed to do so in the case where mount options are specified in
> a config file rather than on the command line. Fix it.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> index b0c2196..94c402b 100644
> --- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> +++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> @@ -31,12 +31,9 @@ function format_filesystem()
> function setup_mount_opts()
> {
> if test -n "$MNTOPTS" ; then
> - if test -n "$F2FS_MOUNT_OPTIONS" ; then
> - export F2FS_MOUNT_OPTIONS="$F2FS_MOUNT_OPTIONS,$MNTOPTS"
> - else
> - export F2FS_MOUNT_OPTIONS="-o $MNTOPTS"
> - fi
> + F2FS_MOUNT_OPTIONS+="${F2FS_MOUNT_OPTIONS:+,}$MNTOPTS"
> fi
> + export F2FS_MOUNT_OPTIONS="${F2FS_MOUNT_OPTIONS:+-o }$F2FS_MOUNT_OPTIONS"
> }
>
> function get_mkfs_opts()
> --
> 2.17.0.484.g0c8726318c-goog
>
Ping.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
@ 2018-04-30 19:13 ` Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
1 sibling, 0 replies; 6+ messages in thread
From: Eric Biggers @ 2018-04-30 19:13 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Eric Biggers, fstests, linux-f2fs-devel
On Thu, Apr 19, 2018 at 01:50:20PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Allow testing f2fs using the test_dummy_encryption mount option,
> available with f2fs in kernel 4.17 and later. E.g.,
>
> gce-xfstests -c f2fs/encrypt -g auto
>
> This is the f2fs equivalent of ext4/encrypt.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> .../test-appliance/files/root/fs/f2fs/cfg/all.list | 1 +
> .../test-appliance/files/root/fs/f2fs/cfg/encrypt | 5 +++++
> .../test-appliance/files/root/fs/f2fs/config | 12 ++++++++++++
> 3 files changed, 18 insertions(+)
> create mode 100644 kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
>
> diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
> index 4ad96d5..bc796ff 100644
> --- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
> +++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/all.list
> @@ -1 +1,2 @@
> default
> +encrypt
> diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
> new file mode 100644
> index 0000000..0e4e8ab
> --- /dev/null
> +++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/cfg/encrypt
> @@ -0,0 +1,5 @@
> +SIZE=small
> +export MKFS_OPTIONS="-O encrypt"
> +export F2FS_MOUNT_OPTIONS="test_dummy_encryption"
> +REQUIRE_FEATURE=encryption
> +TESTNAME="F2FS encryption"
> diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> index 94c402b..3857d5d 100644
> --- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> +++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
> @@ -33,6 +33,18 @@ function setup_mount_opts()
> if test -n "$MNTOPTS" ; then
> F2FS_MOUNT_OPTIONS+="${F2FS_MOUNT_OPTIONS:+,}$MNTOPTS"
> fi
> + if echo ",$F2FS_MOUNT_OPTIONS," | grep -q ',test_dummy_encryption,'; then
> + local mode='\x00\x00\x00\x00'
> + local raw="$(printf ""\\\\x%02x"" $(seq 0 63))"
> + if lscpu | grep "Byte Order" | grep -q Little ; then
> + local size='\x40\x00\x00\x00'
> + else
> + local size='\x00\x00\x00\x40'
> + fi
> + local key="${mode}${raw}${size}"
> + keyctl new_session >& /dev/null
> + echo -n -e "${key}" | keyctl padd logon fscrypt:4242424242424242 @s >& /dev/null
> + fi
> export F2FS_MOUNT_OPTIONS="${F2FS_MOUNT_OPTIONS:+-o }$F2FS_MOUNT_OPTIONS"
> }
>
> --
> 2.17.0.484.g0c8726318c-goog
>
Ping.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file
2018-04-19 20:50 [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
2018-04-30 19:13 ` [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
@ 2018-05-01 2:17 ` Theodore Y. Ts'o
2 siblings, 0 replies; 6+ messages in thread
From: Theodore Y. Ts'o @ 2018-05-01 2:17 UTC (permalink / raw)
To: Eric Biggers; +Cc: Eric Biggers, fstests, linux-f2fs-devel
On Thu, Apr 19, 2018 at 01:50:19PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> setup_mount_opts() is supposed to prepend "-o " to the mount options,
> but it failed to do so in the case where mount options are specified in
> a config file rather than on the command line. Fix it.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
2018-04-30 19:13 ` Eric Biggers
@ 2018-05-01 2:17 ` Theodore Y. Ts'o
1 sibling, 0 replies; 6+ messages in thread
From: Theodore Y. Ts'o @ 2018-05-01 2:17 UTC (permalink / raw)
To: Eric Biggers; +Cc: Eric Biggers, fstests, linux-f2fs-devel
On Thu, Apr 19, 2018 at 01:50:20PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Allow testing f2fs using the test_dummy_encryption mount option,
> available with f2fs in kernel 4.17 and later. E.g.,
>
> gce-xfstests -c f2fs/encrypt -g auto
>
> This is the f2fs equivalent of ext4/encrypt.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-01 2:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 20:50 [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
2018-04-19 20:50 ` [xfstests-bld PATCH 2/2] test-appliance: add 'encrypt' config for f2fs Eric Biggers
2018-04-30 19:13 ` Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
2018-04-30 19:13 ` [xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file Eric Biggers
2018-05-01 2:17 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).