Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1217007rdg; Fri, 13 Oct 2023 14:03:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnaYY4fo0h09uIwWXMcTfpqqJkJgsK7FGKJQL76T3I8cVyF6Eq2TnScwUfMyoGC7KvxJmN X-Received: by 2002:a05:6a20:918d:b0:15d:8366:65be with SMTP id v13-20020a056a20918d00b0015d836665bemr1669290pzd.9.1697231018008; Fri, 13 Oct 2023 14:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697231017; cv=none; d=google.com; s=arc-20160816; b=rNoDm5GRRZHciT3GC4zsAPZaJ4dkyu27jQOOX6FgY58JF9wL9HgfcZXSZP8TgZSQTY REKiExfyIo2LIYommG47Ykm1p7oUhNMvlEPkk483l9ZuGgDA/sKETaNhMG4gK8qGBVHV vulsmAXwMpcFjgbmYBxf6L3uwcTBGXyhxP8bQTOQ9zYYAqgiDvfqQP8scmXT6SrGxtAH 53M/ggTPX9z24y1fn8BXRgatCusWADAUKBxwk327PG9XjE0SxPyS/acwaSgTBf8E0IdE M29Aqc+iQFt9e7Sq7Fdy9XrG/ukiRh3Le1EJ5JlT6MzB2v9X+SUb8usLFdpRgSbOCRWl 8B3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Vjk893OUrBFf4VXtLf6+7Sckt+6ZcMN5cjSwuo+6ePI=; fh=aLZCe+UBfbRPbgYPQfgrs9JRWmb2P0lEbUcACn1s7yA=; b=ai/XifiAgMhNDRVcyir6Vn0NeTw1Cq+gCX3y/K3yx47b9VN90dSJ7fRFCqnfJGJ+TV l0BP/vcFxp3zc6qeax01Ij/BaMLcuZi617kXusT0nlvtEGKf6vUnugpwQErZZB/+Eh8/ aHq1rr3i6zw5nBEcH046L5JcMqiZdLaJF9A/iZt0FLODbibd/k9MvSsv9nEkMLvhLzpE D71mGsWKqe1UjfresBbijqw5OF2OaaKS1aLWOIxKyaqNIi9rm2DzK2DWZbVy/kP7JxmK qoo2nE4s0NTk97r0Y42NO2mzMBFzG1lnhAyW17T/ZkNBkktHWG7ZxPLwHhq5O1Xf9ER2 3+Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OleojuGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bq11-20020a056a02044b00b0059dc0902db3si2517111pgb.228.2023.10.13.14.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 14:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OleojuGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D530882C2D21; Fri, 13 Oct 2023 14:03:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232034AbjJMVD0 (ORCPT + 99 others); Fri, 13 Oct 2023 17:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbjJMVDZ (ORCPT ); Fri, 13 Oct 2023 17:03:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A8FBE; Fri, 13 Oct 2023 14:03:23 -0700 (PDT) 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-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 14:03:36 -0700 (PDT) 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