From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F67AC3A5A6 for ; Wed, 28 Aug 2019 11:50:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F6CB22CED for ; Wed, 28 Aug 2019 11:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726462AbfH1Luw (ORCPT ); Wed, 28 Aug 2019 07:50:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:59984 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726253AbfH1Luv (ORCPT ); Wed, 28 Aug 2019 07:50:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6C28BAF77; Wed, 28 Aug 2019 11:50:50 +0000 (UTC) Date: Wed, 28 Aug 2019 13:50:48 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Brendan Higgins , Stephen Rothwell , frowand.list@gmail.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, kunit-dev@googlegroups.com, Randy Dunlap , sboyd@kernel.org, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2] kunit: fix failure to build without printk Message-ID: <20190828115048.b4per6j3rw53oc5u@pathway.suse.cz> References: <20190828093143.163302-1-brendanhiggins@google.com> <20190828094929.GA14038@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190828094929.GA14038@jagdpanzerIV> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2019-08-28 18:49:29, Sergey Senozhatsky wrote: > On (08/28/19 02:31), Brendan Higgins wrote: > [..] > > Previously KUnit assumed that printk would always be present, which is > > not a valid assumption to make. Fix that by removing call to > > vprintk_emit, and calling printk directly. > > > > Reported-by: Randy Dunlap > > Link: https://lore.kernel.org/linux-kselftest/0352fae9-564f-4a97-715a-fabe016259df@kernel.org/T/#t > > Cc: Stephen Rothwell > > Cc: Sergey Senozhatsky > > Signed-off-by: Brendan Higgins > > [..] > > > -static void kunit_vprintk(const struct kunit *test, > > - const char *level, > > - struct va_format *vaf) > > -{ > > - kunit_printk_emit(level[1] - '0', "\t# %s: %pV", test->name, vaf); > > -} > > This patch looks good to me. I like the removal of recursive > vsprintf() (%pV). Same here. And I am happy that we did not add more external vprintk_emit() callers. It would be great to rework dev_printk() as well. Best Regards, Petr