summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.j.ledkov@intel.com>2015-06-23 16:22:40 +0100
committerDimitri John Ledkov <dimitri.j.ledkov@intel.com>2015-06-23 16:22:40 +0100
commit4f36d4004c407c16508001a20450c5f14f7d4d31 (patch)
treeef9aca2ec44ae58ee73321112fd79df509f882c5 /src/test
parent63ea609849a0eabf77e6bac6cdc14d4875bde8e5 (diff)
test: fix test-copy without /etc/os-release.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-copy.c4
1 files changed, 3 insertions, 1 deletions
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);