1Open modes are ignored if the user doesn't want the file to be created:
2http://man7.org/linux/man-pages/man2/open.2.html
3
4We're going to start emitting compile-time warnings about this soon.
5Since this project has -Werror enabled (thank you!), we need to either
6make the mode useful or remove the mode bits.
7
8diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c
9index 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