Skip to content
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

skip cgroup v2 test of oci-tools #1406

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Conversation

utam0k
Copy link
Member

@utam0k utam0k commented Dec 12, 2022

Ignore the failure because it cannot be tested in a cgroup v2 environment. For example, it fails with ubuntu 22.04.

@utam0k utam0k marked this pull request as ready for review December 12, 2022 12:57
Signed-off-by: utam0k <k0ma@utam0k.jp>
@codecov-commenter
Copy link

Codecov Report

Merging #1406 (ce40384) into main (28da7c0) will decrease coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1406      +/-   ##
==========================================
- Coverage   68.82%   68.81%   -0.01%     
==========================================
  Files         119      119              
  Lines       12779    12779              
==========================================
- Hits         8795     8794       -1     
- Misses       3984     3985       +1     

Comment on lines +124 to +129
if [ 0 -eq $(grep "# cgroupv2 is not supported yet " $logfile | wc -l ) ]; then
echo "Skip $case bacause oci-runtime-tools doesn't support cgroup v2"
continue;
fi
cat $logfile
exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey, I'm not sure I understand the purpose of this part. If we are checking for the test in check_environment function above, why do we need this here? Also, shouldn't the 0 -eq ... part be 0 -ne ... instead? If the grep finds occurrence, then wc will output a non-zero number, in which case we should be entering the condition, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

The logic is that if the test fails and the cause of the failure is not supported by the test in cgroup v2, the failure is ignored. I could have used check_environment, but I added this because of the uniform error messages.

@utam0k utam0k mentioned this pull request Dec 29, 2022
Copy link
Collaborator

@YJDoc2 YJDoc2 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Jan 4, 2023

Hey, @utam0k sorry for the delay, this looks good, so I'll go ahead and merge

@YJDoc2 YJDoc2 merged commit 8491bee into youki-dev:main Jan 4, 2023
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.

3 participants