From 9512695b328cbc23e20e10474c1b859a8474521c Mon Sep 17 00:00:00 2001 From: "Can H. Tartanoglu" Date: Sun, 25 Oct 2026 17:33:24 +0100 Subject: [PATCH 1/2] unified-memory-framework: fix IPC tests failing with exec format error The IPC test scripts put `#!/bin/bash` after the license header, so ctest cannot execute them and five tests fail as BAD_COMMAND (Hydra build 350308360). Apply the upstream fix that moves the shebangs to the top and patch them for the sandbox. --- .../un/unified-memory-framework/package.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/by-name/un/unified-memory-framework/package.nix b/pkgs/by-name/un/unified-memory-framework/package.nix index b1ac7501e56c..3acaa9a1508b 100644 --- a/pkgs/by-name/un/unified-memory-framework/package.nix +++ b/pkgs/by-name/un/unified-memory-framework/package.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, + fetchpatch, lib, cmake, ninja, @@ -66,6 +67,17 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; __structuredAttrs = true; + patches = [ + # The IPC test scripts put `#!/bin/bash` after the license header, so + # ctest cannot execute them (exec format error). + # https://github.com/oneapi-src/unified-memory-framework/pull/1618 + (fetchpatch { + name = "move-shebangs-to-the-top.patch"; + url = "https://github.com/oneapi-src/unified-memory-framework/commit/3ab0bc195f72060555f154475ec3abe01d2ba742.patch"; + hash = "sha256-0+dgOFNmGrxXPWxtsc1mvzj0V8+eJhH2HkGooDcNdhs="; + }) + ]; + postPatch = '' # The CMake tries to find out the version via git. # Since we're not in a clone, git describe won't work. @@ -84,6 +96,9 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail \ 'set(UMF_LIBS umf_utils umf_ba umf_coarse $)' \ 'set(UMF_LIBS umf_utils umf_ba umf_coarse ''${UMF_HWLOC_NAME})' + + # ctest runs the IPC test scripts directly + patchShebangs --build test ''; # If included, jemalloc needs to be vendored, as they don't support using a pre-built version From 04bcf623a00a231631b125e6ff31d7285edff47b Mon Sep 17 00:00:00 2001 From: "Can H. Tartanoglu" Date: Mon, 26 Oct 2026 13:47:34 +0000 Subject: [PATCH 2/2] unified-memory-framework: fix races between file provider tests Several tests create their file memory provider's backing file under the same name in the same working directory, and race when ctest runs them in parallel, which makes the check phase fail intermittently. Apply the upstream fix that gives each test its own file name. Assisted-by: Claude Code (Claude Opus 5.5) --- pkgs/by-name/un/unified-memory-framework/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/un/unified-memory-framework/package.nix b/pkgs/by-name/un/unified-memory-framework/package.nix index 3acaa9a1508b..c34898aa433c 100644 --- a/pkgs/by-name/un/unified-memory-framework/package.nix +++ b/pkgs/by-name/un/unified-memory-framework/package.nix @@ -76,6 +76,14 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/oneapi-src/unified-memory-framework/commit/3ab0bc195f72060555f154475ec3abe01d2ba742.patch"; hash = "sha256-0+dgOFNmGrxXPWxtsc1mvzj0V8+eJhH2HkGooDcNdhs="; }) + # Several file provider tests share a backing file name in the same + # working directory and race when ctest runs them in parallel. + # https://github.com/oneapi-src/unified-memory-framework/pull/1620 + (fetchpatch { + name = "use-different-temporary-file-names.patch"; + url = "https://github.com/oneapi-src/unified-memory-framework/commit/afa229239daabfee2722f780f83d933654d5965a.patch"; + hash = "sha256-mDQCz9sAxFemsGGhY6hwx4vsQgSrchuik/a4+7Gdp9M="; + }) ]; postPatch = ''