test: Open streams_test_tmp file in temporary folder #23439

pull martinus wants to merge 1 commits into bitcoin:master from martinus:2021-11-allow-concurrent-streams_buffered_file_rand changing 1 files +7 −4
  1. martinus commented at 5:56 PM on November 4, 2021: contributor

    The tests streams_tests/streams_buffered_file and streams_tests/streams_buffered_file_rand did not use a the temporary directory provided by BasicTestingSetup, so it was not possible to execute multiple of them in parallel. This fixes that.

    To reproduce, run

    parallel --halt now,fail=1 './src/test/test_bitcoin --run_test=streams_tests/streams_buffered_file_rand' -- ::: {1..1000}
    

    This executes the test 1000 times, one job per CPU. It works on that commit but mergebase fails quickly.

  2. Open streams_test_tmp file in temporary folder
    The tests `streams_tests/streams_buffered_file` and `streams_tests/streams_buffered_file_rand`
    did not use a the temporary directory provided by  `BasicTestingSetup`, so it was not possible
    to execute multiple of them in parallel. This fixes that.
    
    To reproduce, run
    
    ```sh
    parallel --halt now,fail=1 './src/test/test_bitcoin --run_test=streams_tests/streams_buffered_file_rand' -- ::: {1..1000}
    ```
    
    This executes the test 1000 times, one job per CPU. It works on that commit but mergebase fails quickly.
    a04350b86c
  3. martinus renamed this:
    Open streams_test_tmp file in temporary folder
    test: Open streams_test_tmp file in temporary folder
    on Nov 4, 2021
  4. DrahtBot added the label Tests on Nov 4, 2021
  5. theStack approved
  6. theStack commented at 2:50 AM on November 7, 2021: member

    Tested ACK a04350b86c14a8038117aa013952b4e2b5f91cb0

    master branch:

    $ parallel --halt now,fail=1 './src/test/test_bitcoin --run_test=streams_tests/streams_buffered_file_rand' -- ::: 1 2 3
    ...
    Running 1 test case...
    unknown location(0): fatal error: in "streams_tests/streams_buffered_file_rand": std::__1::ios_base::failure: CBufferedFile::Fill: end of file: unspecified iostream_category error
    test/streams_tests.cpp(373): last checkpoint
    
    *** 1 failure is detected in the test module "Bitcoin Core Test Suite"
    parallel: This job failed:
    ./src/test/test_bitcoin --run_test=streams_tests/streams_buffered_file_rand -- 1
    

    PR branch:

    $ parallel --halt now,fail=1 './src/test/test_bitcoin --run_test=streams_tests/streams_buffered_file_rand' -- ::: 1 2 3
    ...
    Running 1 test case...
    
    *** No errors detected
    Running 1 test case...
    
    *** No errors detected
    Running 1 test case...
    
    *** No errors detected
    

    Good catch!

  7. MarcoFalke merged this on Nov 8, 2021
  8. MarcoFalke closed this on Nov 8, 2021

  9. martinus deleted the branch on Nov 8, 2021
  10. sidhujag referenced this in commit 0177501410 on Nov 8, 2021
  11. DrahtBot locked this on Nov 8, 2022
Contributors
Labels

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-26 12:14 UTC

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