From 18bbf33b382828c495c33619e692f5978fa7c8a2 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 29 Jun 2023 17:52:08 -0700 Subject: [PATCH] test.cross.mbuffer: init This adds a test case for the tricky issue encountered in https://github.com/NixOS/nixpkgs/issues/213453 --- pkgs/test/cross/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix index beb64df19577..a5144fe2cef6 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 + ''; }