Commit 5bbbc26
committed
cdh: add drop guard for close_device in tests
Similar to the drop guard for cleaning up the LUKS header file, add a
drop guard for close_device, ensuring the device will be closed even
in case of a panic.
Observed /dev/mapper across local test runs to ensure nothing is left
behind.
Signed-off-by: Manuel Huber <manuelh@nvidia.com>1 parent 8276eb0 commit 5bbbc26
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| |||
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
219 | | - | |
220 | | - | |
| 227 | + | |
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
| |||
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
243 | | - | |
244 | | - | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
269 | | - | |
270 | | - | |
| 275 | + | |
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
| |||
292 | 297 | | |
293 | 298 | | |
294 | 299 | | |
295 | | - | |
296 | | - | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
0 commit comments