Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4768871pxu; Mon, 21 Dec 2020 23:42:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwekMJL5OxihjidXP7oPnfU0cnM0n5cxk5W9HQxKWd1a9VmZR4L+Az1C2gytDUMexdPy5bV X-Received: by 2002:a50:b944:: with SMTP id m62mr19043510ede.182.1608622974415; Mon, 21 Dec 2020 23:42:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608622974; cv=none; d=google.com; s=arc-20160816; b=FCbc0rsIzKwhUXDkKrtnOYcPe8TtfWd9L0YbQ8S+uwCgC62VyHnEerzdDg0bSQipuT FKlmEFrc/anz6/2BYkhdn5xJ3GCQvaOihIiGwkhyGMe8bRajJ6IRBpB90tSDg19lnVve 0r84Atk2NYRLSb8K5zcH4EK45XgGhfMnJXbfw8/LV4niO6wxCZpERhirm/kogac6cTi0 2c2oBVdV1Ghc/IOXuyA6C2C3k3JqMilkYI64Vhoa4Ek483deRcp4Ol5uzXYb1M4l3QtD LfxbjaWoiCDkschlaXVdIKlZS31rMd2G8kEyQXt20b4VeRnetSYKewNfOFC1kjFPw766 saxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=lswzyGh/wqBVBArbTXet9XrVDeOvbwazZ0TIN1WlZU8=; b=tzBO1vQ8U8wSpxZzMKKLkljmCOqGkc3uiONSsty8y9UF0kY6S08oS9WrfnwJPfAj05 6bv4wgB3gMF3PaSdRWNCeeQJGMf77OYoHYwJ+GuqD6cnkYV1bxkuuFf+Df0wmaLUn3wp PCfptunWyT4brMAMGDXKgCSodvFOnK5jElF49c+jMuRxWmnl8jvS8srbL2q2OjzMGm6X eGsJz0CXPa2mb7AwybewWZ64b9NXFssdONkxlBsJdS9Ldzw29pyOaf2RwK6QB3p4uKLl cxJhkczRUkVM/WcSqM9kZIaF8tzaQcSCTzmXfBfVBQLeSoFzGNcjcbPJ/AxadKA9Pado 9k9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BVIGhmCp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id dd1si9769623ejb.357.2020.12.21.23.42.30; Mon, 21 Dec 2020 23:42:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BVIGhmCp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726008AbgLVHjp (ORCPT + 99 others); Tue, 22 Dec 2020 02:39:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbgLVHjp (ORCPT ); Tue, 22 Dec 2020 02:39:45 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4395DC0613D6 for ; Mon, 21 Dec 2020 23:39:05 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id g67so16847559ybb.9 for ; Mon, 21 Dec 2020 23:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=lswzyGh/wqBVBArbTXet9XrVDeOvbwazZ0TIN1WlZU8=; b=BVIGhmCp7okmhrxfAv3vg+iTduI+GtEk6bJF9ETLYZOQ/YSDMrE1lnPkdTNJfEvn9G 2i/G10wdh472dBfa1O013Vb6h2cqloICEwlw46TF73oo4NHvqDBPkajY305Tp3Ot1Agg gMWN7q10k/hT6dAO2PMVl1ot0oBb38YSKWVvYk8cvgoOz9vDH4FEFWHnCqQJiUiq+jJ0 4zWft73Q2r17HtVhc1hP27SX5AWfNJULaILLE/BHWazaVxtLUkipd3wOG79Oj1zp5Wqz xOKWxqHE1NCrhwDsNtpfSdLF01dACNj3ZvgHa8IO9N6v31JYmds1vRNnUuwf9luY4Ct/ bkIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=lswzyGh/wqBVBArbTXet9XrVDeOvbwazZ0TIN1WlZU8=; b=BTTghHtVcwOEKiJR+pT72K2Qrj+l5er7E+BWfvNMbmReuLnqbA+VLot+Jr1z4VyjuR w8VuBoq8q6GoZnzcARoBny8Kul+hkYmXz0zng+hFHekzs8Xisv0Qaz1al+/xvB4gpllD wZADcQ1AXkx62TG4Z4ojsJFhGRMGXqoT5x/nfSNst35ZiM+Fn0HS0fxzY2LwLS4xlMP9 uEONR6JllAdvSHfydiTeQQmLaN34LQD8iKHBXRXSXQ+eSi5sKRQmH0fkfxQ/uoky6lIU 1qevHPvY+xcpORsQhX/bPFY9kI9BCHNzczs53JDcka805VE0zWpjPlmLwXjPe89de03A xFpg== X-Gm-Message-State: AOAM533RyTwD+ZxvWXtMu/N8zDf6WKP9BBphsK1rmgir5cW8hZ+ilwqz p+etg4NA16cBGnlUXBe5JEfrQVvd0ys2Fg== Sender: "davidgow via sendgmr" X-Received: from spirogrip.svl.corp.google.com ([2620:15c:2cb:201:42a8:f0ff:fe4d:3548]) (user=davidgow job=sendgmr) by 2002:a25:9902:: with SMTP id z2mr27142126ybn.339.1608622744383; Mon, 21 Dec 2020 23:39:04 -0800 (PST) Date: Mon, 21 Dec 2020 23:39:00 -0800 Message-Id: <20201222073900.3490607-1-davidgow@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog Subject: [PATCH] kunit: tool: Force the use of the 'tty' console for UML From: David Gow To: Brendan Higgins , Petr Mladek , Shuah Khan Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Andy Shevchenko , David Gow Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kunit_tool relies on the UML console outputting printk() output to the tty in order to get results. Since the default console driver could change, pass 'console=tty' to the kernel. This is triggered by a change[1] to use ttynull as a fallback console driver which -- by chance or by design -- seems to have changed the default console output on UML, breaking kunit_tool. While this may be fixed, we should be less fragile to such changes in the default. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=757055ae8dedf5333af17b3b5b4b70ba9bc9da4e Signed-off-by: David Gow Fixes: 757055ae8ded ("init/console: Use ttynull as a fallback when there is no console") --- tools/testing/kunit/kunit_kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py index 57c1724b7e5d..698358c9c0d6 100644 --- a/tools/testing/kunit/kunit_kernel.py +++ b/tools/testing/kunit/kunit_kernel.py @@ -198,7 +198,7 @@ class LinuxSourceTree(object): return self.validate_config(build_dir) def run_kernel(self, args=[], build_dir='', timeout=None): - args.extend(['mem=1G']) + args.extend(['mem=1G', 'console=tty']) self._ops.linux_bin(args, timeout, build_dir) outfile = get_outfile_path(build_dir) subprocess.call(['stty', 'sane']) -- 2.29.2.729.g45daf8777d-goog