ci: Validate GTEST_FILTER readLinkAt fix on runner
CI repro (readLinkAt) / Reproduce determinate-nix test failure (push) Successful in 13m43s
CI repro (readLinkAt) / Reproduce determinate-nix test failure (push) Successful in 13m43s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+10
-31
@@ -28,37 +28,16 @@ jobs:
|
|||||||
extra-substituters = https://nix-cache.nul.ie
|
extra-substituters = https://nix-cache.nul.ie
|
||||||
extra-trusted-public-keys = nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4=
|
extra-trusted-public-keys = nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4=
|
||||||
|
|
||||||
- name: Nix build-dir / store settings
|
- name: Build devshell with full logs
|
||||||
run: |
|
run: |
|
||||||
echo "===== nix config (build-dir / store / sandbox) ====="
|
set -eo pipefail
|
||||||
nix config show 2>/dev/null | grep -iE 'build-dir|store|sandbox|temp' || true
|
# With the determinateOverlay GTEST_FILTER=-readLinkAt.* fix in flake.nix,
|
||||||
echo "===== TMPDIR/env ====="
|
# nix-util-tests-run should skip the long-symlink test and the build should
|
||||||
echo "TMPDIR=$TMPDIR RUNNER_TEMP=$RUNNER_TEMP GITHUB_WORKSPACE=$GITHUB_WORKSPACE HOME=$HOME"
|
# go green on this XFS-backed runner.
|
||||||
|
nix build -L --keep-going --no-link .#ci.x86_64-linux.shell 2>&1 | tee repro.log
|
||||||
|
|
||||||
- name: Mount table
|
- name: Show readLinkAt result
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
echo "===== df -T ====="
|
echo "===== nix-util-tests outcome ====="
|
||||||
df -T || df -h
|
grep -nE 'Google Test filter|readLinkAt|tests ran|PASSED|FAILED|File name too long' repro.log 2>/dev/null | tail -20 || true
|
||||||
echo "===== mount ====="
|
|
||||||
mount 2>/dev/null | grep -iE 'overlay|tmpfs|/nix|ext4|xfs|btrfs|9p|fuse' || mount
|
|
||||||
|
|
||||||
- name: Symlink-length probe
|
|
||||||
run: |
|
|
||||||
# Determine, per candidate dir, the longest symlink target that can be
|
|
||||||
# created (the test needs PATH_MAX/2 = 2048 and PATH_MAX-1 = 4095).
|
|
||||||
probe() {
|
|
||||||
local d="$1"
|
|
||||||
[ -d "$d" ] || { echo " $d: (absent)"; return; }
|
|
||||||
local fstype; fstype=$(stat -f -c %T "$d" 2>/dev/null || echo '?')
|
|
||||||
local res=""
|
|
||||||
for n in 256 1000 2048 3000 4095; do
|
|
||||||
local tgt; tgt=$(head -c "$n" < /dev/zero | tr '\0' 'y')
|
|
||||||
if ln -sf "$tgt" "$d/.symtest.$n" 2>/dev/null; then res="$res $n"; else res="$res !$n"; fi
|
|
||||||
rm -f "$d/.symtest.$n" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
echo " $d [$fstype]:$res"
|
|
||||||
}
|
|
||||||
echo "===== max symlink target length per dir (n = ok, !n = ENAMETOOLONG) ====="
|
|
||||||
for d in /tmp /var/tmp /dev/shm /nix /nix/var "$HOME" "$RUNNER_TEMP" "$GITHUB_WORKSPACE" /root /build; do
|
|
||||||
probe "$d"
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -104,8 +104,19 @@
|
|||||||
myPkgsOverlay = final: prev: import ./pkgs { lib = final.lib; pkgs = prev; };
|
myPkgsOverlay = final: prev: import ./pkgs { lib = final.lib; pkgs = prev; };
|
||||||
# Exposes Determinate Nix under a stable attr name so systems, homes and the devshell all
|
# Exposes Determinate Nix under a stable attr name so systems, homes and the devshell all
|
||||||
# resolve the exact same package (referenced as `pkgs'.mine.determinate-nix` in configs).
|
# resolve the exact same package (referenced as `pkgs'.mine.determinate-nix` in configs).
|
||||||
|
# `nix-util`'s `readLinkAt.works` unit test creates PATH_MAX-length symlinks, which our CI
|
||||||
|
# runner's XFS-backed build filesystem rejects (XFS hard-caps symlink targets at 1024 bytes).
|
||||||
|
# Skip just that test via gtest's GTEST_FILTER so the rest of the suite still gates the build.
|
||||||
determinateOverlay = final: prev: {
|
determinateOverlay = final: prev: {
|
||||||
determinate-nix = inputs.determinate-nix.packages.${prev.stdenv.hostPlatform.system}.default;
|
determinate-nix =
|
||||||
|
(inputs.determinate-nix.packages.${prev.stdenv.hostPlatform.system}.default).overrideAttrs (o: {
|
||||||
|
checkInputs = map
|
||||||
|
(drv:
|
||||||
|
if (drv.name or "") == "nix-util-tests-run"
|
||||||
|
then drv.overrideAttrs (_: { GTEST_FILTER = "-readLinkAt.*"; })
|
||||||
|
else drv)
|
||||||
|
o.checkInputs;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# Override the flake-level lib since we're going to use it for non-config specific stuff
|
# Override the flake-level lib since we're going to use it for non-config specific stuff
|
||||||
|
|||||||
Reference in New Issue
Block a user