~tyhicks/ecryptfs/lp1597154-packaging

« back to all changes in this revision

Viewing changes to tests/kernel/lp-872905.sh

  • Committer: Tyler Hicks
  • Date: 2016-07-07 22:49:06 UTC
  • Revision ID: tyhicks@canonical.com-20160707224906-wz2n40sy702h34uy
tests/kernel/lp-872905.sh: Adjust the test to account for upstream kernel
changes that were preventing the test from cleaning up after itself. The kernel
had a change of behavior where mounts that are configured to use encrypted
filenames will not be able to successfully lookup lower files with plaintext
filenames. This change caused the lower filler file, which was being created
directly in the lower filesystem, to not be removed during the test cleanup and
all of the following tests to fail since the lower filesystem remained full.

The upstream kernel commit mentioned above is:

  88ae4ab ecryptfs_lookup(): try either only encrypted or plaintext name

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
etl_lmount || exit
40
40
etl_mount_i || exit
41
41
test_dir=$(etl_create_test_dir) || exit
 
42
filler="${test_dir}/filler"
42
43
test_file="${test_dir}/test_file"
43
44
 
44
 
lower_test_dir=$(etl_find_lower_path $test_dir)
 
45
touch "$filler"
 
46
if [ $? -ne 0 ]; then
 
47
        exit
 
48
fi
 
49
 
 
50
lower_filler=$(etl_find_lower_path $filler)
45
51
if [ $? -ne 0 ]; then
46
52
        exit
47
53
fi
49
55
#
50
56
# Fill the lower
51
57
#
52
 
dd if=/dev/zero of=${lower_test_dir}/filler bs=4K > /dev/null 2>&1
 
58
dd if=/dev/zero of=$lower_filler bs=4K conv=notruc > /dev/null 2>&1
53
59
 
54
60
#
55
61
# Now attempt to create an upper and see how big it is