You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TestBuildIsShareableForCompatiblePlatform unclear what the intent is #3451
I will assume this was meant to test building for a "different from the host but currently emulated platform", and rewrite the test accordingly, including verification that we are able to emulate.
i can fix it, AssertErrNotContains -> from the name i always assumed it checks stderr, probably a simple redirection of everything to stdout would fix it.
the test checks if a cross build is happening then a tarball is created. so if the test are running on amd then that portion would run and test but if its running on arm it would get skipped.
i can fix it, AssertErrNotContains -> from the name i always assumed it checks stderr, probably a simple redirection of everything to stdout would fix it.
Probably this method should go. It does not really serve a purpose, since what we are checking here is that the build is successful (exitcode 0 should be sufficient).
the test checks if a cross build is happening then a tarball is created. so if the test are running on amd then that portion would run and test but if its running on arm it would get skipped.
This is not what is happening right now.
If you are on anything but armv7 (eg: arm64), the test will run, and will fail if emulation is not installed (which is the default).
The test should first verify that we support building on something else than the current platform, then build for that (and we should remove the hardcoded arm check).
Probably this method should go. It does not really serve a purpose, since what we are checking here is that the build is successful (exitcode 0 should be sufficient)
-thats not entirely correct, we are checking if the build was successful and export of the image is not a tarball for cases where we are not doing a cross platform build.
yeah agreed removing hardcoded stuff, not sure about a good way to test it out, let me check.
Probably this method should go. It does not really serve a purpose, since what we are checking here is that the build is successful (exitcode 0 should be sufficient)
-thats not entirely correct, we are checking if the build was successful and export of the image is not a tarball for cases where we are not doing a cross platform build.
Besides the fact that currently it is testing stdout instead of stderr - I don't think the above is accurate:
Checked it again, i think we can remove the test creating a pr. Technically the unit test for this cover the different cases for the function itself.
But here is what my test outputs are, so if the platform matches or i dont give platform the tarball is not created, just curious whats your setup to be able to reproduce it, in the grand scheme of things i had thought this behaviour would be consistent in any system
But here is what my test outputs are, so if the platform matches or i dont give platform the tarball is not created, just curious whats your setup to be able to reproduce it, in the grand scheme of things i had thought this behaviour would be consistent in any system
I am on lima on an M2 - containerd v2.0.0-rc.3 - nerdctl main.
Not sure what the (other) differences could be here?
Checked it again, i think we can remove the test creating a pr.
That, or we clarify what the intention of the test was.
It is fine if we want to keep a test for cross-building, but we just have to make sure:
we skip the test if the host does not have support for cross building
checked with containerd v2.0.0-rc.4-56-ga44804738 -nerdctl main, my results were same,
The intention is simple:
Check that tarballs are not created if we dont do cross arch builds, this saves time.
i can a check if the host checks cross builds but not sure it is adding much value to the unit test as we already make sure the build is successful in other tests.
Activity
apostasie commentedon Sep 21, 2024
I will assume this was meant to test building for a "different from the host but currently emulated platform", and rewrite the test accordingly, including verification that we are able to emulate.
Shubhranshu153 commentedon Sep 22, 2024
i can fix it, AssertErrNotContains -> from the name i always assumed it checks stderr, probably a simple redirection of everything to stdout would fix it.
the test checks if a cross build is happening then a tarball is created. so if the test are running on amd then that portion would run and test but if its running on arm it would get skipped.
apostasie commentedon Sep 22, 2024
Probably this method should go. It does not really serve a purpose, since what we are checking here is that the build is successful (exitcode 0 should be sufficient).
This is not what is happening right now.
If you are on anything but armv7 (eg: arm64), the test will run, and will fail if emulation is not installed (which is the default).
The test should first verify that we support building on something else than the current platform, then build for that (and we should remove the hardcoded
armcheck).Shubhranshu153 commentedon Sep 22, 2024
-thats not entirely correct, we are checking if the build was successful and export of the image is not a tarball for cases where we are not doing a cross platform build.
yeah agreed removing hardcoded stuff, not sure about a good way to test it out, let me check.
apostasie commentedon Sep 22, 2024
Besides the fact that currently it is testing stdout instead of stderr - I don't think the above is accurate:
Either way, no point in rehashing this - appreciate if you can fix it :-)
Thanks @Shubhranshu153
Shubhranshu153 commentedon Sep 22, 2024
i see thanks, will update it to test it accurately.
Shubhranshu153 commentedon Sep 23, 2024
Checked it again, i think we can remove the test creating a pr. Technically the unit test for this cover the different cases for the function itself.
But here is what my test outputs are, so if the platform matches or i dont give platform the tarball is not created, just curious whats your setup to be able to reproduce it, in the grand scheme of things i had thought this behaviour would be consistent in any system
apostasie commentedon Sep 23, 2024
I am on lima on an M2 - containerd v2.0.0-rc.3 - nerdctl main.
Not sure what the (other) differences could be here?
That, or we clarify what the intention of the test was.
It is fine if we want to keep a test for cross-building, but we just have to make sure:
Shubhranshu153 commentedon Sep 24, 2024
checked with containerd v2.0.0-rc.4-56-ga44804738 -nerdctl main, my results were same,
The intention is simple:
Shubhranshu153 commentedon Sep 24, 2024
this is the pr: #3456
apostasie commentedon Oct 6, 2024
PR removed this test, so, closing.