tests: Volkswagen #15714

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:1904-testsVolkswagen changing 3 files +14 −0
  1. MarcoFalke commented at 2:40 AM on April 1, 2019: member

    There is a persistently high amount of intermittent test failures, which are a burden to development and slowing everything down. I suggest to adapt the well established Volkswagen-technique to counter those annoyances.

    The implementation is quite straightforward: Tests, to an outside observer, will appear to be running as designed. They emit logs to please the observer and, as desired, will always exit successfully. The tested bitcoind itself is not modified and thus does not change behaviour.

  2. tests: Volkswagen faab081808
  3. fanquake added the label Tests on Apr 1, 2019
  4. fanquake commented at 2:43 AM on April 1, 2019: member

    🏎 💨

  5. sdaftuar commented at 2:43 AM on April 1, 2019: member

    Can you please update the linters to return success as well? Thx

  6. lint: Volkswagen fac32125a3
  7. MarcoFalke commented at 2:52 AM on April 1, 2019: member

    Good catch! Updated linters as well.

  8. jonasschnelli commented at 7:37 AM on April 1, 2019: contributor

    Yeah. Makes sense. utACK fac32125a3779529216257961127ad8c247b243b 🤥

  9. laanwj commented at 9:09 AM on April 1, 2019: member

    This is perfect, it starts off a complete new era of testing, thank you!

  10. jonatack commented at 9:33 AM on April 1, 2019: member

    Concept ACK. :100:

  11. practicalswift commented at 9:36 AM on April 1, 2019: contributor

    NACK regarding the linter change.

    Rationale:

    • Linters are important.

    Formal proof:

    # Some Z3 intricacies.
    >>> import z3
    >>> s = z3.Solver()
    >>> t = z3.DeclareSort("t")
    >>> is_test =  z3.Function("is_test", t, z3.BoolSort())
    >>> is_important = z3.Function("is_important", t, z3.BoolSort())
    >>> linter = z3.Const("linter", t)
    >>> _ = z3.Const("_", t)
    # Axiom: Tests are important.
    >>> s.add(z3.ForAll([_], z3.Implies(is_test(_), is_important(_))))
    # Axiom: A linter is a test.
    >>> s.add(is_test(linter))
    >>> s.check()
    sat
    # Try to claim that linters are not important.
    >>> s.add(z3.Not(is_important(linter)))
    >>> s.check()
    unsat
    
  12. laanwj commented at 9:58 AM on April 1, 2019: member

    @practicalswift thanks for the proof, very clear However it does not conflict with the intent of this PR, we think linters are very important that's why they should always be happy and return success!

  13. practicalswift commented at 11:26 AM on April 1, 2019: contributor

    @laanwj You have a very good point! I'm happy if and only if the linters are happy. Concept ACK!

  14. flack commented at 12:58 PM on April 1, 2019: contributor

    I think the PR title is a bit misleading. To fully conform to the Volkswagen methodolgy, the code should detect CI platforms and only only kick in then

  15. ericketts commented at 10:04 PM on April 1, 2019: none

    its a good start, but can you figure out some way that this could also be used to gas people? you know, to prove it works or whatever.

  16. laanwj commented at 7:39 AM on April 2, 2019: member

    This makes me deeply sad now, closing

  17. laanwj closed this on Apr 2, 2019

  18. MarcoFalke deleted the branch on Apr 2, 2019
  19. DrahtBot locked this on Dec 16, 2021

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:15 UTC

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