fix(e2e): resolve the Darwin fixture path on bash 3.2 - #3798
Open
SaiPisey2 wants to merge 1 commit into
Open
Conversation
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 <piseysai0202@gmail.com>
TheMeier
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #3767 as requested.
Two fixes to
end-to-end-test.sh, both about running the suite on a Darwin host.The Darwin fixture path is not resolved on bash 3.2
fixture_metrics="${fixture_metrics::-4}-${GOHOSTOS}.txt"A negative substring length needs bash 4.2. macOS still ships bash 3.2, where that expansion fails:
generated_metricson the line above uses plain interpolation and is resolved correctly, so the generated file is the Darwin one whilefixture_metricsstill points at the Linux fixture. Running./end-to-end-test.sh -uon a Mac therefore overwritescollector/fixtures/e2e-output.txtwith Darwin output — in my case rewriting 5330 lines of it before I noticed.${fixture_metrics%.txt}is equivalent and works on both. Verified under bash 3.2.57 and 5.3.15, and both still passbash -n.node_thermal_temperature_celsiusis per-machineIts sensor names and its values both depend on the hardware, so anyone regenerating the Darwin fixture on a real Mac gets the whole sensor list as a diff rather than the intended change. It is stripped along with the other non-deterministic metrics now.
This makes no difference in CI, which reports no thermal sensors at all — it only matters when the suite is run on real hardware, which is exactly what the
-uinstructions ask for.Unrelated and left alone: the
sed -i /pattern/dcalls in that same loop need an extension argument on BSD sed, so the stripping aborts on stock macOS. It behaves the same way on master, so it is not something this PR introduces.