about summary refs log tree commit diff
path: root/pkgs/test/cross
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-06-29 17:52:08 -0700
committerAdam Joseph <adam@westernsemico.com>2023-06-30 02:36:13 -0700
commit18bbf33b382828c495c33619e692f5978fa7c8a2 (patch)
tree762294d8054b084b3ec07ac28630cca34613f746 /pkgs/test/cross
parent6a05eeb5156ece5c3580ebe553f3882ae3667c04 (diff)
test.cross.mbuffer: init
This adds a test case for the tricky issue encountered in

  https://github.com/NixOS/nixpkgs/issues/213453
Diffstat (limited to 'pkgs/test/cross')
-rw-r--r--pkgs/test/cross/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix
index beb64df195773..a5144fe2cef66 100644
--- a/pkgs/test/cross/default.nix
+++ b/pkgs/test/cross/default.nix
@@ -110,4 +110,14 @@ let
 in {
   gcc = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = false;})) tests);
   llvm = (lib.mapAttrs (_: mapMultiPlatformTest (system: system // {useLLVM = true;})) tests);
+
+  # see https://github.com/NixOS/nixpkgs/issues/213453
+  # this is a good test of a lot of tricky glibc/libgcc corner cases
+  mbuffer = let
+    mbuffer = pkgs.pkgsCross.aarch64-multiplatform.mbuffer;
+    emulator = with lib.systems; (elaborate examples.aarch64-multiplatform).emulator pkgs;
+  in
+    pkgs.runCommand "test-mbuffer" {} ''
+      echo hello | ${emulator} ${mbuffer}/bin/mbuffer
+    '';
 }