From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13044CDB482 for ; Fri, 13 Oct 2023 21:03:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8AFCA8D016E; Fri, 13 Oct 2023 17:03:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8617C8D0015; Fri, 13 Oct 2023 17:03:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72C5D8D016E; Fri, 13 Oct 2023 17:03:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 63AA98D0015 for ; Fri, 13 Oct 2023 17:03:27 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 41837120389 for ; Fri, 13 Oct 2023 21:03:27 +0000 (UTC) X-FDA: 81341664054.10.C55F9CE Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf20.hostedemail.com (Postfix) with ESMTP id 6A9A91C0023 for ; Fri, 13 Oct 2023 21:03:25 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OleojuGZ; spf=pass (imf20.hostedemail.com: domain of shuah@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=shuah@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697231005; a=rsa-sha256; cv=none; b=VWwBSeO+HPVDHqLsiJ7AvKUD223GQjMT9sfbPvz4Kj6G6fKazYL8oY3Tb48qT+T7tqgeZ0 wJL6DXhpQV5d2uzAaXozepELuAhYqUE+kAkrXNsfnLIrDNTe46JfDScW4bEA2DGskg8bnk vkUp89aYWfHi0qsoFAz+ZFsEtwqqTSs= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OleojuGZ; spf=pass (imf20.hostedemail.com: domain of shuah@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=shuah@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697231005; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vjk893OUrBFf4VXtLf6+7Sckt+6ZcMN5cjSwuo+6ePI=; b=X2Rbz2zhpWn4Ta2pEcP3uFjvvyelPYlWvo8DydPtQhJinDUJsQL2zNsHw4ueGhD7lZlaki XnJYWTDUQuwT+HAZuRJVtmAX16AkE74rhkvA/0pu55q5LQdnfWEf7HSa5mwiHSGD8PK6Ek aLiYILQUi00ZBtRWo9tQVJ5D/GiL8mI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 7C80BB82C12; Fri, 13 Oct 2023 21:03:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C614C433C9; Fri, 13 Oct 2023 21:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697231002; bh=Plf/zX3o6rIrvL3UB/Tp2mhFXD/6OyB/+JAGi9E0v/c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OleojuGZ5LGLye6eZ0op0LEpWHQS69DAz/iOIFDBqKztG2EX1a2XXahca+MTQS+GU 1N7Sh85xf5dHzuX5QjRJ1OEks4uvkYPHf9EkU8iv6+FqqNWkLEHEw7my2gGZ4+Vj+i msTPnov7b9jpTJD0I9ADQisauHtxpUEvqakMaTMxP6LfR1umthhH4UXNAQXaz7MSBl kviUv4vvTPCN428G7CTFqZ7E6wk3NBiy9ultxWF82ZmfSld43Tey5sl/L8+vML32t4 Bp/YlplKFAxVav5HNp4RJqDPd7BvrfbejFitwzpcUQokqOjub9oNgX/ZtTGFSLQw6N 8au63rlRqKSAw== Message-ID: <0efe3ba3-b62f-4447-a195-2447e1152a22@kernel.org> Date: Fri, 13 Oct 2023 15:03:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/8] Add printf attribute to kselftest functions Content-Language: en-US To: Maciej Wieczor-Retman , 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 References: From: Shuah In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6A9A91C0023 X-Stat-Signature: xux5s3ififpdo87sf1wex1zbpkj85jc6 X-Rspam-User: X-HE-Tag: 1697231005-783979 X-HE-Meta: U2FsdGVkX182wcbOr55U5wS9PcK6ibDPnRnkEiHW+672n6MKX/T0olBo2OmYZRrFl8sHII3Q1LjjgCIAIApcB8FZz5GxuHS8UGnudv2sp93L0WTu8yoE812SaWXoRuPauiiIp0/K6TycQSdOCzFJ+OKGqa6TBTTShFSzGVfPW3nfmN6tt3aFD+pL1gZV5dQt8tj39QE6efuBJshDszX0qJv7Bp54I8VkEucTrmgfCa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ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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