nixos/tests/systemd-binfmt: Add ldPreload test for LD_PRELOAD error messages
This commit is contained in:
parent
9e5d0a9458
commit
c8d137961d
1 changed files with 19 additions and 0 deletions
|
@ -68,4 +68,23 @@ in {
|
|||
machine.succeed("exec -a meow ${testAarch64} meow")
|
||||
'';
|
||||
};
|
||||
|
||||
ldPreload = makeTest {
|
||||
name = "systemd-binfmt-ld-preload";
|
||||
machine = {
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
];
|
||||
};
|
||||
testScript = let
|
||||
helloAarch64 = pkgs.pkgsCross.aarch64-multiplatform.hello;
|
||||
libredirectAarch64 = pkgs.pkgsCross.aarch64-multiplatform.libredirect;
|
||||
in ''
|
||||
machine.start()
|
||||
|
||||
assert "error" not in machine.succeed(
|
||||
"LD_PRELOAD='${libredirectAarch64}/lib/libredirect.so' ${helloAarch64}/bin/hello 2>&1"
|
||||
).lower()
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue