Skip to content

Allow tests to run in parallel - #2296

Open
Mab879 wants to merge 15 commits into
OpenSCAP:mainfrom
Mab879:test_fixes
Open

Allow tests to run in parallel#2296
Mab879 wants to merge 15 commits into
OpenSCAP:mainfrom
Mab879:test_fixes

Conversation

@Mab879

@Mab879 Mab879 commented Dec 19, 2025

Copy link
Copy Markdown
Member

Significantly speed up the tests if ran with -j. See each commit for details. We have room for additional speed up if we can remove RESOURCE_LOCK groups.

Review hints

ctest -j$(nproc) a few times.

@Mab879
Mab879 marked this pull request as draft December 19, 2025 20:36
@Mab879
Mab879 marked this pull request as ready for review January 6, 2026 00:38
@sonarqubecloud

Copy link
Copy Markdown

@Mab879
Mab879 force-pushed the test_fixes branch 2 times, most recently from 610c79e to ec96b1a Compare April 23, 2026 17:47
@sonarqubecloud

Copy link
Copy Markdown

@Mab879

Mab879 commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@jan-cerny can I get a review on this?

@Mab879

Mab879 commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Rebased on latest main.

@sonarqubecloud

Copy link
Copy Markdown

@matusmarhefka matusmarhefka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, before:

Total Test time (real) = 425.16 sec

After:

Total Test time (real) = 172.90 sec

Once we merge this, consider updating https://src.fedoraproject.org/tests/openscap/blob/main/f/Sanity/smoke-test/runtest.sh#_124 as well to benefit from tests parallelization too.

add_oscap_test("openscap_2289_regression.sh")
add_oscap_test("test_null_ptr_regression.sh")

set_tests_properties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block has different indent compared to the next one (6-space vs 5-space).

Comment thread tests/probes/rpm/rpminfo/CMakeLists.txt Outdated
add_oscap_test("test_probes_rpminfo.sh" LABELS linux linux_only)
add_oscap_test("test_probes_rpminfo_offline.sh" LABELS linux linux_only)

set_tests_properties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor inconsistency, previous block uses tabs for indent.

add_oscap_test("test_probes_rpmverify_not_equals_operation.sh" LABELS linux linux_only)
add_oscap_test("test_probes_rpmverify_not_equals_operation_offline.sh" LABELS linux linux_only)

set_tests_properties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous block in this file uses tabs for indent.

add_oscap_test("test_probes_rpmverifyfile_older.sh" LABELS linux linux_only)
add_oscap_test("test_probes_rpmverifyfile_offline.sh" LABELS linux linux_only)

set_tests_properties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous block in this file uses tabs for indent.

add_oscap_test("test_probes_rpmverifypackage.sh" LABELS linux linux_only)
add_oscap_test("test_probes_rpmverifypackage_offline.sh" LABELS linux linux_only)

set_tests_properties(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous block in this file uses tabs for indent.

cp "${srcdir}/openshift-logging.yaml" /tmp

local YAML_FILE="/tmp/openshift-logging.yaml"
local YAML_FILE="/tmp/openshift-logging_key.yaml"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the name change? Previous cp command copies openshift-logging.yaml into /tmp, not openshift-logging_key.yaml. Also the $DF file (test_probes_yamlfilecontent_key.xml) references openshift-logging.yaml.

I think you also wanted to actually modify the previous copy command so it copies the file into tmp under this different name right? Otherwise tests/probes/yamlfilecontent/CMakeLists.txt would also need to be updated to lock /tmp/openshift-logging.yaml as it is used by the test_probes_yamlfilecontent_array.sh script too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some conflicting file name here, I updated the new file name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 2e9c3bc for more details.

Mab879 added 2 commits July 31, 2026 12:49
If you had "OpenSCAP" in your path to the OpenSCAP repo
it would cause issues
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants