Skip to content

test(host): stop shadowing the withheld variables test's reader - #230

Merged
siracozmen01 merged 1 commit into
mainfrom
child-test-shadow
Nov 8, 2026
Merged

siracozmen01 merged 1 commit into
mainfrom
child-test-shadow

Conversation

@siracozmen01

Copy link
Copy Markdown
Contributor

Problem

Main's check on dff8e53 failed because the gcc-debug tree does not build. In AChildIsNotGivenTheVariablesWithheldFromIt, added by #227, the lambda kRead declares its output path as kRead too. gcc 14 refuses that under -Wshadow -Werror ("declaration of 'kRead' shadows a previous local"); clang accepts it, and a pull request's check builds only clang trees.

Change

  • The output path is kOutput. Nothing else changes.

Verification

  • In the gcc-debug tree, rawframe_process_tests builds and passes 5 of 5. With main's child_test.cpp put back, the same build fails with the error above.
  • tools/check.sh changed passed before the push.

Closes #229

gcc 14 refuses the test from #227 under -Wshadow -Werror: the lambda
kRead names its output path kRead too, which clang accepts. Main's
gcc-debug tree no longer built, so its check failed.

@siracozmen01 siracozmen01 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at dd0348f: ready, once CI goes green.

  • The rename is the whole change. The diff touches only modules/process/tests/child_test.cpp. Inside the lambda, the path's declaration and both of its uses (.output and test::readFile) become kOutput. No other kRead stood for the path, so every reference resolves to the same object as before.
  • The test tests the same thing. The child still runs variable <name> with the same withheld list and writes to the same scratch file. The two expectations ("none" for the withheld variable, "given" for the other) are unchanged.
  • The body has Problem, Change and Verification, and no column-0 name( line.

No findings.

@siracozmen01 siracozmen01 changed the title test(process): stop shadowing the withheld variables test's reader test(host): stop shadowing the withheld variables test's reader Nov 8, 2026
@siracozmen01
siracozmen01 merged commit 89ffe9e into main Nov 8, 2026
11 of 12 checks passed
@siracozmen01
siracozmen01 deleted the child-test-shadow branch November 8, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The process tests do not build with gcc: a test's reader shadows itself

1 participant