Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp887205imu; Tue, 11 Dec 2018 09:05:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/X0BakJTrMpzu46cLbpzRiYTnW64OzgOyWDH9hK7Lwqc5fwVM4j66x+JHPlsNz8YTUDwFPD X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr17233346plb.17.1544547932501; Tue, 11 Dec 2018 09:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544547932; cv=none; d=google.com; s=arc-20160816; b=babPHNMffC0HMot1b+0ZHdc8SzYbNTxK3iL9HXOKIAjVpc2Pe7aCMmWNVVEQOpwG7n 2y8WU1QKx6faGXTy3WMyd9tBtIVBldH5cQs1A8wmU3sLANsBGS8Rm1TfLMFkd2VrKemG IgKMXDoODRl1o0lqJfN7Bl1GAI0Dt1jI5yMaDWXXk/EwqzsxJ3kQVAqTAUHqCIF805mF kbsgPSRidW/YBNzYwCjenFqa9uuHI3sitaMIY95iDnPky175CPV9AdduAImQORP6a1Hb sAKqKO9HyGQBeWyQ5BKtVu17a6M7pskzRF0AXdZpeSI+6fJex7hIV+YnVs/Yu75h4Hfm qFRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=9qcPRJUwCbqPXskeaK5JKHlPmjaqwDGp8tbQcjJy+pM=; b=NEZJEMTQlP7xUZm42ltMc/mHPSbO/LymAYr13egpoCwCbsQ1YXKms6n4pCbbxz0Uvu MWIX+lavCEjOTIecUn5Sk6ypk6Bg83Z+1vq0geX5iI9U/Nl3Gys0T3BUxE4LNasobwPM FRUX0k0LMbABRBcNBmBH8oKxjduEYw8tXSvOaDUNO+Ir/x5FWurZC0PY8ivROBPMKjdP 2l0QXop0fsouFk0q+at7cTW8rbf1mXAcahizvR1P1DOtOVVOm4VC9cZuEuKnMwQpNx21 V6pNadyDrYme6Aix9NTVI9X32RCUjl9TsY5E/FQmeuBmB6KXPdhnbGmMjTWY0hTyMLsO AktQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si12039511pgc.65.2018.12.11.09.04.53; Tue, 11 Dec 2018 09:05:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727180AbeLKRCs (ORCPT + 99 others); Tue, 11 Dec 2018 12:02:48 -0500 Received: from ivanoab6.miniserver.com ([5.153.251.140]:34110 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbeLKRCr (ORCPT ); Tue, 11 Dec 2018 12:02:47 -0500 Received: from [192.168.17.6] (helo=smaug.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gWlPt-0006lP-RZ; Tue, 11 Dec 2018 17:01:54 +0000 Received: from amistad.kot-begemot.co.uk ([192.168.3.89]) by smaug.kot-begemot.co.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gWlPp-0002WK-Av; Tue, 11 Dec 2018 17:01:53 +0000 Subject: Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel To: Steven Rostedt , Petr Mladek Cc: brakmo@fb.com, Knut Omang , jeffm@suse.com, Brendan Higgins , 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 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> From: Anton Ivanov Organization: Cambridge Greys Limited Message-ID: <34f9e9f3-6bca-f11f-097c-c6e0cb779b61@cambridgegreys.com> Date: Tue, 11 Dec 2018 17:01:48 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181211094140.2a928fe7@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -1.0 X-Spam-Score: -1.0 X-Clacks-Overhead: GNU Terry Pratchett Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Anton R. Ivanov Cambridge Greys Limited, England and Wales company No 10273661 http://www.cambridgegreys.com/