tests: Respect compression formats rpmio supports in module_index test#631
Merged
ppisar merged 1 commit intofedora-modularity:mainfrom Jun 13, 2025
Merged
Conversation
If rpm does not support all compression formats and libmodulemd is
configured with rpmio support, module_index_release test failed:
$ MESON_SOURCE_ROOT=/tmp/libmodulemd-2.15.0 TEST_DATA_PATH=/tmp/libmodulemd-2.15.0/modulemd/tests/test_data /tmp/b/modulemd/module_index
TAP version 14
# random seed: R02Sf9e05b79de9e908ae8cb3de188499581
1..18
# Start of modulemd tests
# Start of v2 tests
# Start of module tests
# Start of index tests
ok 1 /modulemd/v2/module/index/dump
ok 2 /modulemd/v2/module/index/read
ok 3 /modulemd/v2/module/index/remove_module
ok 4 /modulemd/v2/module/index/custom_read
ok 5 /modulemd/v2/module/index/custom_write
ok 6 /modulemd/v2/module/index/get_default_streams
ok 7 /modulemd/v2/module/index/empty
**
libmodulemd:ERROR:../libmodulemd-2.15.0/modulemd/tests/test-modulemd-moduleindex.c:1493:test_module_index_read_compressed: assertion failed (error == NULL): Parser error (modulemd-yaml-error-quark, 2)
not ok /modulemd/v2/module/index/compressed - libmodulemd:ERROR:../libmodulemd-2.15.0/modulemd/tests/test-modulemd-moduleindex.c:1493:test_module_index_read_compressed: assertion failed (error == NULL): Parser
+error (modulemd-yaml-error-quark, 2)
Bail out!
The test assumed that rpmio library supports all compression formats.
That's not guaranteed, the support is optional for each format.
This patch fixes it by probing rpmio library for each compression
format and if that does not work (rpmio returns compressed data), the
test will assume that that format is not supported.
Implementation details: The probing happens at run-time and thus links
the rpmio library to the the tests. Probing at configure time would
not work when crosscompiling.
Resolve: fedora-modularity#630
Collaborator
Author
|
The CI failure on Fedora 43 is unrelated bug in packit https://bugzilla.redhat.com/show_bug.cgi?id=2371766. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If rpm does not support all compression formats and libmodulemd is configured with rpmio support, module_index_release test failed:
The test assumed that rpmio library supports all compression formats. That's not guaranteed, the support is optional for each format.
This patch fixes it by probing rpmio library for each compression format and if that does not work (rpmio returns compressed data), the test will assume that that format is not supported.
Implementation details: The probing happens at run-time and thus links the rpmio library to the the tests. Probing at configure time would not work when crosscompiling.
Resolve: #630