From: Dimitri John Ledkov Date: Tue, 23 Jun 2015 15:22:40 +0000 (+0100) Subject: test: fix test-copy without /etc/os-release. X-Git-Tag: v222~84^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f36d4004c407c16508001a20450c5f14f7d4d31;p=thirdparty%2Fsystemd.git test: fix test-copy without /etc/os-release. --- diff --git a/src/test/test-copy.c b/src/test/test-copy.c index e55ffaa16a5..b1385b8b877 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -139,7 +139,9 @@ static void test_copy_bytes(void) { int r, r2; char buf[1024], buf2[1024]; - infd = open("/etc/os-release", O_RDONLY|O_CLOEXEC); + infd = open("/usr/lib/os-release", O_RDONLY|O_CLOEXEC); + if (infd < 0) + infd = open("/etc/os-release", O_RDONLY|O_CLOEXEC); assert_se(infd >= 0); assert_se(pipe2(pipefd, O_CLOEXEC) == 0);