| 1 | module coracle |
| 2 | |
| 3 | import nspkg.tests.signaturefixtures |
| 4 | import nspkg.tests.hookfixtures |
| 5 | import os |
| 6 | |
| 7 | fn test_native_hooks_scriptlets_and_ldconfig_match_libalpm() ! { |
| 8 | $if linux { |
| 9 | base := os.join_path(os.temp_dir(), 'alpm-extension-parity-${os.getpid()}') |
| 10 | os.mkdir_all(base)! |
| 11 | defer { |
| 12 | hookfixtures.cleanup_long_paths(base) or { eprintln(err) } |
| 13 | os.rmdir_all(base) or { eprintln(err) } |
| 14 | } |
| 15 | probe := os.join_path(base, 'probe') |
| 16 | signaturefixtures.command('v', ['-path', os.dir(@VMODROOT) + '|@vlib|@vmodules', '-o', |
| 17 | probe, os.join_path(@VMODROOT, 'tests', 'extension_probe.v')])! |
| 18 | output := signaturefixtures.command('timeout', ['120s', 'unshare', '--user', '--map-root-user', |
| 19 | '--mount', probe, base, os.readlink('/proc/self/ns/mnt')!])! |
| 20 | assert output.contains('85 core and 85 public/libalpm extension transactions verified') |
| 21 | } |
| 22 | } |
| 23 | |