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

Assign a data path and serial number to each test in discover #1876

Merged
merged 4 commits into from
Mar 2, 2023

Conversation

happz
Copy link
Collaborator

@happz happz commented Feb 27, 2023

To support both multihost scenarios and/or running a test multiple times, tmt needs to distinguish test data directories of different test instances. To allow this, each test instance is given a "serial number" which we can use in a data directory name.

Note: there can be more elaborate ways for picking the serial numbers, the patch starts with something really trivial yet functioning.

Another note: the patch does not isolate tests on a phase level, a single test, executed on different guests, may still land in the same data directory. Different patch will solve this issue.

Part of the effort in #1614 and #1790.

@happz happz added the area | multihost Issues related to the multihost testing support label Feb 27, 2023
@happz happz force-pushed the test-assign-serial-and-data-path branch from d7a8c5c to e49d0ad Compare February 27, 2023 15:55
@happz happz added this to the 1.23 milestone Feb 27, 2023
@psss psss modified the milestones: 1.23, 1.22 Feb 28, 2023
@lukaszachy
Copy link
Collaborator

lukaszachy commented Feb 28, 2023

Hm, when the test name is / the created workdir name is -1. That looks strange.
/var/tmp/tmt/run-008/plans/default/execute/data/-1/output.txt

@happz
Copy link
Collaborator Author

happz commented Feb 28, 2023

Hm, when the test name is / the created workdir name is -1. That looks strange. /var/tmp/tmt/run-008/plans/default/execute/data/-1/output.txt

Yeah, I'm adding some tests, I'll add this case as well. No idea how it happens though, but I'll look into it.

@happz happz added step | execute Stuff related to the execute step step | discover Stuff related to the discover step labels Feb 28, 2023
@happz happz force-pushed the test-assign-serial-and-data-path branch from e49d0ad to 98dd070 Compare February 28, 2023 13:28
tmt/base.py Outdated Show resolved Hide resolved
tmt/base.py Outdated Show resolved Hide resolved
tmt/result.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@lukaszachy lukaszachy left a comment

Choose a reason for hiding this comment

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

LGTM to the code, still running tests/full in TJ#7580157

@lukaszachy
Copy link
Collaborator

lukaszachy commented Mar 1, 2023

Fails in tests/full:
/tests/discover/order
/tests/execute/reboot/reuse_provision
/tests/execute/filesubmit
/tests/execute/metadata
/tests/execute/upgrade/full

All failed with test assuming the old path

To support both multihost scenarios and/or running a test multiple
times, tmt needs to distinguish test data directories of different test
instances. To allow this, each test instance is given a "serial number"
which we can use in a data directory name.

Note: there can be more elaborate ways for picking the serial numbers,
the patch starts with something really trivial yet functioning.

Another note: the patch does not isolate tests on a phase level, a
single test, executed on different guests, may still land in the same
data directory. Different patch will solve this issue.
@happz happz force-pushed the test-assign-serial-and-data-path branch 2 times, most recently from 8ec2aca to 359930d Compare March 1, 2023 15:09
@happz happz force-pushed the test-assign-serial-and-data-path branch from 359930d to 142b5c3 Compare March 1, 2023 17:02
@happz
Copy link
Collaborator Author

happz commented Mar 2, 2023

Tests are green \o/

So, looking for reviews & merge, then:

@thrix thrix self-requested a review March 2, 2023 12:04
Copy link
Collaborator

@thrix thrix left a comment

Choose a reason for hiding this comment

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

LGTM

@thrix thrix requested a review from lukaszachy March 2, 2023 12:23
@thrix thrix merged commit 8d2a8ea into main Mar 2, 2023
@thrix thrix deleted the test-assign-serial-and-data-path branch March 2, 2023 12:33
@happz happz added the area | results Related to how tmt stores and shares results label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | multihost Issues related to the multihost testing support area | results Related to how tmt stores and shares results step | discover Stuff related to the discover step step | execute Stuff related to the execute step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants