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
t_run_record_null test fails under Gentoo's sandbox #182
Comments
Thanks for the report! I don't have Gentoo in CI, but would be happy to add it. Do you have some steps how to do a Gentoo build in a container? https://hub.docker.com/search?q=gentoo is a bit non-obvious (and there are zero official or trusted publisher images). |
Can you try to apply commit 1541a35 ? That should also help with investigating this failure. |
Thanks. With that commit applied I see basically the same thing:
I'll ask around about Docker images and get back to you. |
Interesting, that means that the |
Dunno. Seems to work when I run it manually:
|
Docker files are available here: https://gitweb.gentoo.org/proj/docker-images.git They are the ones used to produce the Docker images here: https://hub.docker.com/u/gentoo/ |
Right, I found these already, I just didn't know what "stage3" or "portage" or "nomultilib" etc. are. I found https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/umockdev , but it seems there's a new .ebuild for every release; curling/parsing/sorting that feels clumsy, so I figure there's some higher level tooling around all that? Thanks! |
Sorry for the delayed response. Yes, there are higher level tools like I don't have a lot of experience with Docker but I'd suggest something like $ ACCEPT_KEYWORDS="~*" emerge dev-util/umockdev --with-test-deps --onlydeps which will install all necessary dependencies for the latest packaged version of umockdev. From there, you can do a normal build of umockdev and run tests from the git repo. |
Hmm, seems this needs some initialization?
I found https://wiki.gentoo.org/wiki/Portage_Multi_Stage_Dockerfile which gives some necessary initialization for /etc/portage/make.profile/make.defaults . But then
|
Ah, crap. Sorry. My inexperience with our Docker containers is showing. Looks like we need an Let me see if I can rope someone more knowledgeable than me in to help. Thanks for your patience, your help, and your awesome software! |
https://github.com/gentoo/gentoo-docker-images#using-the-portage-container-as-a-data-volume might be more helpful than listening to me :) |
That README is unfortunately out of date, though it's close. I was able to get a working Gentoo environment with these two one-liners:
|
Ah, thanks! So all that missing repo config comes from a second container image. At least with podman, a mere "create" is not enough, the container actually needs to run so that it copies its data into the volume. I didn't test this with docker (it doesn't work any more on Fedora). I also tidied this up a bit, to not leave the temporary portagesnapshot container around, and name the volume so that it can be cleaned up easily:
Inside that I can run
Oh my, that does take a while.. All other umockdev tests take seconds up to ~ 3 minutes, here building the build deps alone takes more than 5 mins on my 8-core laptop (so probably more like 20 mins on the dual-core GitHub workflow workers). After that, /source$ VALAC=valac-0.56 meson /tmp/b
meson test -C /tmp/b works fine:
So I suppose this is not the same as running this "sandbox". Is there some way to run the ebuild of your official portage against a git tree, instead of the hardcoded release version?
|
I'll check what all it needs to install and see if I can find some way of speeding this part up.
Right. I've reproduced the failure outside of emerge by first running the tests under emerge (see below) and then running the failing command under sandbox:
Yes. I'll add an ebuild that builds umockdev from git for this purpose.
Yes. I'll fire up podman and see if I can give some better advice after trying it out myself. |
To make upstream testing easier. See martinpitt/umockdev#182 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Many thanks @mattst88! With these instructions I was able to reproduce the bug, still with the hardcoded I created an integration test, and the log shows the expected error on GitHub as well. It takes about 7 minutes, which is acceptable. Next I'll try your umockdev-9999 ebuild, that's useful as well! |
How would I do that, actually? I googled a bit, found https://wiki.gentoo.org/wiki/Ebuild#Live_ebuilds , and tried various syntaxes:
The latter two at least seem syntactically correct, but still fail with
But anyway, that's a minor detail -- I'm happy to use that later on. I'll look at fixing the actual test now.
Thus somehow It's also not special about |
Running stat or any other program crashes in Gentoo's sandbox when running umockdev-run. Skip this new test for the time being, to avoid a package build failure. Fixes #182
I poked this for a while longer, and can't make sense of it. I'll skip that test under sandbox for the time being. |
Thanks a bunch! I don't blame you at all for punting on this. I couldn't make heads or tails of it either. |
Bisected to b8ccdf8 which adds the test.
I believe sandbox is preventing access to something like
/tmp/umockdev.HBCSL1/dev/null
? I haven't been able to identify precisely what access is causing the failure.The text was updated successfully, but these errors were encountered: