1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
set -ex
# lxc: linux Container library
# Authors:
# Serge Hallyn <serge.hallyn@ubuntu.com>
#
# This is a regression test for symbolic links
}
expected=$1
run=$2
pass="pass"
false
fi
}
# make lxcpath a symlink - this should NOT cause failure
lxc.mount.entry = $dirname opt/xxx/dir none bind,create=dir
lxc.mount.entry = $fname opt/xxx/file none bind,create=file
lxc.mount.entry = $fname2 opt/xxx/file2 none bind
lxc.mount.entry = $dirname /var/lib/lxc/symtest1/rootfs/opt/xxx/dir2 none bind,create=dir
EOF
# Regular - should succeed
# symlink - should fail
# final final symlink - should fail
# Ideally we'd also try a loop device, but that won't work in nested containers
# anyway - TODO
# what about /proc itself
echo "all tests passed"