Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp10887ybl; Tue, 27 Aug 2019 14:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMNPsO6l+0/fzoNDQF3cnWLI692usfqWKqIZXYck3qMXjbEzp5V+F4jW3SZevNwaY0P+j5 X-Received: by 2002:aa7:8611:: with SMTP id p17mr770081pfn.41.1566942842084; Tue, 27 Aug 2019 14:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566942842; cv=none; d=google.com; s=arc-20160816; b=J+9db23x8yeIDfQPUk6GfstcGPbpVVER9H7x7x6IVN7qkBwa2P21tyzTf4EqH4B7E7 UqHY6zsJIpjmJf6rOIjE1OB2JhaJDLmAzElEOjT5+wt3zJR18GtO3dt5YBETb5plSMKo 4gCVjkeroNf9WpMDvVBMbqO/F/eaRdZpNR7gDPE+kvaNruSunj8/cYOlqKv8DYM3jkDa M6oPR96rvyv02vRcuOTDFJ5Y1AwQO0iMdFUDAACAPBvirUb/Zp7s3BdsToMIvrhBDJnr SPjRdcgL9l0a3Cmrj98vUPkPqxsPi4qS+/UwmFWjv0Yvb++kdxgXZ+NI6cxltzvXmKvo D/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+irtzyVRDDrZdpMz7JihRashs6tjpw1hAnPhyXixHfQ=; b=iyDUXLgwZyefmGGLCtXV9zifm9hQBusUMg7DTNRCAJm2TvD0vOw3Xg1uHUZ8idKS+l hc5kN60zmZW0eB/Zxwee7I0PE+lBtcrYBhlzyBxMxamqqJZZCeHhLhXWW6ucPKe6LXVf jm/tpXba06dNQo8i5uSd3dbfcx5nPjS55X5c9Nq1c6dK2Sp+pDK3cYaFs61amvXNWzAc T9RnfEkRoafYevtJhvYhNT9tCR79XYwgzxqvDF3nREnNYp66D0583gX27JnBJgxCN5Lr jj2r72ggjjNfd4XjsIQeRH9Z4wxbBjldFVzc3syC2ctKX2z0j3sqf/x3a2PBG8pQuV1s w4xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="H8vyk3/h"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si498099pgm.43.2019.08.27.14.53.45; Tue, 27 Aug 2019 14:54:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="H8vyk3/h"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726504AbfH0VwM (ORCPT + 99 others); Tue, 27 Aug 2019 17:52:12 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40906 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726676AbfH0VwK (ORCPT ); Tue, 27 Aug 2019 17:52:10 -0400 Received: by mail-pf1-f193.google.com with SMTP id w16so254804pfn.7 for ; Tue, 27 Aug 2019 14:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+irtzyVRDDrZdpMz7JihRashs6tjpw1hAnPhyXixHfQ=; b=H8vyk3/hGsv4WW7to+VBsIoy/ie5y44IptvuovFBoFlS81qgLeHyMG6YQgBw/5NiNJ 4OJbnrcOAqOdQIj7AyUVcV0NQCjrAJdZ1axoB+yMJ3BYN38u4jmdQCGEOEwkSrTpRMhe qO8BNNHqBeQ7OjCM6FRGwKKxkAUT6DfiP5VlwZGowJ17eLxv8jhB0or8+sYF37ERbtzM otWRjXgj2ld2gyoMIrYgsQi4iPLd6zR64a9P8MdgkI8YnzYQZULtWc0Q3QrHJOgA8B26 PXEj/PSKdDzY6isF4T/zCx0ihKcSOl8bNbmAbPU0xCELf7iMVWfiH9fVuxD+OjxvTWlc pleA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+irtzyVRDDrZdpMz7JihRashs6tjpw1hAnPhyXixHfQ=; b=th6Qise1/8oUGiUeHmZiOXBfx1UuVWtfvWU7/EJ4tzCrTYEWeoB4hXotQb3OhdfO3y rCcPIiyfSCc1+HJQI2H8uKrs9yJjVZK4iZsqYe4rdS4CpB3LyJL5oDxVpvwv8Y8snxY8 MiOU8J6pOw/GF4bAUMgEkAI9RBqZv3OAxGo7V3xg080yTB3SJyoFPNeM6yngyLJQ3a5Z 4U41+ljQdOPrkD+9Fa3ksA4DVz4q8T1PRSAPEtg9tmjJouuyA+Tf+Sd9yNrfkp3PBihx 3iDuCjArZMnbU/9qL4JEGf30EekeR0B/f6rupOhIO13YS0aiZ7BzJgCrbRsQHpT/QkMm eVbQ== X-Gm-Message-State: APjAAAUsDTedOtpkoDUdrWGSKGXJiMNf70hLMYCgW/Fk9IaPulNsmLp3 nITqgcIIUIQ0nDCXT/MXtnwalctfQ5YJxaNQpTDL/g== X-Received: by 2002:a63:eb51:: with SMTP id b17mr527994pgk.384.1566942728992; Tue, 27 Aug 2019 14:52:08 -0700 (PDT) MIME-Version: 1.0 References: <20190827174932.44177-1-brendanhiggins@google.com> <20190827214613.9B896206E0@mail.kernel.org> In-Reply-To: <20190827214613.9B896206E0@mail.kernel.org> From: Brendan Higgins Date: Tue, 27 Aug 2019 14:51:53 -0700 Message-ID: Subject: Re: [PATCH v1] kunit: fix failure to build without printk To: Stephen Boyd Cc: shuah , kunit-dev@googlegroups.com, Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , Frank Rowand , Randy Dunlap , Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 2:46 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-08-27 10:49:32) > > Previously KUnit assumed that printk would always be present, which is > > not a valid assumption to make. Fix that by ifdefing out functions which > > directly depend on printk core functions similar to what dev_printk > > does. > > > > Reported-by: Randy Dunlap > > Link: https://lore.kernel.org/linux-kselftest/0352fae9-564f-4a97-715a-fabe016259df@kernel.org/T/#t > > Cc: Stephen Rothwell > > Signed-off-by: Brendan Higgins > > --- > > Does kunit itself have any meaning if printk doesn't work? Why not just > depend on CONFIG_PRINTK for now? I was thinking about that, but I figured it is probably easier in the long run to make sure it always works without printk. It also just seemed like the right thing to do, but I suppose that's not a very good reason. I am fine with any of the three options: depend on CONFIG_PRINTK - as suggested by Stephen, just use printk - as suggested by Shuah, or continue to use vprintk_emit as I have been doing. However, my preference is the vprintk_emit option. Anyone have any strong opinions on the matter?