Skip to content

setup runc integration test #3182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saku3
Copy link
Contributor

@saku3 saku3 commented Jun 8, 2025

Description

This change allows runc integration tests to be executed using the youki runtime in CI.

.github/workflows/runc_integration_tests.yaml

This file configures the CI workflow to run the runc integration tests. It performs the following steps:

  • Build youki
  • Run runc integration tests:
    • Install necessary packages
    • Set up bats
    • Execute tests by running runc_integration_test.sh

scripts/runc_integration_test.sh

This script performs the following:

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Performance improvement
  • Test updates
  • CI/CD related changes
  • Other:

Testing

  • Added new unit tests
  • Added new integration tests
  • Ran existing test suite
  • Tested manually (please provide steps)

I have confirmed that all tests pass with runc by executing the following command.(By specifying runc as the first argument, you can run the tests using the runc runtime.)

scripts/runc_integration_test.sh runc

Related Issues

Part of #3178

@saku3 saku3 marked this pull request as draft June 8, 2025 02:27
@saku3 saku3 force-pushed the setup-runc-integration-test branch from 49beaf8 to 5ea28a2 Compare June 8, 2025 02:30
@saku3
Copy link
Contributor Author

saku3 commented Jun 8, 2025

I might make further changes, but I’d appreciate any advice on whether the current direction is correct.

Copy link
Member

Choose a reason for hiding this comment

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

It should be integrated with e2e.yaml.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Jun 9, 2025

Hey so a couple of points here,

  1. code-wise looks ok to me apart from utam0k's comment
  2. I see in the run you have linked that there are lot of debug logs from Youki, even though in PR we are compiling youki in release mode, can you check that? We should not have debug logs in CI as it will clutter o/p.
  3. For now, we don't need to run it on both arch, only amd64 with gnu should be enough. Once we have all failing tests triaged, and we are adding it as a standard CI, then we can use both archs.
  4. I saw in the run you linked that all tests were run in 3-4 minutes. Are those all the runc tests or you ran just a subset/fail fast mode?

Thanks for your efforts :)

@saku3 saku3 force-pushed the setup-runc-integration-test branch from 5ea28a2 to 82a8044 Compare June 12, 2025 23:01
@saku3 saku3 force-pushed the setup-runc-integration-test branch 2 times, most recently from d82f53f to 60a1e04 Compare June 21, 2025 04:22
@saku3 saku3 marked this pull request as ready for review June 21, 2025 06:11
@saku3
Copy link
Contributor Author

saku3 commented Jun 21, 2025

@utam0k @YJDoc2

Thank you for the review!

code-wise looks ok to me apart from utam0k's comment

I’ve updated it to run using e2e.yaml.

I see in the run you have linked that there are lot of debug logs from Youki, even though in PR we are compiling youki in release mode, can you check that? We should not have debug logs in CI as it will clutter o/p.

The debug logs are output as part of the tests, specifically when --debug is passed as an option to runc during execution.

For now, we don't need to run it on both arch, only amd64 with gnu should be enough. Once we have all failing tests triaged, and we are adding it as a standard CI, then we can use both archs.

I’ve updated the configuration accordingly.

I saw in the run you linked that all tests were run in 3-4 minutes. Are those all the runc tests or you ran just a subset/fail fast mode?

Currently, it's set up to run all of the tests (although a few known-hanging tests are skipped within runc_integration_test.sh).
However, the tests sometimes hang randomly during execution.
I'm not yet sure how best to handle those hangs.
In some runs, like the one below, all tests do complete:
https://github.com/saku3/youki/actions/runs/15792161456/job/44519468461?pr=13

I would appreciate any reviews or advice you could provide.

Comment on lines 9 to 11
if [[ "$RUNTIME" == "youki" ]]; then
if [[ ! -x ./youki ]]; then
echo "youki binary not found"
exit 1
fi
cp ./youki "$RUNC_DIR/runc"
chmod +x "$RUNC_DIR/runc"
fi
Copy link
Member

Choose a reason for hiding this comment

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

How about passing a path of a binary for runtime?

@saku3 saku3 force-pushed the setup-runc-integration-test branch from 60a1e04 to 18115ef Compare June 22, 2025 22:21
@YJDoc2
Copy link
Collaborator

YJDoc2 commented Jun 24, 2025

@saku3 , the CI seems to be failing. Or is it just a flake?

Also @utam0k , I think for now it is better if we put these tests in a separate CI job like podman and run it daily. Currently these are still failing, so maybe we will fix them first and then add them as a normal job in our CI. wdyt?

@saku3 saku3 force-pushed the setup-runc-integration-test branch from 18115ef to 00cbdac Compare June 24, 2025 11:22
@saku3
Copy link
Contributor Author

saku3 commented Jun 24, 2025

For now, I’ve set all failing tests to be skipped.
However, even with this change, the tests occasionally hang during execution. The reason for the hang is still under investigation.
It's still difficult to integrate this into the CI at this stage.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Jul 1, 2025

Hey @saku3 , thanks for the changes. Let us do this - can we make the CI into a separate CI workflow like podman, I think similar to what you had done originally? That should be the only change from my side, and I'll merge the PR after that. Apologies it is taking so long from our side to get this finished 😓

@saku3 saku3 force-pushed the setup-runc-integration-test branch from 00cbdac to 650381b Compare July 19, 2025 01:39
Signed-off-by: Yusuke Sakurai <[email protected]>
@saku3 saku3 force-pushed the setup-runc-integration-test branch from 650381b to 7cc9ae8 Compare July 19, 2025 02:41
@saku3
Copy link
Contributor Author

saku3 commented Jul 19, 2025

@YJDoc2
Thank you for the review!
Sorry for the late response, but I’ve made the changes.

The updates since the last PR are as follows:

  • As you pointed out, separated the tests, similar to the Podman CI workflow
  • Prepared a file to list the test cases

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

Successfully merging this pull request may close these issues.

3 participants