Races in gio/tests/portal-support-snap* tests
The tests in gio/tests/portal-support-snap-classic.c and gio/tests/portal-support-snap.c have races over file creation/removal. In Yocto Project automated testing we see these tests behaving erratically, sometimes passing, sometimes failing. The issue looks to be that the desktop runner executes the tests in a random order, sometimes that works, sometimes it does not.
The issue appears to be that some tests create files in setup->snap_path, some in setup->bin_path and some in both. Other tests require those files not to be present. Once created the files are not removed, only overwritten. There is no guarantee the tests requiring the files to be missing would run first.
I've attached a patch we've been testing with a for a few days, mainly to confirm this is the issue. The patch copies the rm_rf code from elsewhere in glib and uses it to remove the files/directories at the end of each of the tests that create files. The issue has not occurred since we did this. There are probably other ways these tests could be improved instead, I'm not sure what the preference will be.