test: accept multiple execve error strings in rpc_signer#34590
test: accept multiple execve error strings in rpc_signer#34590SakshiKasat18 wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. |
fd38a27 to
6610445
Compare
|
Was this LLM generated? What are the steps to test this? What is the output before and after the changes here? |
|
@maflcko How to test: Behavior before this change: However, on some systems the actual RPC error message differs slightly. For example, it may include the errno number: or return a different but valid POSIX message such as: In these cases, the RPC call correctly failed, but the test itself failed with an assertion error because it was matching a single exact string. Behavior after this change: But instead of requiring one exact string, it now allows the expected POSIX variants such as "No such file or directory" and "Not a directory". This keeps the check strict while making the test portable across environments. |
|
Well, if this wasn't LLM generated, you could share exact steps to reproduce (copy-paste), ideally starting form a fresh install of the Distro. Also, you could share the exact output before and after. So far you haven't provided neither, which I guess means that you haven't tested/confimred this at all locally? |
|
Hi @maflcko , thanks for the feedback. |
Summary
Relax the rpc_signer.py test to accept multiple POSIX execve failure messages when the signer command is missing.
Motivation
The exact errno text for execve failures can vary across environments (e.g. "No such file or directory" vs "Not a directory", and may include errno numbers). Matching a single exact string makes the test brittle.
Keep the check strict (matching the "execve failed:" prefix) while allowing expected POSIX variants.
Refs #31506.
How tested:
export DYLD_LIBRARY_PATH="..."
python3 build/test/functional/test_runner.py rpc_signer.py