Fix --quiet (all.sh, check_names.py) #261

Open
mpg wants to merge 5 commits from mpg/fix-quiet into main
mpg commented 2026-01-05 05:39:02 -06:00 (Migrated from github.com)

Description

I like to run all.sh -q <some_check_components> as part of my pre-push script, but these days it's not really as quiet as advertised ("Only output component names, and errors if any."). This PR addresses most of that:

  1. Stop printing make invocations (to stderr).
  2. Address error message about root Makefile in development -> here it's not just about silencing the error, something was actually wrong.
  3. Make the -q option of check_names more effective - also make normal output go to stdout not stderr.

PR checklist

  • TF-PSA-Crypto PR not required because: all affected scripts in the frameworks
  • development PR not required because: all affected scripts in the frameworks
  • 3.6 PR not required because: all affected scripts in the frameworks
## Description I like to run `all.sh -q <some_check_components>` as part of my pre-push script, but these days it's not really as quiet as advertised ("Only output component names, and errors if any."). This PR addresses most of that: 1. Stop printing make invocations (to stderr). 2. Address error message about root Makefile in development -> here it's not just about silencing the error, something was actually wrong. 3. Make the `-q` option of `check_names` more effective - also make normal output go to stdout not stderr. ## PR checklist - [x] **TF-PSA-Crypto PR** not required because: all affected scripts in the frameworks - [x] **development PR** not required because: all affected scripts in the frameworks - [x] **3.6 PR** not required because: all affected scripts in the frameworks
gilles-peskine-arm (Migrated from github.com) requested changes 2026-01-05 09:20:15 -06:00
gilles-peskine-arm (Migrated from github.com) left a comment

Ok for not breaking stuff (except you need to pacify pylint). I haven't verified completeness because if it's good enough for you, it's good enough. I don't like the added complexity much.

Ok for not breaking stuff (except you need to pacify pylint). I haven't verified completeness because if it's good enough for you, it's good enough. I don't like the added complexity much.
@ -282,2 +282,4 @@
if [[ -e ${PWD}/framework/scripts/quiet ]]; then
export PATH=${PWD}/framework/scripts/quiet:$PATH
# pass on our own QUIET setting to the wrappers
export QUIET
gilles-peskine-arm (Migrated from github.com) commented 2026-01-05 09:15:37 -06:00

I'd prefer to avoid environment variable names that are too generic. Can we use MBEDTLS_QUIET here? (Just as the environment variable, not as the name inside the script.) Or would that be too confusing if we have two names and too much work if we rename it everywhere?

I'd prefer to avoid environment variable names that are too generic. Can we use `MBEDTLS_QUIET` here? (Just as the environment variable, not as the name inside the script.) Or would that be too confusing if we have two names and too much work if we rename it everywhere?
@ -668,2 +676,4 @@
git update-index --no-skip-worktree $makefiles
git checkout -- $makefiles
;;
esac
gilles-peskine-arm (Migrated from github.com) commented 2026-01-05 09:17:52 -06:00

Partly preexisting: how about $(git ls-files Makefile '**/Makefile')? That would be more future proof for when we finish removing the makefiles (although I suspect it'll take longer than what some people are hoping).

Partly preexisting: how about `$(git ls-files Makefile '**/Makefile')`? That would be more future proof for when we finish removing the makefiles (although I suspect it'll take longer than what some people are hoping).
gilles-peskine-arm (Migrated from github.com) commented 2026-01-05 09:09:55 -06:00

Partly preexisting: it would be more robust to use subprocess.check_output (formerly check_call).

Partly preexisting: it would be more robust to use `subprocess.check_output` (formerly `check_call`).
gilles-peskine-arm (Migrated from github.com) commented 2026-01-05 09:13:39 -06:00

Why not send everything to stderr? That's the normal place for informational messages, as opposed to application data which goes to stdout. Separating two logging streams also creates the risk that they'll end up displayed out of order due to buffering (which I think doesn't happen on Jenkins, it did happen on Travis).

Why not send everything to stderr? That's the normal place for informational messages, as opposed to application data which goes to stdout. Separating two logging streams also creates the risk that they'll end up displayed out of order due to buffering (which I think doesn't happen on Jenkins, it did happen on Travis).
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'mpg/fix-quiet:mpg/fix-quiet'
git switch 'mpg/fix-quiet'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'mpg/fix-quiet'
git switch 'mpg/fix-quiet'
git rebase 'main'
git switch 'main'
git merge --ff-only 'mpg/fix-quiet'
git switch 'mpg/fix-quiet'
git rebase 'main'
git switch 'main'
git merge --no-ff 'mpg/fix-quiet'
git switch 'main'
git merge --squash 'mpg/fix-quiet'
git switch 'main'
git merge --ff-only 'mpg/fix-quiet'
git switch 'main'
git merge 'mpg/fix-quiet'
git push origin 'main'
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/mbedtls-framework!261
No description provided.