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=-31.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham 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 42DE9C433DB for ; Tue, 22 Dec 2020 07:40:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19AB72255F for ; Tue, 22 Dec 2020 07:40:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726021AbgLVHjp (ORCPT ); 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== X-Google-Smtp-Source: ABdhPJycwxpLxeB7bb5anVq1PShQQNO5DGVwjQfW2TVGdVGvWLpFH7nISnFjv+cCelgfXqhy5ct1pan7Hk7MOw== 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