Test against the init and builder images the checkout builds - #2180
Closed
MayCXC wants to merge 5 commits into
Closed
Test against the init and builder images the checkout builds#2180MayCXC wants to merge 5 commits into
MayCXC wants to merge 5 commits into
Conversation
make integration clears the application data directory after init-block has already loaded the freshly built init image, so a run against a dedicated APP_ROOT tested the runtime's default init image instead of the one the editable containerization checkout produced. Features that live in the guest agent then fail their tests with no hint that the guest under test was the wrong one. Keep the saved tar in the repository's bin directory and load it from the integration recipe after its own system start, once the data directory clearing is behind it. init-block keeps its own load so building the init image alone still refreshes the running store.
install-init.sh starts the system to load the init image it built, and a start against a data directory with no configured kernel asks on stdin whether to install one. The integration path runs this from make with no terminal, so the question fails the read and init-block exits before a single test begins. Pass --enable-kernel-install the way the integration recipe's own start already does, so the answer is the flag instead of a prompt.
The integration recipe defaults SCRATCH_ROOT to .test-scratch under the repository so the builder can reach build contexts, and nothing ignored it, so an interrupted run's scratch trees were one git add away from a commit.
A locally built builder image exists in no registry, the position the editable init image is in, so the recipe lands bin/builder.tar into the store the tests see the same way it lands bin/init.tar, and a fixture's builder start finds the image the configuration names instead of reaching for a registry that does not carry it.
The network suite runs a python http.server; pulling its image from Docker Hub in the middle of the concurrent pass put a registry round trip and its rate limits inside the test's readiness window. Warmed with the other suite images, the pull happens once, before the load.
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.
Type of Change
Motivation and Context
Five defects in
make integration, all of which let a run report a pass about something other than what the checkout built.The built init image is cleared before the tests see it.
make integrationclears the application data directory afterinit-blockhas already loaded the freshly built init image, so a run against a dedicatedAPP_ROOTtested the runtime's default init image instead of the one the editable containerization checkout produced. Features that live in the guest agent then fail their tests with no hint that the guest under test was the wrong one. The saved tar stays in the repository'sbindirectory and the integration recipe loads it after its own system start, once the data directory clearing is behind it;init-blockkeeps its own load so building the init image alone still refreshes the running store.init-blockcannot answer the kernel prompt.install-init.shstarts the system to load the init image it built, and a start against a data directory with no configured kernel asks on stdin whether to install one. The integration path runs this frommakewith no terminal, so the question fails the read andinit-blockexits before a single test begins. It passes--enable-kernel-installthe way the integration recipe's own start already does, so the answer is the flag instead of a prompt.A locally built builder image exists in no registry, the position the editable init image is in, so the recipe lands
bin/builder.tarinto the store the tests see the same way it landsbin/init.tar, and a fixture'sbuilder startfinds the image the configuration names instead of reaching for a registry that does not carry it.The network suite pulls mid-run. It runs a python
http.server, and pulling that image from Docker Hub in the middle of the concurrent pass put a registry round trip and its rate limits inside the test's readiness window. It is warmed with the other suite images now, so the pull happens once, before the load.The default scratch root was not ignored. The integration recipe defaults
SCRATCH_ROOTto.test-scratchunder the repository so the builder can reach build contexts, and nothing ignored it, so an interrupted run's scratch trees were onegit addaway from a commit.Testing
make integrationagainst a dedicatedAPP_ROOTruns the built init image, starts without a terminal, and finds the built builder image. Integration suite: 397 passed. Unit suite: 772 passed.make fmt,make checkclean.