Skip to content

Skip test if RUNTIME_BINARY is not runc#628

Merged
jnovy merged 1 commit intocontainers:mainfrom
ricardobranco777:crun
Feb 3, 2026
Merged

Skip test if RUNTIME_BINARY is not runc#628
jnovy merged 1 commit intocontainers:mainfrom
ricardobranco777:crun

Conversation

@ricardobranco777
Copy link
Contributor

@ricardobranco777 ricardobranco777 commented Feb 2, 2026

Skip test if RUNTIME_BINARY is not runc.

We run these tests also with crun and this one was designed for runc and fails with:

#/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#|     FAIL: [no test name given]
#| expected: =~ runc create failed
#|   actual:    \{\"pid\": -1\, \"message\": \"load \`config.json\`: cannot parse the data: lexical error: invalid character inside string.\\n                                        \{     \\\"ociVersion\\\": \\\"1.0.0\\\"\,  \\n                     \(right here\) ------\^\\n\\n\"\}
#\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

https://openqa-assets.opensuse.org/tests/5644472/file/conmon-conmon-runc-user.tap.txt

@@ -93,6 +93,9 @@ teardown() {
}

@test "runtime: runtime error with _OCI_SYNCPIPE defined" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe let's state this also in the test description?

runtime: runc error with _OCI_SYNCPIPE defined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

}

@test "runtime: runtime error with _OCI_SYNCPIPE defined" {
if ! [[ $RUNTIME_BINARY =~ runc ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest:

[[ $(basename "$RUNTIME_BINARY") == "runc" ]]

to avoid false positives as it matches anything containing runc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. I think you meant [[ $(basename "$RUNTIME_BINARY") != "runc" ]]

Also rename the test to reflect the fact that it uses runc

Signed-off-by: Ricardo Branco <rbranco@suse.de>
@jnovy jnovy merged commit 79c334c into containers:main Feb 3, 2026
27 checks passed
@jnovy
Copy link
Collaborator

jnovy commented Feb 3, 2026

Merged, thanks.

@ricardobranco777 ricardobranco777 deleted the crun branch February 3, 2026 12:55
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