jadijadi
commented at 1:12 pm on September 2, 2024:
contributor
the run_command test under system_tests fails if the locale is anything
other than English ones because results such as “No such file or directory”
will be different under Non-English locales.
On the old version, a ls nonexistingfile was used to generate the error
output which is not ideal. In the current version we are using a Python one-liner
to generate a non 0 zero return value and “err” on stderr and check the
expected value against this.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#29868 (Reintroduce external signer support for Windows by hebasto)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
jadijadi force-pushed
on Sep 3, 2024
jadijadi
commented at 12:20 pm on September 3, 2024:
contributor
Also, the commit message is wrong echo success is never translated, because echo is just a tool to echo something, not to translate a passed string.
you are right and thanks for mentioning it. fixed the message
jadijadi force-pushed
on Sep 3, 2024
jadijadi force-pushed
on Sep 3, 2024
jadijadi
commented at 12:50 pm on September 3, 2024:
contributor
The test only wants to check the stderr and exit code, so instead of using ls, it may be easier to use a python command (#29868 (comment)), or something similar.
Agree with your solution. Python one-liner is cleaner and more reliable. Used that one so we do not need the Locale anymore. tests pass both in PT and C locale.
by the way since you are working on this in a larger scale, I can close my PR and wait for a full fix via yours.
maflcko
commented at 12:53 pm on September 3, 2024:
member
Looks good. Make sure to adjust the pull request description, now that the approach has changed.
maflcko
commented at 6:49 pm on September 3, 2024:
member
Please adjust the pull request description, now that the approach has changed: #30788#issue-2500949706
DrahtBot added the label
Tests
on Sep 4, 2024
test: fixing failing system_tests/run_command under some Locales
the run_command test under system_tests fails if the locale is anything
other than English ones because results such as "No such file or directory"
will be different under Non-English locales.
On the old version, a `ls nonexistingfile` was used to generate the error
output which is not ideal. In the current version we are using a Python one-liner
to generate a non 0 zero return value and "err" on stderr and check the
expected value against this.
fixes #30608
ae48a22a3d
jadijadi force-pushed
on Sep 4, 2024
jadijadi
commented at 6:04 am on September 4, 2024:
contributor
maflcko
commented at 6:08 am on September 4, 2024:
member
Please update the pull request description properly. There is no need to include incorrect stuff (echo success isn’t translated), or outdated stuff of a previous commit. Please focus on the important and correct details only.
hebasto approved
hebasto
commented at 6:30 am on September 4, 2024:
member
ACKae48a22a3df086fb59843b7b814619ed5df7557b, tested on Ubuntu 24.04 by switching locale.
the run_command test under system_tests fails if the locale is anything other than US/UK/C (English ones) because it checks for things like result.find_value("success");
To prevent this, a setenv("LC_ALL", "C", 1); is added to make sure that the tests are being run under C locale even if something else is set in the terminal.
Update: based on below discussions, the solution is changed. Now we are using a python one-liner to 1. return a non zero value and 2. output “err” on stderr and check the run against this which is more reliable than using “ls nonexistencefile” and hope for error. The commit message have been updated accordingly.
The second paragraph should be dropped, I guess.
DrahtBot requested review from maflcko
on Sep 4, 2024
maflcko
commented at 6:33 am on September 4, 2024:
member
The commit description looks fine, so why not copy-paste it and replace the pull request description?
maflcko
commented at 6:34 am on September 4, 2024:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-24 09:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me