Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/kcmp: remove unused open mode

Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE
aren't specified. The permissions for the file are set above:

fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);

Link: https://lkml.kernel.org/r/20240429234610.191144-1-edliaw@google.com
Fixes: d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")
Signed-off-by: Edward Liaw <edliaw@google.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Edward Liaw and committed by
Andrew Morton
eb59a581 a7ac59f4

+1 -1
+1 -1
tools/testing/selftests/kcmp/kcmp_test.c
··· 91 91 ksft_print_header(); 92 92 ksft_set_plan(3); 93 93 94 - fd2 = open(kpath, O_RDWR, 0644); 94 + fd2 = open(kpath, O_RDWR); 95 95 if (fd2 < 0) { 96 96 perror("Can't open file"); 97 97 ksft_exit_fail();