On Sat, Nov 26, 2016 at 02:30:59AM +0100, Christian Seiler wrote: > > 2) Is there a common pattern for handling upstream tests that break this > > rule? Maybe there's an alternative to disabling them? > > If upstream tests do that, I would suggest sending a patch > upstream that fixes them, because especially for tests I > would consider this a bug. > > That said, if tests just require stuff in the home directory > you could set the HOME environment variable to a temporary > directory within the build tree before you run the tests, to > work around this kind of problem. Nevertheless I would consider > those tests buggy and would want to patch them. > > If you could give a couple of examples of what exactly you're > thinking of, maybe my answer could be more specific.
A library service creates local sockets. The library provides a fallback mechanism for the socket location - first try $XDG_RUNTIME_DIR, second try $HOME, finally use $TMPDIR. Most of the tests unset the first two and go straight to TMPDIR. But to test the fallback mechanism itself, two tests do not. As a workaround, I disabled these. But it was suggested to instead set HOME=/tmp, XDG_RUNTIME_DIR=/tmp. Seems clever, but I wasn't sure if this was permitted. The two tests in question are here: https://github.com/rvandegrift/efl/blob/debian/sid/src/tests/ecore_con/ecore_con_test_ecore_con.c#L325 Thanks very much for your explanation - exactly the kind of info I was looking for! Ross