From: Shuah <shuah@kernel.org>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
akpm@linux-foundation.org, christian@kellner.me,
fenghua.yu@intel.com, keescook@chromium.org,
ndesaulniers@google.com, coltonlewis@google.com,
dmatlack@google.com, vipinsh@google.com, seanjc@google.com,
brauner@kernel.org, pbonzini@redhat.com, hannes@cmpxchg.org,
nphamcs@gmail.com, reinette.chatre@intel.com
Cc: ilpo.jarvinen@linux.intel.com, linux-kselftest@vger.kernel.org,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v6 0/8] Add printf attribute to kselftest functions
Date: Fri, 13 Oct 2023 15:03:11 -0600 [thread overview]
Message-ID: <0efe3ba3-b62f-4447-a195-2447e1152a22@kernel.org> (raw)
In-Reply-To: <cover.1697196663.git.maciej.wieczor-retman@intel.com>
On 10/13/23 05:36, Maciej Wieczor-Retman wrote:
> kselftest.h declares many variadic functions that can print some
> formatted message while also executing selftest logic. These
> declarations don't have any compiler mechanism to verify if passed
> arguments are valid in comparison with format specifiers used in
> printf() calls.
>
> Attribute addition can make debugging easier, the code more consistent
> and prevent mismatched or missing variables.
>
> The first patch adds __printf() macro and applies it to all functions
> in kselftest.h that use printf format specifiers. After compiling all
> selftests using:
> make -C tools/testing/selftests
> many instances of format specifier mismatching are exposed in the form
> of -Wformat warnings.
>
> Fix the mismatched format specifiers caught by __printf() attribute in
> multiple tests.
>
> Series is based on kselftests next branch.
>
> Changelog v6:
> - Add methodology notes to all patches.
> - No functional changes in the patches.
>
Applied this series and the following three - all 25 patches are
in linux-kselftest next for Linux 6.7-rc1.
[1] https://lore.kernel.org/all/cover.1696932728.git.maciej.wieczor-retman@intel.com/
[2] https://lore.kernel.org/all/20231002094813.6633-1-ilpo.jarvinen@linux.intel.com/
[3] https://lore.kernel.org/all/20230904095339.11321-1-ilpo.jarvinen@linux.intel.com/
thanks,
-- Shuah
next prev parent reply other threads:[~2023-10-13 21:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 11:36 [PATCH v6 0/8] Add printf attribute to kselftest functions Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 1/8] selftests: Add printf attribute to kselftest prints Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 2/8] selftests/cachestat: Fix print_cachestat format Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 3/8] selftests/openat2: Fix wrong format specifier Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 4/8] selftests/pidfd: Fix ksft print formats Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 5/8] selftests/sigaltstack: Fix wrong format specifier Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 6/8] selftests/kvm: Replace attribute with macro Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 7/8] selftests/mm: Substitute attribute with a macro Maciej Wieczor-Retman
2023-10-13 11:36 ` [PATCH v6 8/8] selftests/resctrl: Fix wrong format specifier Maciej Wieczor-Retman
2023-10-13 21:03 ` Shuah [this message]
2023-10-13 21:08 ` [PATCH v6 0/8] Add printf attribute to kselftest functions Reinette Chatre
2023-10-16 5:28 ` Maciej Wieczór-Retman
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=0efe3ba3-b62f-4447-a195-2447e1152a22@kernel.org \
--to=shuah@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=christian@kellner.me \
--cc=coltonlewis@google.com \
--cc=dmatlack@google.com \
--cc=fenghua.yu@intel.com \
--cc=hannes@cmpxchg.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=keescook@chromium.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=ndesaulniers@google.com \
--cc=nphamcs@gmail.com \
--cc=pbonzini@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=seanjc@google.com \
--cc=skhan@linuxfoundation.org \
--cc=vipinsh@google.com \
/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