Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp136835imj; Fri, 8 Feb 2019 16:42:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZirkk8BwZ8oRa+eK0sQ2NsaFOPaHLZgodJGqtO0c93hZI6s+la3qOvjuLAynwLW8IDkcUY X-Received: by 2002:a63:cf4b:: with SMTP id b11mr23485448pgj.405.1549672923218; Fri, 08 Feb 2019 16:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549672923; cv=none; d=google.com; s=arc-20160816; b=r1DMBZumc0lrPRC9FvFcOn7unME1N+/Rv64m2yCUDToaTfbfbo+aDAbMc9ih3SqiYA cOawgUld6uzx+z4JNQ0tTf2wKzqeEnFCO8jGdiqzqQ4vkF11EMsw506/j9Ft2A/4qN/4 kBW4+Fc2O3zzpX3lhMw6uElaVKAJ25B7D7e0lrXf6D/pgdZrkIEMpEEG+a+RaqSXaOSJ aewyj3jW9hdg3qSs4NjoLw+O7jgTO/kHpYJF/oNVudsF9wZd5ToaH5O0OJ+CyCzHMSoL 83J5/yrAyK8KFhI0tbY1yRjx+bdLXDyB9C1gDQ0Dwv9ENrL0aWZeypebuKjzYbwa5dSr /QlA== 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=0w3Ukbs+RXQR7C9N95F48Zuxzzs5y+qN9AJE71LlehA=; b=jRt8QoNGbTG/UboHFzCgwAIdaQ4iYu64TpTkHXWrc4Zlj3TE0vxuOfkuBllxa/E/v+ XwaMWRB/04T/UOY1lc+FcLrzOOTdn3bNavILau1zsYFwi3jbQXUCb+hheF2V1gF6TDKC szkJB6LFhME1aeyxjim/8i0vQ0TqO5mctNRI7Qy396GtyQUhgGrqq8bu145263Eolr8A UB8Pr28P889XIx2ts7RB5u/ZBnveJ6fBIzELALaok20CyEOGYRa62XQI065zOfTDnHGP mFJ4i8BtUyubJ3sLdQk6eFlOJby4WwVr+vNDwU5PYAi4/u5EXIaiPmilQSs+gSHuTmMG 5EEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=V9RzXgcO; 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 z193si3479148pgd.148.2019.02.08.16.41.48; Fri, 08 Feb 2019 16:42:03 -0800 (PST) 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=V9RzXgcO; 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 S1727277AbfBIAkW (ORCPT + 99 others); Fri, 8 Feb 2019 19:40:22 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:39746 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbfBIAkV (ORCPT ); Fri, 8 Feb 2019 19:40:21 -0500 Received: by mail-ot1-f65.google.com with SMTP id n8so8928418otl.6 for ; Fri, 08 Feb 2019 16:40:20 -0800 (PST) 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=0w3Ukbs+RXQR7C9N95F48Zuxzzs5y+qN9AJE71LlehA=; b=V9RzXgcODcZdIhljMasYD7/kAPjEMdyucO1l6yTbIcevkoNPrxAEeDb9POCViuOTh5 cWhtLsQCmr8FbZHRoy7J+a3HzOBVPOAMtTqIGA05SFiaMHj5UX90JZVsWVnMrI0tIvm9 AElqeJm+39TJ+/oPIjEA6vnM56hn6QKjE8rQaENhlI0SDZAn4dVKZ3zwH1bwQ21Ne2nd seEeolqbd3TXkA753po4l+cXpims2IVooKWeEqPVxv8d/lUTcOwbRdz8i3YJ+pzCLXa2 zO6JKm2qUZ8AkfyFzRFyeVzIhrvCp7HO5KAZE58lwUw5qcb07van8X+8QHydJnAV9XgI nlcQ== 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=0w3Ukbs+RXQR7C9N95F48Zuxzzs5y+qN9AJE71LlehA=; b=GwF0MFeXbR0KrdetnLeuERLR5nvT29AcIGUWiT/vazXAih3IlFWsyZ8p6tGrQWYk2b pEFS+uMlKpYzB3JjUnS81FHJxjdveP/GYEQtkNX1F3lh/eYRMqMjU6rw/cCkUHAx8jkI V2aa18IQuIg+on5g4taxCbuL5CkySJrKLm1pgjwW2NwVv4Q04D7qiXIAjT24NxE/iwKz 4ms5BfY2qHDLbHDqZmG1M8jnI4osmUcGIN95uMyX+gdj2fKJpQLzINSsyaRKWpPuygGD +wcI31MnOFV5pdbn1HSC+SrIM2NzcsxI9j1S+P8j8vv+FfSRGiJ8BFS4qi2sip2pBBsx o7qQ== X-Gm-Message-State: AHQUAuatRSZUhfbBSmnlEOXBCdr8lCCus+6be/9iSHujAsaqNHjr00mA I+jPzW/f0suL3pTU5FupNoudXZiSkrtLJOE0841Suw== X-Received: by 2002:a9d:6398:: with SMTP id w24mr4926405otk.364.1549672819885; Fri, 08 Feb 2019 16:40:19 -0800 (PST) MIME-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> <20181128193636.254378-12-brendanhiggins@google.com> <841cf4ae-501b-05ae-5863-a51010709b67@ideasonboard.com> <20181204204701.GT28501@garbanzo.do-not-panic.com> <20181206153718.GD24603@bombadil.infradead.org> <20181211140926.7wzd5jh6klcfsfgz@pathway.suse.cz> <20181211094140.2a928fe7@gandalf.local.home> <34f9e9f3-6bca-f11f-097c-c6e0cb779b61@cambridgegreys.com> In-Reply-To: <34f9e9f3-6bca-f11f-097c-c6e0cb779b61@cambridgegreys.com> From: Brendan Higgins Date: Fri, 8 Feb 2019 16:40:08 -0800 Message-ID: Subject: Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel To: Anton Ivanov Cc: Steven Rostedt , Petr Mladek , brakmo@fb.com, Knut Omang , jeffm@suse.com, dri-devel@lists.freedesktop.org, Sasha Levin , Linux Trace Devel , linux-kselftest@vger.kernel.org, shuah@kernel.org, Rob Herring , Frank Rowand , linux-nvdimm@lists.01.org, mpe@ellerman.id.au, Eric Sandeen , Kieran Bingham , Matthew Wilcox , Felix Guo , Joel Stanley , Kent Overstreet , jdike@addtoit.com, Tim.Bird@sony.com, linux-um@lists.infradead.org, Julia Lawall , dan.j.williams@intel.com, kunit-dev@googlegroups.com, richard@nod.at, Greg KH , Linux Kernel Mailing List , Luis Chamberlain , Eryu Guan , Daniel Vetter , Kees Cook , joe@perches.com, linux-fsdevel@vger.kernel.org, khilman@baylibre.com 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, Dec 11, 2018 at 9:02 AM Anton Ivanov wrote: > > > On 12/11/18 2:41 PM, Steven Rostedt wrote: > > On Tue, 11 Dec 2018 15:09:26 +0100 > > Petr Mladek wrote: > > > >>> We have liburcu already, which is good. The main sticking points are: > >>> > >>> - printk has started adding a lot of %pX enhancements which printf > >>> obviously doesn't know about. > >> I wonder how big problem it is and if it is worth using another > >> approach. > > No, please do not change the %pX approach. > > > >> An alternative would be to replace them with helper functions > >> the would produce the same string. The meaning would be easier > >> to understand. But concatenating with the surrounding text > >> would be less elegant. People might start using pr_cont() > >> that is problematic (mixed lines). > >> > >> Also the %pX formats are mostly used to print context of some > >> structures. Even the helper functions would need some maintenance > >> to keep them compatible. > >> > >> BTW: The printk() feature has been introduced 10 years ago by > >> the commit 4d8a743cdd2690c0bc8 ("vsprintf: add infrastructure > >> support for extended '%p' specifiers"). > > trace-cmd and perf know about most of the %pX data and how to read it. > > Perhaps we can extend the libtraceevent library to export a generic way > > to read data from printk() output for other tools to use. > > Going back for a second to using UML for this. UML console at present is > interrupt driven - it emulates serial IO using several different > back-ends (file descriptors, xterm or actual tty/ptys). Epoll events on > the host side are used to trigger the UML interrupts - both read and write. > > This works OK for normal use, but may result in all kinds of interesting > false positives/false negatives when UML is used to run unit tests > against a change which changes interrupt behavior. > > IMO it may be useful to consider some alternatives specifically for unit > test coverage purposes where printk and/or the whole console output > altogether bypass some of the IRQ driven semantics. Whoops, sorry, didn't see your comment before I went on vacation. I completely agree. It is also annoying when trying to test other really low level parts of the kernel. I would really like to get KUnit to the point where it does not have any dependencies on anything in the kernel, but that is very challenging for many reasons. This loosely relates to what Luis, myself, and others have talked about in other threads about having a stricter notion of code dependencies in the kernel. Thinking about it now, I suspect it might be easier to limit KUnit's dependency on kernel infrastructure first; that could kind of motivate the later work.