From 4f36d4004c407c16508001a20450c5f14f7d4d31 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 23 Jun 2015 16:22:40 +0100 Subject: [PATCH] test: fix test-copy without /etc/os-release. --- src/test/test-copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/test-copy.c b/src/test/test-copy.c index e55ffaa16a..b1385b8b87 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);