Page MenuHomePhabricator

[backport#14935] tests: Test for expected return values when calling functions returning a success code
ClosedPublic

Authored by majcosta on Jun 22 2020, 06:23.

Details

Summary

c84c2b8c92 tests: Test for expected return values when calling functions returning a success code (practicalswift)

Pull request description:

Test for expected return values when calling functions returning a success code (instead of discarding the return values).

**Note to reviewers:** The following commands can be used to verify that the only text fragments added in this PR are `BOOST_CHECK(`, `!` and `)` :

```
$ git diff HEAD~1 | grep -E '^[\-][^\-]' | cut -b2- > before.txt
$ git diff HEAD~1 | grep -E '^[\+][^\+]' | cut -b2- > after.txt
$ cat after.txt | sed 's/BOOST_CHECK(//g' | sed 's/));/);/g' | tr -d '!' > after-sed.txt
$ diff -u before.txt after-sed.txt
$
```

Backport of Core PR14935 and PR14969

Test Plan
ninja check

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien requested changes to this revision.Jun 22 2020, 08:01
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/checkqueue_tests.cpp
332

Please backport as per https://github.com/bitcoin/bitcoin/pull/14969 to prevent failing TSAN.

src/test/denialofservice_tests.cpp
442

Good catch !

This revision now requires changes to proceed.Jun 22 2020, 08:01

squashed PR14969 into the diff for TSAN fix

This revision is now accepted and ready to land.Jun 22 2020, 08:36