From: kernel test robot <lkp@intel.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: <oe-kbuild-all@lists.linux.dev>,
Linux Memory Management List <linux-mm@kvack.org>,
Christian Brauner <brauner@kernel.org>
Subject: [linux-next:master 7931/8719] statmount_test_ns.c:27:17: warning: format not a string literal and no format arguments
Date: Thu, 27 Jun 2024 22:04:12 +0800 [thread overview]
Message-ID: <Zn1xXGAHRqXHFN0J@rli9-mobl> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: df9574a57d02b265322e77fb8628d4d33641dda9
commit: f0f1033dd078339a6588b571fe1243e2a2c5e519 [7931/8719] selftests: add a test for the foreign mnt ns extensions
:::::: branch date: 16 hours ago
:::::: commit date: 2 days ago
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406271913.5Vxny2Tc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202406271913.5Vxny2Tc-lkp@intel.com/
All warnings (new ones prefixed by >>):
statmount_test_ns.c: In function 'handle_result':
>> statmount_test_ns.c:27:17: warning: format not a string literal and no format arguments [-Wformat-security]
27 | ksft_test_result_pass(testname);
| ^~~~~~~~~~~~~~~~~~~~~
statmount_test_ns.c:29:17: warning: format not a string literal and no format arguments [-Wformat-security]
29 | ksft_test_result_fail(testname);
| ^~~~~~~~~~~~~~~~~~~~~
statmount_test_ns.c:31:17: warning: format not a string literal and no format arguments [-Wformat-security]
31 | ksft_exit_fail_msg(testname);
| ^~~~~~~~~~~~~~~~~~
statmount_test_ns.c:33:17: warning: format not a string literal and no format arguments [-Wformat-security]
33 | ksft_test_result_skip(testname);
| ^~~~~~~~~~~~~~~~~~~~~
statmount_test_ns.c: In function 'test_listmount_ns':
>> statmount_test_ns.c:322:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
322 | write(child_ready_pipe[1], &nr_mounts, sizeof(nr_mounts));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> statmount_test_ns.c:323:17: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
323 | read(parent_ready_pipe[0], &cval, sizeof(cval));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
statmount_test_ns.c:331:9: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
331 | read(child_ready_pipe[0], &nr_mounts, sizeof(nr_mounts));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
statmount_test_ns.c:335:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
335 | write(parent_ready_pipe[1], &pval, sizeof(pval));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +27 tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
f0f1033dd07833 Josef Bacik 2024-06-24 23
f0f1033dd07833 Josef Bacik 2024-06-24 24 static void handle_result(int ret, const char *testname)
f0f1033dd07833 Josef Bacik 2024-06-24 25 {
f0f1033dd07833 Josef Bacik 2024-06-24 26 if (ret == NSID_PASS)
f0f1033dd07833 Josef Bacik 2024-06-24 @27 ksft_test_result_pass(testname);
f0f1033dd07833 Josef Bacik 2024-06-24 28 else if (ret == NSID_FAIL)
f0f1033dd07833 Josef Bacik 2024-06-24 29 ksft_test_result_fail(testname);
f0f1033dd07833 Josef Bacik 2024-06-24 30 else if (ret == NSID_ERROR)
f0f1033dd07833 Josef Bacik 2024-06-24 31 ksft_exit_fail_msg(testname);
f0f1033dd07833 Josef Bacik 2024-06-24 32 else
f0f1033dd07833 Josef Bacik 2024-06-24 33 ksft_test_result_skip(testname);
f0f1033dd07833 Josef Bacik 2024-06-24 34 }
f0f1033dd07833 Josef Bacik 2024-06-24 35
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-27 14:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zn1xXGAHRqXHFN0J@rli9-mobl \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox