@@ -23,7 +23,7 @@ function teardown_volume() {
2323
2424function setup() {
2525 setup_volume
26- setup_busybox
26+ setup_debian
2727}
2828
2929function teardown() {
@@ -76,3 +76,53 @@ function teardown() {
7676 [ " $status " -eq 1 ]
7777 [[ " ${output} " == * " Read-only file system" * ]]
7878}
79+
80+ # https://github.com/opencontainers/runc/issues/5095
81+ @test " runc run [ check rbind,r*atime mounts]" {
82+ requires_kernel 5.12
83+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt1\" , options: [\" rbind\" ,\" ratime\" ]}]"
84+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt2\" , options: [\" rbind\" ,\" rnoatime\" ]}]"
85+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt3\" , options: [\" rbind\" ,\" rstrictatime\" ]}]"
86+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt4\" , options: [\" rbind\" ,\" rnostrictatime\" ]}]"
87+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt5\" , options: [\" rbind\" ,\" rrelatime\" ]}]"
88+ update_config " .mounts += [{source: \" ${TESTVOLUME} \" , destination: \" /mnt6\" , options: [\" rbind\" ,\" rnorelatime\" ]}]"
89+
90+ runc run -d --console-socket " $CONSOLE_SOCKET " test_rbind_ratime
91+ [ " $status " -eq 0 ]
92+
93+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt1
94+ [[ " ${output} " == " rw,relatime," * ]]
95+
96+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt1/subvol
97+ [[ " ${output} " == " rw,relatime," * ]]
98+
99+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt2
100+ [[ " ${output} " == " rw,noatime," * ]]
101+
102+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt2/subvol
103+ [[ " ${output} " == " rw,noatime," * ]]
104+
105+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt3
106+ [[ " ${output} " == " rw," * ]]
107+
108+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt3/subvol
109+ [[ " ${output} " == " rw," * ]]
110+
111+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt4
112+ [[ " ${output} " == " rw,relatime," * ]]
113+
114+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt4/subvol
115+ [[ " ${output} " == " rw,relatime," * ]]
116+
117+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt5
118+ [[ " ${output} " == " rw,relatime," * ]]
119+
120+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt5/subvol
121+ [[ " ${output} " == " rw,relatime," * ]]
122+
123+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt6
124+ [[ " ${output} " == " rw,relatime," * ]]
125+
126+ runc exec test_rbind_ratime findmnt --noheadings -o options /mnt6/subvol
127+ [[ " ${output} " == " rw,relatime," * ]]
128+ }
0 commit comments