test/system: Optimize the help, group and user tests#1635
Merged
debarshiray merged 2 commits intocontainers:mainfrom May 1, 2025
Merged
Conversation
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
May 1, 2025
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the resource limit tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The resource limit tests query the values for different resources from the same default container without changing its state. Therefore, a lot of disk I/O can be avoided by creating the default container only once for all the tests. containers#1635
0f87887 to
61ada39
Compare
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The tests for toolbox(1) invocations forwarded to the host, which includes the help tests, are particularly slow because they never skip the I/O. This makes them a good target for optimizations. The help tests for toolbox(1) invocations forwarded to the host use the same default Toolbx container to invoke toolbox(1) from without changing its state. Therefore, a lot of disk I/O can be avoided by creating the default container only once for all those tests. This can reduce the time needed to run the help tests from almost 7 minutes to a few seconds. containers#1635
61ada39 to
69d6b11
Compare
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
May 1, 2025
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the group and user tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The group and user tests check the group and user configuration in different containers without changing their state. Therefore, a lot of disk I/O can be avoided by creating these containers only once for all the tests. containers#1635
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the group and user tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The group and user tests check the group and user configuration in different containers without changing their state. Therefore, a lot of disk I/O can be avoided by creating these containers only once for all the tests. This can reduce the time needed to run the group and user tests from almost 22 minutes to almost 5 minutes. containers#1635
Member
Author
|
recheck |
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
Jan 27, 2026
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the group and user tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The group and user tests check the group and user configuration in different containers without changing their state. Therefore, a lot of disk I/O can be avoided by creating these containers only once for all the tests. This can reduce the time needed to run the group and user tests from almost 22 minutes to almost 5 minutes. containers#1635 containers#1742 (backported from commit 3017a46)
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
Jan 27, 2026
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the group and user tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The group and user tests check the group and user configuration in different containers without changing their state. Therefore, a lot of disk I/O can be avoided by creating these containers only once for all the tests. This can reduce the time needed to run the group and user tests from almost 22 minutes to almost 5 minutes. containers#1635 containers#1742 (backported from commit 3017a46)
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
Jan 27, 2026
The system tests can be very I/O intensive, because many of them copy OCI images from the test suite's image cache directory to its local container/storage store, create containers, and then delete everything to run the next test with a clean slate. This makes them slow. The runtime environment tests, which includes the group and user tests, are particularly slow because they don't skip the I/O even when testing error handling. This makes them a good target for optimizations. The group and user tests check the group and user configuration in different containers without changing their state. Therefore, a lot of disk I/O can be avoided by creating these containers only once for all the tests. This can reduce the time needed to run the group and user tests from almost 22 minutes to almost 5 minutes. containers#1635 containers#1746 (backported from commit 3017a46)
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
Feb 4, 2026
Both the commands and options tests [1,2], and runtime environment tests [3,4,5,6] were optimized by avoiding a lot of disk I/O. Fallout from 40e3c5a [1] Commit adc8650 containers@adc8650660b454f3 containers#1595 [2] Commit 69d6b11 containers@69d6b11a9b91ccbf containers#1635 [3] Commit 3017a46 containers@3017a46c03c963ef containers#1635 [4] Commit 1b9dd00 containers@1b9dd007ea1d0778 containers#1637 [5] Commit 5881bc4 containers@5881bc43f34815b1 containers#1641 [6] Commit 836c055 containers@836c0557f4dc100b containers#1646
debarshiray
added a commit
to debarshiray/toolbox
that referenced
this pull request
Feb 4, 2026
Both the commands and options tests [1,2], and runtime environment tests [3,4,5,6] were optimized by avoiding a lot of disk I/O. Fallout from 40e3c5a [1] Commit adc8650 containers@adc8650660b454f3 containers#1595 [2] Commit 69d6b11 containers@69d6b11a9b91ccbf containers#1635 [3] Commit 3017a46 containers@3017a46c03c963ef containers#1635 [4] Commit 1b9dd00 containers@1b9dd007ea1d0778 containers#1637 [5] Commit 5881bc4 containers@5881bc43f34815b1 containers#1641 [6] Commit 836c055 containers@836c0557f4dc100b containers#1646 containers#1758
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The system tests can be very I/O intensive, because many of them copy
OCI images from the test suite's image cache directory to its local
container/storage store, create containers, and then delete everything
to run the next test with a clean slate. This makes them slow.
A lot of disk I/O can be avoided by reducing the number of times this
happens.