test(compat): make the space-in-path premise able to fail (main is over its assertion baseline) - #890
Closed
fujibee wants to merge 1 commit into
Closed
test(compat): make the space-in-path premise able to fail (main is over its assertion baseline)#890fujibee wants to merge 1 commit into
fujibee wants to merge 1 commit into
Conversation
A non-last `[[ ]]` cannot fail a bats test on bash 3.2 (#670), so this premise check asserted nothing and pushed the tree one over its enforced-assertions baseline -- 639 against 638, which is red on main today and on every branch taken from it. Measured: pointing the check at a string ps never reports turns case 5 red, which the `[[ ]]` form did not.
Owner
Author
|
Closing in favour of #887, which was open first and is already cleared by two reviewers on the same head. #887 is also the better fix, for a reason worth writing down rather than just deferring to: it prints what The measurements here still stand and are not specific to either fix:
|
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.
Declared reviewers: 1
Change class: CI only. No product code, no shipped behaviour.
main is red, and this is why
check-enforced-assertionsreports 639 against a baseline of 638, onmainitself — so every branch taken from it inherits the failure, in three checks
(the standalone job and the bats cases on ubuntu and macos).
Located by comparing the checker's own enumeration at the commit that set the
baseline against
origin/main, per file rather than per line — the linenumbers move everywhere and a line diff cannot separate "moved" from "added":
The one entry:
The fix
A non-last
[[ ]]cannot fail a bats test on bash 3.2 (#670), so as writtenthis premise check asserted nothing. It is a premise worth keeping — the case
below it only means something if
psreally did report a path with a space —so it becomes a plain command rather than being deleted.
Measured
And that the line can now do its job, which the old form could not:
The baseline number is left at 638 rather than raised: the tree meets it again.