aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-05-28 17:50:29 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-05-28 17:50:29 +0000
commit71784da9b195664c5a3e443c3b8d8d5bec72c4c9 (patch)
treed2fce696a6824a759c0acdb583738e5acddc8ad0 /tests
parent03222757517395fd7174b8db4e0b5304361eea0f (diff)
downloadsrc-71784da9b195664c5a3e443c3b8d8d5bec72c4c9.tar.gz
src-71784da9b195664c5a3e443c3b8d8d5bec72c4c9.zip
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
Notes
Notes: svn path=/head/; revision=319078
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/file/ftruncate_test.c4
1 files changed, 2 insertions, 2 deletions
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;