summaryrefslogtreecommitdiff
path: root/src/test/test-copy.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2015-06-23 17:34:24 +0200
committerKay Sievers <kay@vrfy.org>2015-06-23 17:34:24 +0200
commit3f9340a685ad51d1f7266e22e6f2720b54ae7e9d (patch)
treeef9aca2ec44ae58ee73321112fd79df509f882c5 /src/test/test-copy.c
parent63ea609849a0eabf77e6bac6cdc14d4875bde8e5 (diff)
parent4f36d4004c407c16508001a20450c5f14f7d4d31 (diff)
Merge pull request #338 from xnox/fix-copy-bytes
test: fix test-copy without /etc/os-release.
Diffstat (limited to 'src/test/test-copy.c')
-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);