From patchwork Tue Aug 16 12:26:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 597500 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp2343909maz; Tue, 16 Aug 2022 05:29:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cfg04yWdmfxvggL2kpcU36uZeJrvf8WirVMUct8XMu1BqrsjI5NlYtXra5lQr3ExKEUlI X-Received: by 2002:a05:620a:4890:b0:6ba:da47:172b with SMTP id ea16-20020a05620a489000b006bada47172bmr12990250qkb.230.1660652940955; Tue, 16 Aug 2022 05:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660652940; cv=none; d=google.com; s=arc-20160816; b=wfO5ZDvq4LT/tK/IhWJAuRdtb1kpfNmNQ2UhEsHqaWkyQYK9cZA+PDE+feeOgmnCCU 7ZPZrPpHwx285B2KARfi+KNVJaO7Z0VyyQ/vDHsYl29LeRvz+3Xu1rrzZWzzCxlQXTRP OuJgSLFnRRLs62HiR9kuSuLIlJ5iEjh2R1Wu+8MMKv1lPtLoB20+4aw9lirRLHc1W8BY 3yn0cb/ll7c9/QH+zVjf6nA9ZJ0MSTx1+x8bnEXUWEs2ZO6sDiSym0aTLVBB59h1TA4A 6c1XXQGnvnwYo0ab4PeYDW+YuJZn//p1AI2XSQ1QBAIDxF6ozkb0rFXz4aYmjsBmxgF9 rZAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bwzqfA6o9KxVQ+yh1ggjjAyIYRr9k3xUnAlnxn391Io=; b=llTwgxMGEVeY+Q5pvT55r0FbAvAa39CbWc+v4stF4yN3niPRkVtY0FlK+1gxZZAXzr 0s5rU4ViVLGKcvzzrTyUrrZRGL5rUAi76T4C7/BnW8tTvZJl5K5Y2rWEhxyADsIlysLF 5vurS2OErP1sZwPghVrX4TfU6MgVRuch9gMbiYJPLaM5O2lnQcBTU0zwQj32fMc9XSCf SnLv65Lpq/y9lZ0o8xuVnAXc+rES4YEeqgkyYdxEd+Za3Zl+fPqvP5b2QrL1tz2zCoFL EqPjUGXc0GCHe+UeyVIfC4r7yjuUI5e2vDrh3R2xRY8lSuYfNfN+x1M9UUS5eC8fa/yO IqRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hVupO/Bb"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id im3-20020a056214246300b004737285613csi7425229qvb.405.2022.08.16.05.29.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Aug 2022 05:29:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hVupO/Bb"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNvgq-00062k-H2 for patch@linaro.org; Tue, 16 Aug 2022 08:29:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNveP-0004gh-9U for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:29 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNveM-0001ja-UC for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:28 -0400 Received: by mail-wr1-x42b.google.com with SMTP id n7so1232389wrv.4 for ; Tue, 16 Aug 2022 05:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=bwzqfA6o9KxVQ+yh1ggjjAyIYRr9k3xUnAlnxn391Io=; b=hVupO/BbnR/puOKWMrDR9gWDlqWO6mB2t0k8CKg6WP7+HdJLhi2hbELMWX4mUJ7q8E LiNnr3lCif/t6rN2cwewWOkT2AjDR0vFhIqWnXEt5TZxE2psqsYobOEGRZPVBKP/+OB1 XVmUCzF9PCJnRPCrr9DoHydLELmouwWnm/PeE1LHKyVzy7W1fgukuHuq5oBdgYNuh1jD OSuFyxekd/Wj2HavLX+PiKf67jYUAitK1sim+QwVFhFy+hlKIJTHiPpOsA/RsWPdflXv KH2mUlwxsTFVsxlKpuKir/HRShEcsN/qse/fZrtFI52vGCSaMvISQkuyu+yapZo5c5oH Kd8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=bwzqfA6o9KxVQ+yh1ggjjAyIYRr9k3xUnAlnxn391Io=; b=PMR4isStjWHfzw4GEfwlXMmOm/+5IfmQ6gM01iwGLhaGClYJxp9B0QK92HB3Mz6JoZ ngGMNVmX1lpMIxHaK9b4DWgUh0BXSQ/L/EsOismKK60yOjYB9wID3Ob/qHoav1pCY56r w/Nt8ud7gXGcDvK9DdAwhI0N1asH4cGkZC7ll42mwpdNM62iioDhHViF74gTLTz1eKfU P9Blb/3pgTwKWh0Zhtd1Ca3v3NoynZv4Cxr4uT+coo/r0Xf8D8QteBsBmF1wh/XOKthN TV5Ooh37FqH+sUDFRhduQyP5eMo5F3yzxgWs8VkTRTczf/lVyFJVwoMTfknKInb6g06l y7Gw== X-Gm-Message-State: ACgBeo327BrkVuImsQL3LOVz1blMQkaKnmCR010v4m5LVsjLU5u6r1mh lxP2lcVoqJhldF5uCunyTcRtvw== X-Received: by 2002:a05:6000:170b:b0:220:6535:26d8 with SMTP id n11-20020a056000170b00b00220653526d8mr12127609wrc.577.1660652785563; Tue, 16 Aug 2022 05:26:25 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id g7-20020a05600c4ec700b003a3170a7af9sm13186389wmq.4.2022.08.16.05.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:26:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DD7B31FFB8; Tue, 16 Aug 2022 13:26:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [PULL 1/3] linux-user: un-parent OBJECT(cpu) when closing thread Date: Tue, 16 Aug 2022 13:26:19 +0100 Message-Id: <20220816122621.2066292-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220816122621.2066292-1-alex.bennee@linaro.org> References: <20220816122621.2066292-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While forcing the CPU to unrealize by hand does trigger the clean-up code we never fully free resources because refcount never reaches zero. This is because QOM automatically added objects without an explicit parent to /unattached/, incrementing the refcount. Instead of manually triggering unrealization just unparent the object and let the device machinery deal with that for us. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/866 Signed-off-by: Alex Bennée Reviewed-by: Laurent Vivier Message-Id: <20220811151413.3350684-2-alex.bennee@linaro.org> diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f409121202..bfdd60136b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8594,7 +8594,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, if (CPU_NEXT(first_cpu)) { TaskState *ts = cpu->opaque; - object_property_set_bool(OBJECT(cpu), "realized", false, NULL); + if (ts->child_tidptr) { + put_user_u32(0, ts->child_tidptr); + do_sys_futex(g2h(cpu, ts->child_tidptr), + FUTEX_WAKE, INT_MAX, NULL, NULL, 0); + } + + object_unparent(OBJECT(cpu)); object_unref(OBJECT(cpu)); /* * At this point the CPU should be unrealized and removed @@ -8604,11 +8610,6 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, pthread_mutex_unlock(&clone_lock); - if (ts->child_tidptr) { - put_user_u32(0, ts->child_tidptr); - do_sys_futex(g2h(cpu, ts->child_tidptr), - FUTEX_WAKE, INT_MAX, NULL, NULL, 0); - } thread_cpu = NULL; g_free(ts); rcu_unregister_thread(); From patchwork Tue Aug 16 12:26:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 597498 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp2343085maz; Tue, 16 Aug 2022 05:27:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ER9ILVAwhyW6ffDZ8Ed+OMPoOXJ8UGtKUZARHuBRA4zI8SFLQ/FkOxs8NUHdrbAWH8pBA X-Received: by 2002:a37:ea14:0:b0:6b9:4292:32e8 with SMTP id t20-20020a37ea14000000b006b9429232e8mr14587911qkj.196.1660652855759; Tue, 16 Aug 2022 05:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660652855; cv=none; d=google.com; s=arc-20160816; b=zokwu4EgqKwWzckWRivo+waXGG16rfagKnIw74VXj/BwZMojvEV8jKmSoI/sN1rxDx ezPNgzJ9dW/SzRfh6m2EMbh80hN1Rg993XtIL/VkKoslpN6bLMnfj9mvZq0DLkd+YYap yZivJ6MK5CLA9imHGlkCm9xotOEwp3VSHU+yl44S9VF2F36femPO7SuKMURDaMqkOdzz cXvEDrjWhsfxFtNxaHCfF7ZB27O/kF8ZsSZFPZWtUFY82Dy1ks7OqYOE7b8BwHsQe0Op RZi+oWWU0nxcEyY7YWO0xIx6H6VFBGjk4OWRmUpBIFDQou4UH96UgchfJbdjtnBxuGl8 xc1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lcoW7Lzpi1sLzNSIYAaJ/EO/qi9Z5QpCbFBSmRllJwE=; b=gNSh3k/OlMZSFVPKvSKBTNFXxlpxwqR9PC/POi9qLlRFuImmRMppPbOaJoDN04I1sk 9Q8eKCTTHH4daia6z/To/E7Nzqz32ORlqDT1RMcPARZXdQZdbuzEIz9bB6D5gF5t+24Q RzISXG0FKG0Juo39akDaY3q36PXaReHP+75i+9DAwdN73NIFZtCLSu227brS0x3QUg7x Bxv+Uszete1l3bYg0DEg3hzM6hM6vUizfUvW8Jf/6Rg1QKtKZKFD9W7PeRKNdNO7U73S vG/JkySJ/iMPr/yXcFHl7LklbrzKCtSuOyGRz8tBA+7zwoUYwbBQ+jYs7RuvuIVsGDUZ xhog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YzxllfUq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gv11-20020a056214262b00b004768b9fecaesi7115985qvb.228.2022.08.16.05.27.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Aug 2022 05:27:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YzxllfUq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNvfT-0004gO-Bz for patch@linaro.org; Tue, 16 Aug 2022 08:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNveN-0004dL-TT for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:27 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:50764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNveM-0001jO-0v for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id j26so2921314wms.0 for ; Tue, 16 Aug 2022 05:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=lcoW7Lzpi1sLzNSIYAaJ/EO/qi9Z5QpCbFBSmRllJwE=; b=YzxllfUqpgE6pDtlwGbkji85vJjbK3adYD81KbyQq8vDyHjj2ZCvR7VE/59qHOUpVz FYlzBLGZfs9/Dpox1a89gjjOsoGHXcp96yogZRuM4Wx4BpapRWV10rLum6T9OoWrBBgA 5U4xazV++38jrNuixxQhwRRyLm/hz+JXCmvkjzIkGRI4ANosOVysn0xEERuvPPmuGkhp dd6GvnDZEWFHibC7ubps3k2ewAHWm5ZluZSNdwZjXVPKQaNuEDaUDfDM+olRuKAluwBn h0FKW7Y5vbkwDpxcNS39/cg/jrA/1BomQogxyMiPcpLEGPWHQcEgYkQSVL6gqMp0wcmy 37GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=lcoW7Lzpi1sLzNSIYAaJ/EO/qi9Z5QpCbFBSmRllJwE=; b=sJ9mfpyYJ5hqzM/zz+sYiZxPrXZsZa74d6KRJX4xbUW5FF4tMLqdKC1bVzBxjMV2Lc 2fuBIe+EgAtRakqJOl1fP1wcuPoK+le0iNmf638KGEiPTaOkaZFBbO2snn9Tg9xzTi4h aVHKAji+HNEtOxcONxr0sXSV38G3glpbHy4HMz+Nu+tr9sM7+7lk9Q3Wq5j5ZGZDy49h R+9zza3dgDOpdAJCom0U6xE68PlArrJO90zpqlI6zFf1oxHeeCmw8ClWEeUjvJVD7bYk 15tC2YDtDg0F7kgK6feUGo+BNU/g4ew0NFQG7GZyu3+u5bm1zXQsR63/e3UXk7PUjq3Y zKdg== X-Gm-Message-State: ACgBeo3BrFz0JfEdeOsa4QCu7YtoZxf2HEQPCi821pnugnBeFdYHk/58 +MmZdP4cnry6Yhs6TOsDAVb6Vg== X-Received: by 2002:a05:600c:1551:b0:3a5:e40b:1477 with SMTP id f17-20020a05600c155100b003a5e40b1477mr8332317wmg.16.1660652784523; Tue, 16 Aug 2022 05:26:24 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id m8-20020a05600c4f4800b003a603f96db7sm3640742wmq.36.2022.08.16.05.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:26:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 00E531FFBA; Tue, 16 Aug 2022 13:26:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 2/3] tests/avocado: add timeout to the aspeed tests Date: Tue, 16 Aug 2022 13:26:20 +0100 Message-Id: <20220816122621.2066292-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220816122621.2066292-1-alex.bennee@linaro.org> References: <20220816122621.2066292-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" On some systems the test can hang. At least defining a timeout stops it from hanging forever. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220811151413.3350684-7-alex.bennee@linaro.org> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index b4e35a3d07..c54da0fd8f 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -40,6 +40,8 @@ def test_ast1030_zephyros(self): class AST2x00Machine(QemuSystemTest): + timeout = 90 + def wait_for_console_pattern(self, success_message, vm=None): wait_for_console_pattern(self, success_message, failure_message='Kernel panic - not syncing', From patchwork Tue Aug 16 12:26:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 597501 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp2346912maz; Tue, 16 Aug 2022 05:32:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5e37r+3Xo5soYGRbp+fsWvb36922lRyPinaexRkShdjZdyX4l4X7GANBoKZI3/6RnBwd2U X-Received: by 2002:a05:620a:c4e:b0:6b2:8e49:6b3d with SMTP id u14-20020a05620a0c4e00b006b28e496b3dmr14708854qki.67.1660653177300; Tue, 16 Aug 2022 05:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660653177; cv=none; d=google.com; s=arc-20160816; b=p+xEVlVKMHGpeWxlwQriDAAhwxq06REtm3yHq2SmNSsi9bDgXKSzV7gBo6rDS76FvF XBrevAjEaYYEOOtDX0FmIo1u2WSbAZgpNNTdhvj16xJzN3C0JLvbO83KRNouFcZ4xhId 5NRcrG/0073wDe1x3bFiCJowXRtfBowkfFDltlEctk3ioo/e/Ls7iOdAefP7zPlqemj2 NwdojClSD2uDkW2Mh0a53zLQugfhwGmWhIHLwfwEARy9tVhYZidVECNR/Iw0XuzkVmAR uy8fqjvQse6+989jPyStM0tv73X1UqyK69sW83zc2ZOs2B8LgMHLDNylRWJgBvd9g/S3 fVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qx6wBS0awIg5wJT+Q1AQmTWd+527vRCxS4thMsgW8xg=; b=IVomtbV4nbrM44b+HyrcwZUS6oZrPt/RK8eIbU6bcRmtkKHY1VNS9tULAoUmELo2+s ZPXv7NLZ7BGuOYOocxvRqnTToyp63+mFfZQn4/oTLzuHyW8ELSjHGSFz3vp6XnswZDdX qcJjxvWFfFbtFhmRTtUB1lE7ZUcvsEdTxQEPaqGkBk8C2iCco1PpejtP0hl+sqm671lq SJ2R4wZFeuH9L3NxHKu++aTJa2Dvh6VkW+Lc6oa+WUoDczdiGC3bCOT9hPwrov/5WQAk tSstI0TEGAI9gcVoutd89frGl5Cua0a+MZ6hNF0pLHI5vytvJsVSu6XSV8JWn8wdu9OV 6Kfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pti8qqDL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p16-20020a05622a049000b0034358b79691si7599179qtx.525.2022.08.16.05.32.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Aug 2022 05:32:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pti8qqDL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNvkd-0001FT-Sp for patch@linaro.org; Tue, 16 Aug 2022 08:32:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNveQ-0004jj-HD for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:30 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNveO-0001js-6q for qemu-devel@nongnu.org; Tue, 16 Aug 2022 08:26:30 -0400 Received: by mail-wr1-x42c.google.com with SMTP id v3so12474233wrp.0 for ; Tue, 16 Aug 2022 05:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Qx6wBS0awIg5wJT+Q1AQmTWd+527vRCxS4thMsgW8xg=; b=pti8qqDLiXclsQN0cICI/ZjmG95UnefekqiwFqmNALMjvvdcRY1P+04BKSO/VFRhqx ZgM3h9RoiLikS9l2RljNWHV7kZHSSd1R/YSoiU7SSYdUGR8tridjr17jFaQDjUF0tBgf Mqjx+ACPzmPphN0uxI1Y/XIJQsTirCBRWkr0htRP67AEvfH8yxJZyGThx7SqW6JMxFzE xVSnqiPTG5QbkqWzVSaCUFmJRZ1DYCyRmjiOfxN4TNIgYmG/JJjenWCZtWEGdVE9BPo3 HfBxc3OwUK+Q6JBJjevs21SRVrAcH+5ggF+w9n4+tKsglcAurMzKpvX4OxLadzaj7UrC 178w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Qx6wBS0awIg5wJT+Q1AQmTWd+527vRCxS4thMsgW8xg=; b=t6dFufj6kVcMPWwvKC2H0BjFoD/rDX5LCTbYKaFprWCaFb3o3h5zEaYNmy39kOevSx fFJEzxiWW4ZS6SQVguIKi2PmW4gjpbW+BSVwf4XdJO/muYaSQMmx2sIMYD8JFtPYW8VY b0YxlgR3Mv1acrjByf/IoF70Z1SSLlNd1Iq6FG0MkAz72HYO2Brxk1mzCwLbSIHqtciC ZuPX/SCZ8vGOSBRpddW8CXZ9+kIvced8b90rV8eU+f/TsLsH0s0S60je2fTsrEYxq9uq rEL8mqxIRFgqOJuZk3xGnMXRp77hra05EaMaeqItXQH1HmWdUKF1lBZ558lEJVpQXTJE bVOg== X-Gm-Message-State: ACgBeo0zTWajdeB31+dwW7clpl5ErKzmRh7s5zGce/iENo2cW6uTfZYM MdTgE+kq6rKoWVAVdv1QOPCfkA== X-Received: by 2002:a5d:6f17:0:b0:225:325:59cd with SMTP id ay23-20020a5d6f17000000b00225032559cdmr5813768wrb.83.1660652786746; Tue, 16 Aug 2022 05:26:26 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id h3-20020a05600c2ca300b003a5ea1cc63csm9238720wmc.39.2022.08.16.05.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 05:26:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 182771FFBB; Tue, 16 Aug 2022 13:26:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Cc: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , John Snow , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 3/3] tests/avocado: apply a band aid to aspeed-evb login Date: Tue, 16 Aug 2022 13:26:21 +0100 Message-Id: <20220816122621.2066292-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220816122621.2066292-1-alex.bennee@linaro.org> References: <20220816122621.2066292-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the login prompt has appeared so we don't accidentally spaff the shell commands to a confused getty in the guest. Signed-off-by: Alex Bennée Reviewed-by: Cédric Le Goater Acked-by: John Snow Message-Id: <20220811151413.3350684-8-alex.bennee@linaro.org> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index c54da0fd8f..65d38f4efa 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -101,7 +101,9 @@ def do_test_arm_aspeed_buidroot_start(self, image, cpu_id): self.wait_for_console_pattern('Starting kernel ...') self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id) self.wait_for_console_pattern('lease of 10.0.2.15') + # the line before login: self.wait_for_console_pattern('Aspeed EVB') + time.sleep(0.1) exec_command(self, 'root') time.sleep(0.1)