From e75167b426e722ebd11623ae50891d321d245b59 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Mon, 31 Jul 2017 13:55:52 -0700 Subject: [PATCH 03/20] kcmp_test: Remove useless open mode Open modes are ignored if the user doesn't want the file to be created: http://man7.org/linux/man-pages/man2/open.2.html Since it's somewhat misleading/potentially indicative of a missing O_CREAT/O_TMPFILE, we plan to issue a warning on open calls with useless mode bits in the near future. Because -Werror is used in this project (thank you!), we need to either make the mode useful, or remove it. (cherry picked from commit 0bba2e896d09c7ef7b49a409ba5cd869531befa9) Bug: 64132680 Test: mma. New warning no longer appears. --- tools/testing/selftests/kcmp/kcmp_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kcmp/kcmp_test.c b/tools/testing/selftests/kcmp/kcmp_test.c index 25110c7c0b3e..d7a8e321bb16 100644 --- a/tools/testing/selftests/kcmp/kcmp_test.c +++ b/tools/testing/selftests/kcmp/kcmp_test.c @@ -91,7 +91,7 @@ int main(int argc, char **argv) ksft_print_header(); ksft_set_plan(3); - fd2 = open(kpath, O_RDWR, 0644); + fd2 = open(kpath, O_RDWR); if (fd2 < 0) { perror("Can't open file"); ksft_exit_fail(); -- 2.42.0.609.gbb76f46606-goog