]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: fix test-copy without /etc/os-release. 338/head
authorDimitri John Ledkov <dimitri.j.ledkov@intel.com>
Tue, 23 Jun 2015 15:22:40 +0000 (16:22 +0100)
committerDimitri John Ledkov <dimitri.j.ledkov@intel.com>
Tue, 23 Jun 2015 15:22:40 +0000 (16:22 +0100)
src/test/test-copy.c

index e55ffaa16a5cfd5b77e8eeeff2aae71dfc977496..b1385b8b8776997cb3fca2bd53fcdaa6b98e4419 100644 (file)
@@ -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);