Skip to content

test/system: Remove unnecessary --assumeyes, optimize the 'create' tests, etc.#1595

Merged
debarshiray merged 5 commits intocontainers:mainfrom
debarshiray:wip/rishi/test-system-create-drop-unnecessary-assumeyes-update-run-flags
Nov 15, 2024
Merged

test/system: Remove unnecessary --assumeyes, optimize the 'create' tests, etc.#1595
debarshiray merged 5 commits intocontainers:mainfrom
debarshiray:wip/rishi/test-system-create-drop-unnecessary-assumeyes-update-run-flags

Conversation

@debarshiray
Copy link
Copy Markdown
Member

No description provided.

The toolbox(1) binary always relies on the PATH environment variable to
find the podman(1) and skopeo(1) binaries.  There's no way to override
those with the PODMAN and SKOPEO environment variables, and they only
affect any direct use of podman(1) and skopeo(1) within the test suite.

Therefore, offering the PODMAN and SKOPEO environment variables in their
current form is needlessly confusing and misleading, and can lead to
surprises arising from different podman(1) and skopeo(1) binaries being
used in different places.  Either toolbox(1) should also honour them or
the test suite shouldn't offer them.  The former is more complicated
without any obvious need for it, so the latter was chosen.

containers#1592
It shouldn't be necessary to use the --assumeyes option when creating a
Toolbx container, if the corresponding image is already present in the
local containers/storage image store.  It's harmful to test it with the
option, even when it shouldn't be needed, because it's off by default
and most users won't enable it.

Therefore, it's better to test the most common scenario that most users
will encounter.

containers#1595
@debarshiray debarshiray force-pushed the wip/rishi/test-system-create-drop-unnecessary-assumeyes-update-run-flags branch from b46b98f to 91c5396 Compare November 14, 2024 11:43
@softwarefactory-project-zuul
Copy link
Copy Markdown

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.

In the case of these two particular tests, toolbox(1) is supposed to
validate the command line options before trying to find the image.  So,
there's no need to copy the image from the test suite's image cache
directory to its local container/storage store.

If the toolbox(1) code breaks, then either it won't throw the expected
error or it will download the image before validating the command line
options.  The first possibility will be easily detected.  The other
could have been harder to notice, but, fortunately, commit
55c0e63 added variants of these tests without the --assumeyes
option and there are other tests to ensure that images cannot be
downloaded without that option.  So, any unexpected attempts to download
the image will be caught by those variants of these tests.

Fallout from 32b147b

containers#1595
@debarshiray
Copy link
Copy Markdown
Member Author

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/39c6850c8fd84912b062286aea7bb9e1

✔️ unit-test SUCCESS in 5m 35s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 10s
✔️ unit-test-restricted SUCCESS in 5m 38s
✔️ system-test-fedora-rawhide-commands-options SUCCESS in 1h 12m 56s
✔️ system-test-fedora-rawhide-runtime-environment-arch-fedora SUCCESS in 1h 17m 54s
✔️ system-test-fedora-rawhide-runtime-environment-ubuntu SUCCESS in 31m 46s
✔️ system-test-fedora-41-commands-options SUCCESS in 1h 09m 52s
✔️ system-test-fedora-41-runtime-environment-arch-fedora SUCCESS in 1h 18m 08s
✔️ system-test-fedora-41-runtime-environment-ubuntu SUCCESS in 30m 10s
✔️ system-test-fedora-40-commands-options SUCCESS in 1h 12m 26s
system-test-fedora-40-runtime-environment-arch-fedora NODE_FAILURE Node request 200-0007666927 failed in 0s
system-test-fedora-40-runtime-environment-ubuntu NODE_FAILURE Node request 200-0007666928 failed in 0s
system-test-fedora-39-commands-options NODE_FAILURE Node request 200-0007666929 failed in 0s
system-test-fedora-39-runtime-environment-arch-fedora NODE_FAILURE Node request 200-0007666930 failed in 0s
system-test-fedora-39-runtime-environment-ubuntu NODE_FAILURE Node request 200-0007666931 failed in 0s

@debarshiray
Copy link
Copy Markdown
Member Author

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

@softwarefactory-project-zuul
Copy link
Copy Markdown

@debarshiray debarshiray changed the title test/system: Remove unnecessary --assumeyes test/system: Remove unnecessary --assumeyes, optimize the 'create' tests, etc. Nov 15, 2024
Currently, there's no way to get assert_line to use the stderr_lines
array [1].  This is worked around by assigning stderr_lines to the
'lines' array.

[1] bats-core/bats-assert#42

containers#1595
@softwarefactory-project-zuul
Copy link
Copy Markdown

@softwarefactory-project-zuul
Copy link
Copy Markdown

@debarshiray debarshiray merged commit d29adbf into containers:main Nov 15, 2024
@debarshiray debarshiray deleted the wip/rishi/test-system-create-drop-unnecessary-assumeyes-update-run-flags branch November 15, 2024 20:14
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.

In the case of these two particular tests, toolbox(1) is supposed to
validate the command line options before trying to find the image.  So,
there's no need to copy the image from the test suite's image cache
directory to its local container/storage store.

Fallout from 32b147b

containers#1595
containers#1742
(backported from commit adc8650)
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.

In the case of these two particular tests, toolbox(1) is supposed to
validate the command line options before trying to find the image.  So,
there's no need to copy the image from the test suite's image cache
directory to its local container/storage store.

Fallout from 32b147b

containers#1595
containers#1745
(backported from commit adc8650)
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
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.

1 participant