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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31779C43334 for ; Thu, 14 Jul 2022 23:46:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240714AbiGNXqO (ORCPT ); Thu, 14 Jul 2022 19:46:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbiGNXqL (ORCPT ); Thu, 14 Jul 2022 19:46:11 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75A076D9DC for ; Thu, 14 Jul 2022 16:46:08 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id oy13so6194816ejb.1 for ; Thu, 14 Jul 2022 16:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IyIlDk4W3kNLsc6EwzwzX2HL8L0b3ZfiT6dB513UuYM=; b=dACUMMrTnZ8StS9Wk8a47jEtPZIugOyWZ7Vcvfp0a+6cmjwB3tl+YjORYLAZSAhAwh 3YnJRiFzgbMmS9MCckIQQ0mZx8LClTRChtf2ag6hIrS4t2kZGEv8DvJvNa9R6g+adwNt 2mXDFXA039575hMyK0Edw1x7YJXtv9Z57pwp2PugxU9Z7r1LCkyTn6m6NKG4kHQWIqyc PUgZB1Ud8L74oImS9H5eMf6RDzMODarA0TP1P+g+W+IsQzQZJeF13bZeMfXcAizGYVTU FEToUDLfE/KGCVoEHLvKa1dYcBpLpTjUcyzsIA1sNTRyI4Q5sKYKY6BILfGOTseQPqfg N98A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IyIlDk4W3kNLsc6EwzwzX2HL8L0b3ZfiT6dB513UuYM=; b=DMmx9CtHqNuAtbIMLgtL8lS2t7TYXRteLOJ2A+DTu5mY5JxcCNXkKQLaKlastfUg1+ 3jO4LsNatJfBgFQnONtxApRtyVnC37eka0iUdGedHnz1iugkLzePj5e2ktXoqkAucsUn mDKECoHRIksitaw3AdcO0NyPVy5J5xoWKDW9di4OernDtCzq1k/cOUmvwDYdn621whII iGyYimonCAlkJKulOw9Er1A8nRdnOOR1tNBzLGPh65QqOHKPOMmdjbdnoXMY4+BPeJSV JkH1uocuIHTwmN/sSipMMUockKYU1vJqgO4EsO/rkY9nP3JrZynwhOPYA2hCRoBfRinr UkkA== X-Gm-Message-State: AJIora+jSOCEzbgmaNVoe34EP4ekf48RwL0cWQgYtg8ZVjPb7ozLEAT5 BpSHpq7kdt3wgl97Z1Yw9dM88WKpP0R4NmsmJoTyLw== X-Google-Smtp-Source: AGRyM1sUVfE+I1d5lIJ+y0Q9r3UAo6dg47JNpdIyqioxncfGeJ5K+AY+s4F6lYuDnZoGifhgb2jhirTnrsHYxkVdN18= X-Received: by 2002:a17:907:2856:b0:72b:54bd:40eb with SMTP id el22-20020a170907285600b0072b54bd40ebmr10726416ejc.542.1657842366888; Thu, 14 Jul 2022 16:46:06 -0700 (PDT) MIME-Version: 1.0 References: <20220518073232.526443-1-davidgow@google.com> <20220518073232.526443-2-davidgow@google.com> In-Reply-To: From: Daniel Latypov Date: Thu, 14 Jul 2022 16:45:55 -0700 Message-ID: Subject: Re: [PATCH 2/2] kcsan: test: Add a .kunitconfig to run KCSAN tests To: Marco Elver Cc: David Gow , Brendan Higgins , Shuah Khan , Dmitry Vyukov , KUnit Development , kasan-dev , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 2:41 PM Marco Elver wrote: > > On Thu, 14 Jul 2022 at 22:23, Daniel Latypov wrote: > > > > On Thu, May 19, 2022 at 6:24 AM Marco Elver wrote: > > > I'd keep it simple for now, and remove both lines i.e. make non-strict > > > the default. It's easy to just run with --kconfig_add > > > CONFIG_KCSAN_STRICT=y, along with other variations. I know that > > > rcutoruture uses KCSAN_STRICT=y by default, so it's already getting > > > coverage there. ;-) > > > > David decided to drop the parent patch (the new QEMU config) now > > --qemu_args was merged into the kunit tree. > > Did we want a standalone v2 of this patch? > > > > Based on Marco's comments, we'd change: > > * drop CONFIG_KCSAN_STRICT=y per this comment [1] > > * drop CONFIG_KCSAN_WEAK_MEMORY per previous comments > > Then for --qemu_args changes: > > * add CONFIG_SMP=y explicitly to this file > > * update the comment to show to include --qemu_args="-smp 8" > > > > Does this sound right? > > Yes, sounds good to me, and thanks for remembering this. I'd prefer a > close-to-default config. > > > [1] Note: there's also patches in kunit now so you could do > > --kconfig_add=CONFIG_KCSAN_STRICT=n to explicitly disable it. This > > wasn't possible before. Does that change what we want for the default? > > I'd just have KCSAN_STRICT=n by default, and if desired it can be > added per kconfig_add just the same way. Ack. So concretely, so then a final result like this? $ cat kernel/kcsan/.kunitconfig # Note that the KCSAN tests need to run on an SMP setup. # Under kunit_tool, this can be done by using the x86_64-smp # qemu-based architecture: # ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan --arch=x86_64 --qemu_args='-smp 8' CONFIG_KUNIT=y CONFIG_DEBUG_KERNEL=y CONFIG_KCSAN=y CONFIG_KCSAN_KUNIT_TEST=y # Need some level of concurrency to test a concurrency sanitizer. CONFIG_SMP=y # This prevents the test from timing out on many setups. Feel free to remove # (or alter) this, in conjunction with setting a different test timeout with, # for example, the --timeout kunit_tool option. CONFIG_KCSAN_REPORT_ONCE_IN_MS=100