Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2217410rwb; Sat, 29 Jul 2023 02:15:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlFu62l1DFshKhrjxE0kxSb0lnCxjIuHkmhw60uAbUAJL0OmoUkwhvqb+fxuimOsqOX73SrY X-Received: by 2002:a05:6a00:138c:b0:686:a10b:e8b with SMTP id t12-20020a056a00138c00b00686a10b0e8bmr4450811pfg.8.1690622154945; Sat, 29 Jul 2023 02:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690622154; cv=none; d=google.com; s=arc-20160816; b=RKu+0quumkrfAgHKLBZMKMiVZhIMfRbwvSMaYS2u4TVUhFj5epRuZHLhzDnDQ/69kl nEJXpHEqCpgwiNj2zrR5eu7Xp4er+iPBl8vTZ3Ya/nnwVj80g4rMiTdWtr36i16Z/Dyp QBcKisduP3cO7+WYjWerNNYFJOfHjf+lDdnK3KWxCvNU7amwJJR4+TFdK+Ew3zI2JmXu zPN703mxq7+NRO7QDSTS0cLEsNlpt+ZCUyKvwPoo2npVktTNWuw5G28FNG5lsMaOX9D/ sGEdA353+Wpzc8Ycenq96bU5ZeIopIssJJFBFpwPh3nM+6UTrr76EM815hDcSwpL0kmv I9Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+C3fX0H3/uMwRV1vnA7piBvog6P6AQ0Dy265ITn3m50=; fh=oktyAfFvTnnUlva8uVXG0N5h1nuGusaZzz++FhWKS4s=; b=PUf2dsYdAEQnFKdHZbc9pCxxidEfgP1E3kFiMG/RfjrU72DL3yZohmQigobeY8jsET YoSsHbanhEahB+xEYfVftEdQ08N20JBajJloC3gDUbzLQlY//5bJjcQrSusHYsk8Hrqa q1UghsDt6frcySnq0txYYTWYPSgwzLHiDT7K3+nvWuNwZI91vJEO0Xp4jrbQ2+f38X6q JGfJEg7Mv2nkWD9tvRLfYK1PLC7KTQMqPwG9KYqTq4xUPhWfg8dWZSdvd5QYwwBdZs7/ ufOWa87XleLB14ItyP5DMGjhFT36yWEgWV76e57ZBY1gJ23VXHudm8UI8tapHMf1o/2M Fpyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg20-20020a056a00801400b0066d93ab678asi1767315pfb.16.2023.07.29.02.15.43; Sat, 29 Jul 2023 02:15:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229500AbjG2IaO (ORCPT + 99 others); Sat, 29 Jul 2023 04:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbjG2IaL (ORCPT ); Sat, 29 Jul 2023 04:30:11 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F3F044A5; Sat, 29 Jul 2023 01:29:57 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 36T8Tou8004416; Sat, 29 Jul 2023 10:29:50 +0200 Date: Sat, 29 Jul 2023 10:29:50 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Zhangjin Wu , arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 08/12] selftests/nolibc: allow quit qemu-system when poweroff fails Message-ID: <20230729082950.GL956@1wt.eu> References: <4b4d792299ca5356f8f5af5fc9a27c687b0e4e38.1690489039.git.falcon@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 29, 2023 at 09:59:55AM +0200, Thomas Wei?schuh wrote: > On 2023-07-28 04:30:31+0800, Zhangjin Wu wrote: > > The kernel of some architectures can not poweroff qemu-system normally, > > especially for tinyconfig. (...) > This feels fairly hacky. and totally unmaintainable in the long term. It may even fail for some users having localization. > Before we complicated nolibc-test to handle the no-procfs case to save a > few seconds building the kernel and now we have fairly big timeouts. > And a statemachine that relies on the specific strings emitted by the > testsuite. > > I would like to get back to something more deterministic and obvious, > even at the cost of some time spent compiling the test kernels. > (saying this as somebody developing on a 2016 ultrabook) Agreed! > "Since the low-level poweroff support is heavily kernel & qemu dependent" > > The kernel we can control. > > How common are qemus with that are missing poweroff support? > As this worked before I guess the only architecture where this could > pose a problem would be ppc. > > > An alternative I would like to put up for discussion: > > qemu could provide a watchdog device that is pinged by nolibc-test for > each testcase. > After nolibc-test is done and didn't poweroff properly the watchdog will > reset the machine. ( -watchog-action poweroff ). > > The disadvantages are that we would need to add watchdog drivers to the > kernels and figure out the correct watchdog devices and drivers for each arch. It's an interesting idea, though at first glance it does not seem to have one for PPC. I think I have a much simpler idea: we don't care about PPC32. I mean OK it can be supported if it happens to work, we will just not include it in default runs, because it will require Ctrl-C to finish, and so what ? nolibc has been in the kernel for 5 years or so, nobody ever cared about PPC, why should we suddenly break or complicate everything just to support a sub-arch that nobody found interesting to add till now? > It seems virtio-watchdog is not yet usable. Then it might become an option for the future when it eventually works. Thanks, Willy