Skip to content

Conversation

@wenzeslaus
Copy link
Member

The test with the rand function fails with higher number of threads (4 and above in tests).

The test with the rand function fails with higher number of threads (4 and above in tests).
@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python module tests Related to Test Suite labels Oct 9, 2025
@wenzeslaus
Copy link
Member Author

Linux ends with -11, so segfault (same as my local Linux test):

FAILED raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py::test_rand_no_explicit_seed_setting[10] - AssertionError: assert -11 == 1
 +  where -11 = ToolResult(returncode=-11, stdout='', stderr='ERROR: Pseudo-random number generator not seeded\n').returncode

Windows produces 1 for return code (desired), but does not produce an error message:

 FAILED raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py::test_rand_no_explicit_seed_setting[0] - AssertionError: assert 'not seeded' in ''
 +  where '' = ToolResult(returncode=1, stdout='', stderr='').stderr

macOS runs the tests and they pass.

…there is too many different conditions to get right (macOS does not fail, Windows fails with no stderr, Linux fails with segfault, small nprocs passes).
@wenzeslaus
Copy link
Member Author

We can merge this (assuming CI passes) and #6480 can delete the @pytest.mark.skip line.

@wenzeslaus wenzeslaus marked this pull request as ready for review October 10, 2025 13:47
@wenzeslaus wenzeslaus changed the title tests: Add tests for errors from r.mapcalc tests: Add tests for error states in r.mapcalc Oct 10, 2025
@wenzeslaus wenzeslaus enabled auto-merge (squash) October 10, 2025 13:49
@wenzeslaus wenzeslaus merged commit cd88e2c into OSGeo:main Oct 10, 2025
28 checks passed
@wenzeslaus wenzeslaus deleted the add-r_mapcalc-errors-tests branch October 10, 2025 14:59
@github-actions github-actions bot added this to the 8.5.0 milestone Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants