From 71784da9b195664c5a3e443c3b8d8d5bec72c4c9 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 28 May 2017 17:50:29 +0000 Subject: Tweak r319058 slightly - Specify an explicit mode when using O_CREAT per open(2). - Fix the error message (add missing enclosing parentheses). Submitted by: jilles MFC after: 3 days MFC with: r319058 Sponsored by: Dell EMC Isilon --- tests/sys/file/ftruncate_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/sys/file/ftruncate_test.c') diff --git a/tests/sys/file/ftruncate_test.c b/tests/sys/file/ftruncate_test.c index e3fd8bd20cd9..18bdb5a02884 100644 --- a/tests/sys/file/ftruncate_test.c +++ b/tests/sys/file/ftruncate_test.c @@ -75,9 +75,9 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - fd = open(path, O_RDWR|O_CREAT); + fd = open(path, O_RDWR|O_CREAT, 0600); if (fd < 0) - err(1, "open(%s, O_RDWR|O_CREAT", path); + err(1, "open(%s, O_RDWR|O_CREAT, 0600)", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; -- cgit v1.2.3