Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@klihub
Copy link
Contributor

@klihub klihub commented Feb 25, 2022

Don't dereference $TESTDATA before the test case is set up. The incorrect setup order prevents cgroups.bats
tests from being properly isolated from each other, causing very often localintegration cgroups tests to fail in github workflows or OpenShift CI.

What type of PR is this?

/kind ci

What this PR does / why we need it:

Don't dereference $TESTDATA before the test case is set up.
Doing otherwise breaks proper isolation of test cases. This
manifests itself in many ways, since concurrently cgroups
BATS tests can now interfere with each other when mangling
test input data. The most typical symptom is the expected
memory limit being incorrect in one of the test cases like
this:

   not ok 14 cgroupv2 unified support
     (in test file ./cgroups.bats, line 103)
       `[[ "$output" == *"209715200"* ]]' failed

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Like the BATS installation fixing bits, this one was also split out from #5596,
so we can merge it ASAP without the remaining other a bit more problematic
bits there.

Does this PR introduce a user-facing change?

None

Don't dereference $TESTDATA before the test case is set up.
Doing otherwise breaks proper isolation of test cases. This
manifests itself in many ways, since concurrently cgroups
BATS tests can now interfere with each other when mangling
test input data. The most typical symptom is the expected
memory limit being incorrect in one of the test cases like
this:

   not ok 14 cgroupv2 unified support
   # (in test file ./cgroups.bats, line 103)
   #   `[[ "$output" == *"209715200"* ]]' failed

Signed-off-by: Krisztian Litkey <[email protected]>
@openshift-ci openshift-ci bot added release-note-none Denotes a PR that doesn't merit a release note. kind/ci Categorizes issue or PR as related to CI dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Feb 25, 2022
@openshift-ci openshift-ci bot requested review from QiWang19 and wgahnagl February 25, 2022 13:40
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #5684 (ff36ee6) into main (f4083c4) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #5684   +/-   ##
=======================================
  Coverage   43.18%   43.18%           
=======================================
  Files         123      123           
  Lines       12267    12267           
=======================================
+ Hits         5297     5298    +1     
+ Misses       6462     6461    -1     
  Partials      508      508           

@klihub
Copy link
Contributor Author

klihub commented Feb 25, 2022

/test integration_cgroupv2

@klihub
Copy link
Contributor Author

klihub commented Feb 25, 2022

/retest-required

@haircommander
Copy link
Member

/approve
/lgtm

breaking them out makes sense to me

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, klihub

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2022
@openshift-merge-robot openshift-merge-robot merged commit e04b381 into cri-o:main Feb 25, 2022
@klihub klihub deleted the fixes/test/cgroups-test-setup branch February 25, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/ci Categorizes issue or PR as related to CI lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants