[Tests] Require exact match in assert_start_raises_init_eror (jnewbery)#12718
Conversation
fac49c1 to
5812273
Compare
|
I did a similar thing in #12302 initially and no one agreed :/ |
|
Hmm, I didn't notice the initial version of #12302, otherwise it would have been a Concept ACK from me |
|
Yeah doesn't matter, utACK |
|
Tested ACK 5812273 Should be tested on other platforms in case stderr is different. See #12379 (comment) for example
I think everyone agreed, but I argued that we should do the minimal fix required to get the v0.16 rc building and passing the tests. |
|
@Sjors Do they still fail for you? |
There was a problem hiding this comment.
This is wrong. Should be elif not partial_match and re.fullmatch(...)
or nest the whole thing one level deeper:
if partial match:
if re.search(...) is None:
#assert
else:
if re.fullmatch(...) is None:
#assert
This allows the tests to pass on different platforms
fad4973 to
fae1374
Compare
|
Added a commit to make the tests pass on windows |
|
Tested ACK fae1374. Works for me. |
|
@MarcoFalke on MacOS 10.13.3. Running the full suite now; will update this comment if something new fails. |
|
Tested ACK fae1374
Huh - we don't use any remotely complex regexes, so I wonder how this can cause timeout. |
…_eror (jnewbery) fae1374 qa: Allow for partial_match when checking init error (MarcoFalke) 5812273 [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery) 0ec08a6 [Tests] Move assert_start_raises_init_error method to TestNode (John Newbery) Pull request description: Extracted from #12379, because the changes are important on their own. This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards. Tree-SHA512: 605d2c9c42362a32d42321b066637577a026d0bb8cfc1c9f5737a4ca6503ffe85457a5122cea6e1101053ccc6c8aa1bbae3602e1fa7d2988bf7d5c275f412f66
…es_init_eror (jnewbery) fae1374 qa: Allow for partial_match when checking init error (MarcoFalke) 5812273 [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery) 0ec08a6 [Tests] Move assert_start_raises_init_error method to TestNode (John Newbery) Pull request description: Extracted from bitcoin#12379, because the changes are important on their own. This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards. Tree-SHA512: 605d2c9c42362a32d42321b066637577a026d0bb8cfc1c9f5737a4ca6503ffe85457a5122cea6e1101053ccc6c8aa1bbae3602e1fa7d2988bf7d5c275f412f66 Signed-off-by: pasta <pasta@dashboost.org>
84768b5 scripted-diff: bitcoind-->pivxd in tests (random-zebra) 38dae98 qa: Match full plain text by default (MarcoFalke) 92977e5 [Tests] Fix invalid escapes in regex strings to fix W605 (random-zebra) b6d69ea qa: Allow for partial_match when checking init error (MarcoFalke) 0318a5b [Trivial] Remove extra newline in missing-blocksdir error (random-zebra) 496787a [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery) 6617a99 [Tests] Move assert_start_raises_init_error method to TestNode (random-zebra) Pull request description: Backports - bitcoin#12718 This completes the todo left for - #2449. ACKs for top commit: furszy: no other changes aside from the typo, utACK 84768b5 Fuzzbawls: ACK 84768b5 Tree-SHA512: 50d527c965bcaf9f07c690cbbeac6c650e88055b1ac4a6f7920e11f3e0f480a8b059e5bd5b4023d7bcc5f1638677aac3c7faf243631d63ce94dca6ad2dd60797
63e0be6 [Remove] By-pass logprint-scanner restriction. (furszy) 280ced3 utils: Fix broken Windows filelock (Chun Kuan Lee) be89860 utils: Convert Windows args to utf-8 string (Chun Kuan Lee) e8cfa6e Call unicode API on Windows (Chun Kuan Lee) 1a02a8a tests: Add test case for std::ios_base::ate (Chun Kuan Lee) 2e57cd4 Move boost/std fstream to fsbridge (furszy) 9d8bcd4 utils: Add fsbridge fstream function wrapper (Chun Kuan Lee) d59d48d utils: Convert fs error messages from multibyte to utf-8 (ken2812221) 9ef58cc Logging: use "fmterr" variable name for errors instead of general "e" that can be used by any other function. (furszy) dd94241 utils: Use _wfopen and _wreopen on Windows (Chun Kuan Lee) 3993641 add unicode compatible file_lock for Windows (Chun Kuan Lee) 48349f8 Provide relevant error message if datadir is not writable. (murrayn) Pull request description: As the software is currently using the ANSI encoding on Windows, the user's language settings could affect the proper functioning of the node/wallet, to the point of not be able to open some non-ASCII name files and directories. This solves the Windows encoding issues, completing the entire bitcoin#13869 work path (and some other required backports). Enabling for example users that use non-english characters in directories and file names to be accepted. Backported PRs: * bitcoin#12422. * bitcoin#12630. * bitcoin#13862. * bitcoin#13866. * bitcoin#13877. * bitcoin#13878. * bitcoin#13883. * bitcoin#13884. * bitcoin#13886. * bitcoin#13888. * bitcoin#14192. * bitcoin#13734. * bitcoin#14426. This is built on top of other two PRs that i have open #2423 and #2369. Solves old issues #940 and #2163. TODO: * Backport `assert_start_raises_init_error` and `ErrorMatch` in TestNode` (bitcoin#12718) ACKs for top commit: Fuzzbawls: ACK 63e0be6 random-zebra: ACK 63e0be6 and merging... Tree-SHA512: cb1f7c23abb5b7b3af50bba18652cc2cad93fd7c2fca9c16ffd3fee34c4c152a3b666dfa87fe6b44c430064dcdee4367144dcb4a41203c91b0173b805bdb3d7d
Extracted from #12379, because the changes are important on their own.
This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards.