Skip to content
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

tests: colord-daemon/client{import} sometimes fails #94

Open
RAOF opened this issue Aug 16, 2019 · 7 comments
Open

tests: colord-daemon/client{import} sometimes fails #94

RAOF opened this issue Aug 16, 2019 · 7 comments

Comments

@RAOF
Copy link
Collaborator

RAOF commented Aug 16, 2019

I'm in the process of trying to get the installed tests running in the Ubuntu & Debian test infrastructure, and I can't seem to get the environment set up correctly for this test.

As far as I can tell, it calls cd_import_profile which ends up copying the profile into the user's ICC directory and then waiting for the daemon to pick Up the new profile. However, when running in the test infrastructure the daemon doesn't pick up the new file (nor can I see what code is actually watching the user directories - the daemon only seems to be monitoring system-wide locations)

What am I (or colord) missing here?

@hughsie
Copy link
Owner

hughsie commented Aug 18, 2019

colord needs something running in the session to import the profile, either gnome-settings-daemon or xiccd should do the trick. I'd be open to a patch that disables this test if there's no gnome-settings-daemon in the process list, if that helps.

@RAOF
Copy link
Collaborator Author

RAOF commented Aug 19, 2019

Skipping the test if the session component isn't there sounds reasonable, and I might look into doing that, but this also seems like exactly the sort of full-system-integration test that would be most valuable to do.

Sadly, doing the obvious thing doesn't work - I've got the tests running under xvfb with a DBus session bus and a running instance of gsd-color --verbose, but they almost always fail with

(gsd-color:8442): libcolord-DEBUG: 05:20:21.808: Incorrect content type for /home/ubuntu/.local/share/icc/ibm-t61.icc, got text/plain

which is rather frustrating, because they sometimes pass (and file, gio info and the like all identify that file as a colour profile). There would appear to be a race somewhere that's only exposed in this rather artificial environment.

@hughsie
Copy link
Owner

hughsie commented Aug 19, 2019

If gio info says the right content type that's tricky. Could it be done kind of mime cache that needs invalidating?

@RAOF
Copy link
Collaborator Author

RAOF commented Aug 19, 2019

Hm, maybe? I'll try running a more standard GNOME session and see if the problem remains.

@RAOF RAOF changed the title colord-daemon/client{import} fails in Debian autopkgtest infrastructure tests: colord-daemon/client{import} sometimes fails Aug 20, 2019
@RAOF
Copy link
Collaborator Author

RAOF commented Aug 20, 2019

Hah! Excellent! This appears to have caught a real bug. Running a more standard GNOME session in the test environment makes the test mostly pass, but it still sometimes fails.

Just running gnome-desktop-testing-runnercolord/colord-daemon.test in a loop in my regular desktop session passes a lot, but eventually fails with

libcolord:ERROR:../lib/colord/cd-test-daemon.c:1516:colord_client_import_func: assertion failed (error == NULL): The profile was not added in time (cd_client_error, 0)

I guess this might actually be a gsd-color bug? I'll try and check that it prints the same debug output in a real session.

@RAOF
Copy link
Collaborator Author

RAOF commented Aug 20, 2019

Of course, passing --verbose to gsd-color causes the bug to go away in my session. Bah.

@DanMan
Copy link

DanMan commented Dec 11, 2020

I've just run into this problem on Fedora 33 (colord v1.4.5) again. Trying to import the profile with colormgr import-profile my_profile.icc results in "The profile was not added in time".

Appears to be a long-standing bug: https://bugs.freedesktop.org/show_bug.cgi?id=82770 and https://bugzilla.redhat.com/show_bug.cgi?id=1372046

The file is copied to ~/.local/share/icc/ but it's not applied and it doesn't show up in gnome-settings color settings.

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

No branches or pull requests

3 participants