Skip to content

outputs: save reproducer.sh with the outputs - #79

Merged
bhcopeland merged 4 commits into
kernelci:masterfrom
roxell:reproducer-script
Sep 9, 2026
Merged

outputs: save reproducer.sh with the outputs#79
bhcopeland merged 4 commits into
kernelci:masterfrom
roxell:reproducer-script

Conversation

@roxell

@roxell roxell commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

There is no record of the command line in the output directory. You have to remember what you ran, or find it in the shell history.

Save it as reproducer.sh next to the logs and the metadata, when --save-outputs is used. The file is executable, so it runs directly. It is written before the test starts, so it is there also when the test fails.

@roxell
roxell requested a review from bhcopeland August 13, 2026 13:59
Comment thread tuxrun/__main__.py Outdated
options.metadata = cache_dir / "metadata.json"
if options.results is None:
options.results = cache_dir / "results.json"
save_reproducer(cache_dir, sys.argv)

@bhcopeland bhcopeland Aug 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this will leak out avh tokens into output dir

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also this should be around a try: except: block (oserror/log warning)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

reworked

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still missing the try block?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

argh, I only fixed the other comment sorry. it is fixed now.

Comment thread tuxrun/utils.py Outdated
roxell added 2 commits August 15, 2026 09:04
The mask string "********" is written in two places in mask_secrets().

Move it to SECRET_MASK, so the next user of it does not repeat the
literal. No change in behaviour.

Add a test for a token that tuxrun did not parse itself, the
definition can come from --job-definition.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
"*" is a glob character in the shell and starts an alias in YAML, so
both writers have to quote the mask:

  --secrets 'rootfs:Authorization=********'
  Authorization: '********'

The quotes say nothing, they come from the mask and not from the value.
Use XXXXXXXX, it needs no quoting anywhere:

  --secrets rootfs:Authorization=XXXXXXXX
  Authorization: XXXXXXXX

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
There is no record of the command line in the output directory. You
have to remember what you ran, or find it in the shell history.

Save it as reproducer.sh next to the logs and the metadata, when
--save-outputs is used. The file is executable, so it runs directly. It
is written before the test starts, so it is there also when the test
fails.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
mask_secrets() used ruamel only to dump. It loads with yaml_load(),
which is PyYAML, so the data has no ruamel style information and
preserve_quotes did nothing.

Dump with PyYAML instead, it is already a dependency. The output is
the same data. A long line is no longer wrapped, a kernel command line
stays on one line and is easier to read.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
@bhcopeland
bhcopeland merged commit 7394836 into kernelci:master Sep 9, 2026
33 checks passed
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.

2 participants