1 Open modes are ignored if the user doesn't want the file to be created: 2 http://man7.org/linux/man-pages/man2/open.2.html 3 4 We're going to start emitting compile-time warnings about this soon. 5 Since this project has -Werror enabled (thank you!), we need to either 6 make the mode useful or remove the mode bits. 7 8 diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c 9 index a5a4da856dfe..ef7927e5940f 100644 10 --- a/tools/testing/selftests/kcmp/kcmp_test.c 11 +++ b/tools/testing/selftests/kcmp/kcmp_test.c 12 @@ -49,7 +49,7 @@ int main(int argc, char **argv) 13 int pid2 = getpid(); 14 int ret; 15 16 - fd2 = open(kpath, O_RDWR, 0644); 17 + fd2 = open(kpath, O_RDWR); 18 if (fd2 < 0) { 19 perror("Can't open file"); 20 ksft_exit_fail(); 21