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
1=== modified file 'tests/lib/etl_funcs.sh'
2--- tests/lib/etl_funcs.sh 2013-01-14 13:53:10 +0000
3+++ tests/lib/etl_funcs.sh 2014-01-18 17:13:47 +0000
4@@ -32,7 +32,7 @@
5 default_ext2_opts="user_xattr,acl"
6 default_ext3_opts="user_xattr,acl,commit=600,barrier=1,data=ordered"
7 default_btrfs_opts="nodatacow"
8-default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}"
9+default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}${ETL_EXTRA_MOUNT_FLAGS}"
10 default_fne_mount_opts="${default_mount_opts},ecryptfs_fnek_sig=\${ETL_FNEK_SIG}"
11
12
13
14=== modified file 'tests/run_tests.sh'
15--- tests/run_tests.sh 2012-04-23 07:32:26 +0000
16+++ tests/run_tests.sh 2014-01-18 17:13:47 +0000
17@@ -159,9 +159,10 @@
18 echo " -t tests comma-separated list of tests to run"
19 echo " -U run tests relating to the userspace utilities"
20 echo " -u upper_mnt destination path to mount upper filesystem"
21+ echo " -o flags extra mount options to be passed to ecryptfs"
22 }
23
24-while getopts "b:c:D:d:f:hKl:t:Uu:" opt; do
25+while getopts "b:c:D:d:f:hKl:t:Uu:o:" opt; do
26 case $opt in
27 b)
28 blocks=$OPTARG
29@@ -195,6 +196,9 @@
30 U)
31 userspace=true
32 ;;
33+ o)
34+ extra_flags=$OPTARG
35+ ;;
36 u)
37 upper_mnt=$OPTARG
38 ;;
39@@ -300,6 +304,13 @@
40 fi
41 export ETL_MOUNT_DST=$upper_mnt
42
43+if [ -n "$extra_flags" ] ; then
44+ export ETL_EXTRA_MOUNT_FLAGS=",${extra_flags}"
45+else
46+ export ETL_EXTRA_MOUNT_FLAGS=""
47+fi
48++
49+
50 # Source in the kernel and/or userspace tests.rc files to build the test lists
51 categories=$(echo $categories | tr ',' ' ')
52 if $kernel ; then

Subscribers

People subscribed via source and target branches