GNOME Bugzilla – Bug 724412
GLib mappedfile.c test uses g_get_user_runtime_dir instead of a temporary directory
Last modified: 2017-11-21 12:01:20 UTC
Looking at https://git.gnome.org/browse/glib/tree/glib/tests/mappedfile.c#n87 it creates temporary files into the user runtime directory (usually $HOME/.cache). This breaks in case .cache does not exist. Why not using the temporary directory instead instead of polluting and never cleaning up the user .cache?
The runtime directory is not usually ~/.cache/ -- that's only the fallback for if XDG_RUNTIME_DIR has not been properly set. That said, I sort of agree -- creating these sorts of temp files, even in XDG_RUNTIME_DIR, is a bit weird.
Created attachment 269322 [details] [review] mappedfile test: use temp dir instead of user runtime dir
There are more of these, will update the patch.
Some tests use dbus, and apparently dbus creates a .dbus-keyring in $HOME which defeats the purpose of the patch.
Review of attachment 269322 [details] [review]: Looks good to me, thanks.
*** Bug 744273 has been marked as a duplicate of this bug. ***