From: Colin Ian King Date: Tue, 28 Apr 2015 13:39:02 +0000 (+0100) Subject: LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT X-Git-Tag: 2.7.54~9 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=96f566ea1c6fccac9d427f7dc8c25ed4c3893299 LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT When building with gcc 4.9.2, we hit the following build error: In function ‘open’, inlined from ‘sendfile_copy’ at sendfile_grouplock.c:229:9: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments __open_missing_mode (); ..fix this with a mode of 0644 Change-Id: Ia06392228c960584e4a8262fac775078152d78d8 Signed-off-by: Colin Ian King Reviewed-on: http://review.whamcloud.com/14631 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sendfile_grouplock.c b/lustre/tests/sendfile_grouplock.c index 42d66a3..80b2da5 100644 --- a/lustre/tests/sendfile_grouplock.c +++ b/lustre/tests/sendfile_grouplock.c @@ -226,7 +226,7 @@ static int sendfile_copy(const char *source, int source_gid, source_gid, source, strerror(-rc)); } - fd_out = open(dest, O_WRONLY | O_TRUNC | O_CREAT); + fd_out = open(dest, O_WRONLY | O_TRUNC | O_CREAT, 0644); ASSERTF(fd_out >= 0, "creation failed for '%s': %s", dest, strerror(errno));