From: Mike Gilbert Date: Wed, 5 Jul 2017 03:22:47 +0000 (-0400) Subject: test-fs-util: re-order test_readlink_and_make_absolute and test_get_files_in_director... X-Git-Tag: chiark/234.4-1+devuan1.1+iwj1~79 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9c9c41e866f0e209cb0cf0f88d6a43de8036bc0d test-fs-util: re-order test_readlink_and_make_absolute and test_get_files_in_directory (#6288) test_readlink_and_make_absolute switches to a temp directory, and then removes it. test_get_files_in_directory calls opendir(".") from a directory that has been removed from the filesystem. This call sequence triggers a bug in Gentoo's sandbox library. This library attempts to resolve the "." to an absolute path, and aborts when it ultimately fails to do so. Re-ordering the calls works around the issue until the sandbox library can be fixed to more gracefully deal with this. Bug: https://bugs.gentoo.org/590084 --- diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index 0125b389c..6620592e4 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -319,8 +319,8 @@ static void test_dot_or_dot_dot(void) { int main(int argc, char *argv[]) { test_unlink_noerrno(); - test_readlink_and_make_absolute(); test_get_files_in_directory(); + test_readlink_and_make_absolute(); #if 0 /// UNNEEDED by elogind test_var_tmp(); #endif // 0