| 1 | module nspkg |
| 2 | |
| 3 | import nspkg.tests.signaturefixtures |
| 4 | import os |
| 5 | |
| 6 | fn test_native_removal_keeps_mountpoints_and_reports_readonly_filesystems() ! { |
| 7 | $if linux { |
| 8 | base := os.join_path(os.temp_dir(), 'alpm-remove-mounts-${os.getpid()}') |
| 9 | os.mkdir_all(base)! |
| 10 | defer { os.rmdir_all(base) or { eprintln(err) } } |
| 11 | probe := os.join_path(base, 'probe') |
| 12 | signaturefixtures.command('v', ['-o', probe, |
| 13 | os.join_path(@VMODROOT, 'tests', 'removal_mount_probe.v')])! |
| 14 | output := signaturefixtures.command('timeout', ['20s', 'unshare', '--user', '--map-root-user', |
| 15 | '--mount', probe, base, os.readlink('/proc/self/ns/mnt')!])! |
| 16 | assert output.contains('native mountpoint and read-only removal verified') |
| 17 | } |
| 18 | } |
| 19 | |