Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1938314iob; Thu, 19 May 2022 19:54:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv6PAM7G8KHyBMHJZnnrY5eddJmqcpt7n8EAGYGn/N5riZLKWyiyo99sFx/nuQ3+BD8D/t X-Received: by 2002:a05:6a00:228c:b0:50e:17ba:9f84 with SMTP id f12-20020a056a00228c00b0050e17ba9f84mr7546500pfe.62.1653015265469; Thu, 19 May 2022 19:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653015265; cv=none; d=google.com; s=arc-20160816; b=rPEbVUy+Mfg05Shmvyn5JSPkxlclku6yrTuXGcz0GcBn8XDYL2INsZK9v2QGPjF4jN W2i+wKmWFCk/jE1/EkSxZIRojE3KDEmCxyxUDVSrSj+0fnbP+kVJ+djcJ7S4kDd+YijH dvEmAEc9b0z6M10FCOd1VzLntjIJwAO6fakqo5Bika/hqMygrwZSi43uwNzmpaxpVbp/ 3HsvbBHnAPul42P7NvkpS4fsi+ASNX7XpSAI5yCetVwlzg1PT49YbtwdIY65t3f2PHYv w3FSKGivkyR0nmsKIuennZkGqkKIZ/IIch64xBN25T3gGiLrjOrqPf8ah6AjEFmSM/CJ HRzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ctr4gplq7tIvfpEzcReXp2Tbx4VBOJ0VA7nTlFJ97VA=; b=J5fKciMopsqR55D/51buAFtA16rq4Tzebonu97p4AZk19EmuYIFOb/QJQauTkvHmYb pJwPyq3AL596/D1YqrBecUgth/960x4fg/20uQjKqs3n3zoZXSQSUkgeKDBFor7g2VTD 10HaKIOJjcmblQd6obfP0nIW3dB2kOcc+qUfIzEfVCHqp7BLTzcW3jM5VvyDPtMOGOtS LpO+JtP8jbuUGb1cC7WlQImbIZo/CnFZ28kFNEmFkUJ9dDEKSD5UzvrCx1EXJV+KscxF D617YFUNzd8c2CDwAmAemmSK55uCeue7kvcEYxA2C+sdVkJ11olhqQTA5K0nQMMoFc0e 3Y9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TUnSopuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a632341000000b003f601d28ca6si8803373pgm.819.2022.05.19.19.54.12; Thu, 19 May 2022 19:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TUnSopuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242474AbiESRLh (ORCPT + 99 others); Thu, 19 May 2022 13:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242432AbiESRLV (ORCPT ); Thu, 19 May 2022 13:11:21 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21C1193EF for ; Thu, 19 May 2022 10:11:18 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id j28so7740715eda.13 for ; Thu, 19 May 2022 10:11:18 -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=Ctr4gplq7tIvfpEzcReXp2Tbx4VBOJ0VA7nTlFJ97VA=; b=TUnSopuTxg2nJAUBxDLL9PhbokwuRBME0f+G4z3bOlAfsNI+Xhdm+gB1CqUu5jLpmF +xRkF1+WV7wiqnwZSD7fTkd9u8G4oazcWW/CPUc7c1GnL/E7blfLlI6Uywp6psBzf/JP 2GtaIffxA1jbUDrVeOEBVTYaPsl5cTNaHvJeHpOb/AJ3rwvXqKA1BFkJrVYiPLTS7qVJ hg7/vU2sdRawx3xjYU0E9IEKy8bIXBIjVCZj58qzVSdz6d7a7cc+xDbcBmQjjsavPovC jsNR4CjFWhXaKqSFT4zGmNlO+umOS/8UWENUyBNAm9Xn3ZuZV3Ux/vC2BFQEesqt9kv3 00Aw== 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=Ctr4gplq7tIvfpEzcReXp2Tbx4VBOJ0VA7nTlFJ97VA=; b=v6/23tpHp1y+jIBJaKUO90c8p0fPaWfyBnb3YsWQhcs/pGm7bqDLiJIrZeROCYVCMP 1xMHbLSZ45zdpt1kWfnrC8Cc9mc7Vdf9KzZh2yDba7Zf3q5iLyp62IueGCf5Pi5/J6SY /NWiZw6R9Lo/Y47pVk5wgdN2gpkvkjpKsDMU7Q0kU90c4V1FD+6u4vMTbmJGaMWV5CC/ Z5LbWIIO+FOGYu5OQ2386fM4Ic9A6laeVK9WL4YexjT5oyshH4AJfvNG1yOUTAhbaYJy X6G3nWz42q07xbDyveFJXpeg9u+fE8Pe6sRz7xLJWoyTq0wisbkd6h3PrBR5Ok0OuWjK izjQ== X-Gm-Message-State: AOAM530OleIGeHewXMrA4dYrinbk2TwnK8juMni9fbKTpY96OCLEbQxw BBbUS8t7BLfPJoGvQVl+TQowfhNnfcyySVIJFCUD7w== X-Received: by 2002:a05:6402:84a:b0:426:262d:967e with SMTP id b10-20020a056402084a00b00426262d967emr6618652edz.286.1652980276934; Thu, 19 May 2022 10:11:16 -0700 (PDT) MIME-Version: 1.0 References: <20220518073232.526443-1-davidgow@google.com> In-Reply-To: From: Daniel Latypov Date: Thu, 19 May 2022 10:11:06 -0700 Message-ID: Subject: Re: [PATCH 1/2] kunit: tool: Add x86_64-smp architecture for SMP testing To: David Gow Cc: Marco Elver , 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" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2022 at 6:15 AM David Gow wrote: > > I tend to agree that having both would be nice: I think there are > enough useful "machine configs" that trying to maintain, e.g, a 1:1 > mapping with kernel architectures is going to leave a bunch of things > on the table, particularly as we add more tests for, e.g., drivers and > specific CPU models. I agree that we don't necessarily need to maintain a 1:1 mapping. But I feel like we should have a pretty convincing reason for doing so, e.g. support for a CPU that requires we add in a bunch of kconfigs. This particular one feels simple enough to me. Given we already have to put specific instructions in the kcsan/.kunitconfig, I don't know if there's much of a difference in cost between these two commands $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan --arch=x86_64-smp $ ./tools/testing/kunit/kunit.py run --kunitconfig=kernel/kcsan --arch=x86_64 --kconfig_add CONFIG_SMP=y --qemu_args "-smp 8" I've generally learned to prefer more explicit commands like the second, even if they're quite a bit longer. But I have the following biases * I use FZF heavily, so I don't re-type long commands much * I'm the person who proposed --kconfig_add and --qemu_args, so of course I'd think the longer form is easy to understand. so I'm not in a position to object to this change. Changing topics: Users can overwrite the '-smp 8' here via --qemu_args [1], so I'm much less worried about hard-coding any specific value in this file anymore. And given that, I think a more "natural" value for this file would be "-smp 2". I think anything that needs more than that should explicitly should --qemu_args. Thoughts? [1] tested with --qemu_args='-smp 4' --qemu_args='-smp 8' and I see the following in the test.log smpboot: Allowing 8 CPUs, 0 hotplug CPUs so QEMU respects the last value passed in, as expected. > > The problem, of course, is that the --kconfig_add flags don't allow us > to override anything explicitly stated in either the kunitconfig or > qemu_config (and I imagine there could be problems with --qemu_config, > too). This patch would fix that. https://lore.kernel.org/linux-kselftest/20220519164512.3180360-1-dlatypov@google.com It introduces an overwriting priority of * --kconfig_add * kunitconfig / --kunitconfig * qemu_config