mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-19 08:42:09 +01:00
tests: Fix skipping mkdir-with-parents-permission test
If the user has `CAP_DAC_OVERRIDE` or similar (for example, if running the tests as root), the `mkdir-with-parents-permission` test is skipped. The check for `CAP_DAC_OVERRIDE` was by creating a subdirectory of the test directory. That subdirectory, however, was never removed, which caused a ‘directory not empty’ error when trying to delete the test directory. Fix that by correctly deleting the subdirectory if skipping the test. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
0698d561f3
commit
62eb3bc3b6
@ -548,6 +548,7 @@ test_mkdir_with_parents_permission (void)
|
|||||||
if (g_mkdir (subdir2, 0700) == 0)
|
if (g_mkdir (subdir2, 0700) == 0)
|
||||||
{
|
{
|
||||||
g_test_skip ("have CAP_DAC_OVERRIDE or equivalent, cannot test");
|
g_test_skip ("have CAP_DAC_OVERRIDE or equivalent, cannot test");
|
||||||
|
g_remove (subdir2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user