test: avoid disk space warning for non-regtest #32057

pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2025/03/testnet4-size changing 2 files +10 −16
  1. Sjors commented at 12:35 pm on March 13, 2025: member

    feature_config_args.py incorrectly assumed that its testnet4 node would not log a disk space warning.

    But when #31978 increased m_assumed_blockchain_size on testnet4 from 1 to 11 GiB, it triggered this bug on my RAM disk, see https://github.com/bitcoin/bitcoin/tree/master/test#speed-up-test-runs-with-a-ram-disk

    This PR fixes the issue by using -prune which prevents the warning.

  2. DrahtBot commented at 12:35 pm on March 13, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32057.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fjahr, rkrux, maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31974 (Drop testnet3 by Sjors)
    • #29365 (Extend signetchallenge to set target block spacing by starius)

    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.

  3. DrahtBot added the label Tests on Mar 13, 2025
  4. Sjors commented at 12:35 pm on March 13, 2025: member
    cc @fjahr
  5. fjahr commented at 8:36 pm on March 14, 2025: contributor

    utACK c09e2a72ff3b851d4c47d1e715b8bdcc54027364

    Change looks good to me.

  6. in test/functional/feature_config_args.py:483 in c09e2a72ff outdated
    480+            # Some CI environments will have limited space and some others won't
    481+            # so we need to handle both cases as a valid result.
    482+            self.nodes[0].stderr.seek(0)
    483+            err = self.nodes[0].stdout.read()
    484+            self.nodes[0].stderr.seek(0)
    485+            self.nodes[0].stderr.truncate()
    


    maflcko commented at 8:33 am on March 15, 2025:

    not sure about logging a warning, then checking it and manually removing it, when the warning isn’t even part of the test. It seems easier to just avoid the warning by setting prune=whatever?

    I expect this will make the testnet3 removal diff a tiny bit smaller, as well as the testnet5 addition diff.

  7. maflcko added this to the milestone 29.0 on Mar 15, 2025
  8. maflcko added the label Needs backport (29.x) on Mar 15, 2025
  9. Sjors renamed this:
    test: testnet4 could log a disk space warning
    test: testnet4 and signet could log a disk space warning
    on Mar 15, 2025
  10. Sjors renamed this:
    test: testnet4 and signet could log a disk space warning
    test: avoid disk space warning for non-regtest
    on Mar 15, 2025
  11. DrahtBot renamed this:
    test: avoid disk space warning for non-regtest
    test: avoid disk space warning for non-regtest
    on Mar 15, 2025
  12. test: avoid disk space warning for non-regtest
    feature_config_args.py incorrectly assumed that its testnet4 node
    would not log a disk space warning.
    
    0683b8ebf33386d5c05140df89df10b1853d7c7e increased m_assumed_blockchain_size
    on testnet4 from 1 to 11 GiB which triggers this bug on more
    systems, e.g. a RAM disk.
    
    Prevent the warning by setting -prune for these nodes.
    
    Fix the same issue in feature_signet.py
    20fe41e9e8
  13. Sjors force-pushed on Mar 15, 2025
  14. Sjors commented at 3:10 pm on March 15, 2025: member

    Implemented @maflcko’s suggestion of using prune to prevent the disk warning rather than deleting it from the log.

    I also found the same issue in feature_signet when using the suggested 4 GB instead my usual bigger RAM disk.

    You may still occasionally get this failure if you use a too small RAM disk and lots of tests in parallel, but the test suite will warn you:

    0There may be insufficient free space in /Volumes/RAMDisk/tmp/test_runner_₿_🏃_20250315_161228 to run the Bitcoin functional test suite.
    
  15. fjahr commented at 3:17 pm on March 15, 2025: contributor

    ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89

    Cool, that’s a simpler solution.

  16. rkrux approved
  17. rkrux commented at 12:51 pm on March 17, 2025: contributor

    ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89

    The last statement in the PR description seems to be contradicting with the title & the code comment.

    This PR fixes the issue by allowing the space warning on both testnet3 and testnet4.

  18. Sjors commented at 12:55 pm on March 17, 2025: member
    @rkrux updated PR description
  19. maflcko commented at 8:08 pm on March 18, 2025: member
    lgtm ACK 20fe41e9e83d510fd467f5a999d55a614b16ef89
  20. fanquake merged this on Mar 18, 2025
  21. fanquake closed this on Mar 18, 2025

  22. stickies-v referenced this in commit 5443a6eac4 on Mar 21, 2025
  23. stickies-v referenced this in commit a8bd94de4e on Mar 21, 2025
  24. stickies-v referenced this in commit 5571e63c54 on Mar 21, 2025
  25. TheCharlatan referenced this in commit 50d4368616 on Mar 24, 2025
  26. glozow referenced this in commit a3060483fa on Mar 25, 2025
  27. glozow commented at 2:37 pm on March 25, 2025: member
    Backported in #32136
  28. glozow removed the label Needs backport (29.x) on Mar 25, 2025

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: 2025-03-28 15:12 UTC

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