Merge lp:~zmanji/ecryptfs/1270455 into lp:ecryptfs

Proposed by Zameer Manji
Status: Rejected
Rejected by: Tyler Hicks
Proposed branch: lp:~zmanji/ecryptfs/1270455
Merge into: lp:ecryptfs
Diff against target: 52 lines (+13/-2)
2 files modified
tests/lib/etl_funcs.sh (+1/-1)
tests/run_tests.sh (+12/-1)
To merge this branch: bzr merge lp:~zmanji/ecryptfs/1270455
Reviewer Review Type Date Requested Status
Tyler Hicks Disapprove
Review via email: mp+202197@code.launchpad.net

Description of the change

This fixes Launchpad Bug 1270455 by allowing the tester to pass arbitrary mount flags to the test runner.

To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hi Zameer - I apologize for it taking so long for us to get to this merge proposal. I'm slowly trying to get on top of outstanding maintenance tasks.

This is a simple and needed change, but I don't want to add an option to run_tests.sh at this point. There are a very small number of people that would ever want to change the test mount options and the command line options of run_test.sh are getting more complex than I would like.

Additionally, I think users of run_tests.sh would expect the -o flag to be used to set the mount options, not append an option. One may also just want to replace or change an existing default mount option. I think we need to give it a little more thought before we use the -o option...

You can currently overwrite the default test mount options by setting the ETL_MOUNT_OPTS environment variable. However, that doesn't solve your problem because you want to simply append an additional mount option onto the list of defaults. So, I propose that we create a new environment variable, ETL_APPENDED_MOUNT_OPTS, that can be set when running the tests.

I've created a merge proposal here:

https://code.launchpad.net/~tyhicks/ecryptfs/lp1270455/+merge/226229

review: Disapprove

Unmerged revisions

825. By Zameer Manji

Adding -o flags option to pass arbitrary flags to ecryptfs through the test harness.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/lib/etl_funcs.sh'
--- tests/lib/etl_funcs.sh 2013-01-14 13:53:10 +0000
+++ tests/lib/etl_funcs.sh 2014-01-18 17:13:47 +0000
@@ -32,7 +32,7 @@
32default_ext2_opts="user_xattr,acl"32default_ext2_opts="user_xattr,acl"
33default_ext3_opts="user_xattr,acl,commit=600,barrier=1,data=ordered"33default_ext3_opts="user_xattr,acl,commit=600,barrier=1,data=ordered"
34default_btrfs_opts="nodatacow"34default_btrfs_opts="nodatacow"
35default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}"35default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}${ETL_EXTRA_MOUNT_FLAGS}"
36default_fne_mount_opts="${default_mount_opts},ecryptfs_fnek_sig=\${ETL_FNEK_SIG}"36default_fne_mount_opts="${default_mount_opts},ecryptfs_fnek_sig=\${ETL_FNEK_SIG}"
3737
3838
3939
=== modified file 'tests/run_tests.sh'
--- tests/run_tests.sh 2012-04-23 07:32:26 +0000
+++ tests/run_tests.sh 2014-01-18 17:13:47 +0000
@@ -159,9 +159,10 @@
159 echo " -t tests comma-separated list of tests to run"159 echo " -t tests comma-separated list of tests to run"
160 echo " -U run tests relating to the userspace utilities"160 echo " -U run tests relating to the userspace utilities"
161 echo " -u upper_mnt destination path to mount upper filesystem"161 echo " -u upper_mnt destination path to mount upper filesystem"
162 echo " -o flags extra mount options to be passed to ecryptfs"
162}163}
163164
164while getopts "b:c:D:d:f:hKl:t:Uu:" opt; do165while getopts "b:c:D:d:f:hKl:t:Uu:o:" opt; do
165 case $opt in166 case $opt in
166 b)167 b)
167 blocks=$OPTARG168 blocks=$OPTARG
@@ -195,6 +196,9 @@
195 U)196 U)
196 userspace=true197 userspace=true
197 ;;198 ;;
199 o)
200 extra_flags=$OPTARG
201 ;;
198 u)202 u)
199 upper_mnt=$OPTARG203 upper_mnt=$OPTARG
200 ;;204 ;;
@@ -300,6 +304,13 @@
300fi304fi
301export ETL_MOUNT_DST=$upper_mnt305export ETL_MOUNT_DST=$upper_mnt
302306
307if [ -n "$extra_flags" ] ; then
308 export ETL_EXTRA_MOUNT_FLAGS=",${extra_flags}"
309else
310 export ETL_EXTRA_MOUNT_FLAGS=""
311fi
312+
313
303# Source in the kernel and/or userspace tests.rc files to build the test lists314# Source in the kernel and/or userspace tests.rc files to build the test lists
304categories=$(echo $categories | tr ',' ' ')315categories=$(echo $categories | tr ',' ' ')
305if $kernel ; then316if $kernel ; then

Subscribers

People subscribed via source and target branches