test: Avoid connecting to real network when running tests #21254

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2102-testNoTelemetry changing 2 files +30 −22
  1. MarcoFalke commented at 9:42 AM on February 21, 2021: member

    Introduced in #19884

  2. fanquake added the label Tests on Feb 21, 2021
  3. test: Assume node is running in subtests
    Every (sub)test in the framework assumes the node is running, except for
    the (sub)tests in this file. Remove that confusion by stopping the node
    at the start of every subtest, instead of at the end.
    fa1b713941
  4. test: Avoid connecting to real network when running tests
    Can be reviewed with --word-diff-regex=.
    fa730e9157
  5. MarcoFalke force-pushed on Feb 21, 2021
  6. DrahtBot commented at 11:05 AM on February 21, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20018 (p2p: ProcessAddrFetch(-seednode) is unnecessary if -connect is specified by dhruv)

    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.

  7. Sjors commented at 4:32 PM on February 23, 2021: member

    ACK fa730e915766b012ff145e3c2af782668defb21f

    Can you add a note which test was connecting to the outside world? I assume it's one of the few tests that uses mainnet?

  8. MarcoFalke commented at 4:38 PM on February 23, 2021: member

    I haven't checked if any of the current tests reach out right now, but any non-regtest test might be affected.

  9. practicalswift commented at 5:12 PM on February 24, 2021: contributor

    Concept ACK

    Good catch! Accidental telemetry is still telemetry and should be removed.

  10. MarcoFalke merged this on Feb 25, 2021
  11. MarcoFalke closed this on Feb 25, 2021

  12. MarcoFalke deleted the branch on Feb 25, 2021
  13. sidhujag referenced this in commit bcf12e4943 on Feb 25, 2021
  14. practicalswift commented at 4:38 PM on February 25, 2021: contributor

    To detect accidental introduction of telemetry in the future: could we perhaps guard against external connections in tests via say a seccomp restricted job in Travis? Perhaps nsjail or firejail could be used.

  15. MarcoFalke commented at 5:49 PM on February 25, 2021: member

    Sure, pull request welcome

  16. luke-jr referenced this in commit ec7c32bff0 on Jun 27, 2021
  17. Fabcien referenced this in commit a097462a72 on Jan 27, 2022
  18. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

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: 2026-04-17 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me