From 9c1686912027d98d17b7ed2cc84b12ce8533a557 Mon Sep 17 00:00:00 2001 From: SaiPisey2 Date: Wed, 26 Aug 2026 23:14:10 +0530 Subject: [PATCH] fix(e2e): resolve the Darwin fixture path on bash 3.2 The per-OS fixture path was built with "${fixture_metrics::-4}". A negative substring length needs bash 4.2, and macOS still ships bash 3.2, where the expansion fails, fixture_metrics keeps pointing at the Linux fixture, and ./end-to-end-test.sh -u run on a Mac overwrites collector/fixtures/e2e-output.txt with Darwin output. "${fixture_metrics%.txt}" is equivalent and works on both. Also strip node_thermal_temperature_celsius along with the other non-deterministic metrics. Its sensor names and values are per-machine, so a developer running the suite on real hardware sees the whole sensor list as a diff. The CI runner reports no thermal sensors, so this makes no difference there. Signed-off-by: SaiPisey2 --- end-to-end-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/end-to-end-test.sh b/end-to-end-test.sh index b439cea556..a4473a3809 100755 --- a/end-to-end-test.sh +++ b/end-to-end-test.sh @@ -279,7 +279,10 @@ generated_metrics="${tmpdir}/e2e-output.txt" for os in freebsd openbsd netbsd solaris dragonfly darwin; do if [ "${GOHOSTOS}" = "${os}" ]; then generated_metrics="${tmpdir}/e2e-output-${GOHOSTOS}.txt" - fixture_metrics="${fixture_metrics::-4}-${GOHOSTOS}.txt" + # Not "${fixture_metrics::-4}": a negative length needs bash 4.2, and macOS + # still ships bash 3.2, where the expansion fails and the Linux fixture is + # used instead. + fixture_metrics="${fixture_metrics%.txt}-${GOHOSTOS}.txt" fi done @@ -390,6 +393,7 @@ non_deterministic_metrics=$(cat << METRICS node_network_receive_bytes_total node_network_receive_multicast_total node_network_transmit_multicast_total + node_thermal_temperature_celsius node_zfs_abdstats_linear_count_total node_zfs_abdstats_linear_data_bytes node_zfs_abdstats_scatter_chunk_waste_bytes