Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp281603ioo; Fri, 20 May 2022 22:10:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBUsHBBe8RjKbMgv4JLThJy4P3n4d5aIX2etbBVO5JGVFkO3ZTCnR3CwMCHTLLcPnUYgX1 X-Received: by 2002:aa7:c417:0:b0:42a:c3dd:4148 with SMTP id j23-20020aa7c417000000b0042ac3dd4148mr14292809edq.379.1653109841886; Fri, 20 May 2022 22:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653109841; cv=none; d=google.com; s=arc-20160816; b=vCokSLuM8VuFtcHjUWS1+Bs+0TttYmXKivfa+WW7miwh3SHXY7PtR1YhBxj5IPdEj8 g1BXOth6wPzNBVgEudohdxnLgZb61R+Ttj3+9mARJMuBIGMQUod4zc/m3+9gkBAx6uXf 2KK1h/BYb/FOk0tuR+dJ1MlhlfMSs1jXWCLc9n8uG9w0hHkmzcUQbjEIDoattxK3R8s8 CNtQjbZ200gVgAFsqHWnqtXs7na+3oGkkrZuPVcBKGhXB0pKSrhlhcvCLvTkIg79wzEo wA0U1OpWa6EL+kRkKfgamWfn2E/4LhiszPtWDxqJDtucU7sVZgSnxQ6f7czhe6cYwUNs JZfQ== 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=Hc2DTzkdvmY5/H2+h1fYLqdWLOpbPYQU4WUrtguKfK8=; b=gnDIjLWO1DI48K9nPt4gErvlDCyBuDfRR2JlaZio2Oy6csPBLFgXLbY9jVH8uJ0drw 6fiSYCp1ru8PhFmDjXX4tHW9dOhCI0vFUZG5Wj0C3w0YCTYUdWMVCmDc8UT2Tb6lwidV hoay8uIVp1K/X0Qow+44WmPTm7nQYqroFv9TENEoU9JbKGTtCyqxz5oDBRMIDj8H9+eY z93Hl8Bh2PVRXqTOwnDLNVI1wO8PMhzcwkn494eMHK7VTIK4jeqpBcvLRQxuVBnqFoZD qifLvHMBMNEWClb10r9k8VMpMfTF4/2zm890PV7Ni4cUVTDxugzIgnczZ792ggPWbu4d LR3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YcQ0Hu0u; 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 a5-20020a50f0c5000000b0042ab3a8f0afsi10355541edm.238.2022.05.20.22.10.16; Fri, 20 May 2022 22:10:41 -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=YcQ0Hu0u; 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 S1348346AbiETWf3 (ORCPT + 99 others); Fri, 20 May 2022 18:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233176AbiETWf1 (ORCPT ); Fri, 20 May 2022 18:35:27 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF7AA178563 for ; Fri, 20 May 2022 15:35:26 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id eg11so12392282edb.11 for ; Fri, 20 May 2022 15:35:26 -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=Hc2DTzkdvmY5/H2+h1fYLqdWLOpbPYQU4WUrtguKfK8=; b=YcQ0Hu0u3oUtOd9K6qAjIrCzfi7ako/V39ndwIxJG58KfcKA6mHEbr02iQKhS+icJ7 AWTF2PJV9YsGtctpG00VQ2dF159kSsPOUXUfYAgkjXoXbsftFK+R0lncDH8FpSfgueC+ 7RzlTU+Diyl/K6STYoJjnz/brTfG73icT2DNlhlm+lmO827D6BhSScD//biiZGRO05QL q3RnvLZwT6mcTsisMw8lRJ7Epy1rFcyBbvwAnyHXaGG2Yn/MikvesKpcqYFXNKUh/3QK RcGUiDblIarbhgeIP7M/68tM41h18GHneABwFEDjCDltu8G3/5wCeHdcVOkSrsvu+uB6 +cOA== 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=Hc2DTzkdvmY5/H2+h1fYLqdWLOpbPYQU4WUrtguKfK8=; b=QZxm/odjlM/r5ge9k5vCctsEXzrtK7NKz2aIki5pkTS4yFxMOVYoGbxfnMZ2n3z3W/ FXD54IVgw6UeZjFMny6IJtSGzZC1UI1Q+KkGRL3qIj55nEXzpElYrBTK6yXjvRYfro2z 0RSbr7IQ7sEDaKvnYImUDDa0eX8aGJQVbj5rLF+O73lFUKPBrlGmunp8eIgfZhtALwYw yKIJuTeSMUQ8/0+ah/Wtr3ejsb8mgcWNjPPS2L+d0lFKrreSidbAwF3wSQ5L7DRKYLiS uToyH1L7OJ2H6UK6YhNvtloqXKqCwV9ohIV0Tr/J/IuHAJEX6ZLOO0Qiq1BJ8Lx1rSaI F2CQ== X-Gm-Message-State: AOAM533ktd1n5eBIg4PWE5nxjZoeqSB+AIUt2Cz1m/EWll7dU9sJWNEe JwuDzXNqFbkwSelSPSvON7LeVwv8KKc8GbWGLz9Qlw== X-Received: by 2002:a05:6402:3047:b0:42a:fbe9:4509 with SMTP id bs7-20020a056402304700b0042afbe94509mr11941788edb.159.1653086125167; Fri, 20 May 2022 15:35:25 -0700 (PDT) MIME-Version: 1.0 References: <20220519164512.3180360-1-dlatypov@google.com> In-Reply-To: From: Daniel Latypov Date: Fri, 20 May 2022 15:35:13 -0700 Message-ID: Subject: Re: [PATCH] kunit: tool: refactor internal kconfig handling, allow overriding To: David Gow Cc: Brendan Higgins , Linux Kernel Mailing List , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan 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=unavailable 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 Fri, May 20, 2022 at 3:13 PM Daniel Latypov wrote: > Talking offline with David, we've come up with a small example. > > If we add this kconfig somewhere > +config X > + bool "X" > + default y > + > +config Y > + bool "Y" > + default y > + depends on X > + > > Then running this will fail > $ ./tools/testing/kunit/kunit.py config --kunitconfig xy_kunitconfig > --kconfig_add=CONFIG_X=n --kconfig_add=CONFIG_Y=n > > It will fail with this > This is probably due to unsatisfied dependencies. > Missing: # CONFIG_Y is not set > > The problem is that kunit.py is looking for an explicit line saying > CONFIG_Y is not set. > But CONFIG_Y's dependencies are not met, so Kconfig doesn't write it out. > > I assume we can treat the absence of it in the file as proof that it's not set. > I.e. the bug lies in the is_subset() logic we have in kunit.py? Ah no, this is just me trying to be clever and avoid a call to this logic. I tried to use set_diff() and check if that's empty as an alternative. But the set_diff() logic is not aware of how to treat the absence of options properly. I'll send a v2 w/ a fix.