From patchwork Thu Aug 10 15:36:38 2023 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: 712364 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp722789rwb; Thu, 10 Aug 2023 08:39:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiH+Qq5i3MS7zHCkdqbFDdyNj+3lEc5zB90AEOLTkkh5zS79iL/NJNwB3kUSKFJpTuF3Jb X-Received: by 2002:ac8:5c13:0:b0:407:c2e2:2a06 with SMTP id i19-20020ac85c13000000b00407c2e22a06mr2767693qti.8.1691681967962; Thu, 10 Aug 2023 08:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681967; cv=none; d=google.com; s=arc-20160816; b=Eh9YnlhoHmDb6QrIyBqPwv4P+vSEFXMtvaSgF17nD6ihvclejuZDvXWCuj6rLUzQFp lkqTyE1suNZyHxveNaNDTD6fdZitX34lVaO75+wCPed3LdmGzp9PjbqvkH29h73hIYSK BcPfdduIWs6EDM1Xxdk0IOBMKWfVUTvLCgQC4Q4EJahLJY7NFfcVIqu7ChG42sOR4IDb kIpgUp7zbjo0UBVhp7onQNSz9DAezSurC3V0pQABLTl1WuqqpHxW3kzC6xyka2pvwfvK kfyLQz5XMIGNPaOVR0yZM9ChdiBsDhvUssPOup+/ctOEtCSM0eUtu7s5Wom+zqbz5SBC EzvQ== 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=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; fh=qB6qsUxbxKbTZmjsWUc4Ke7azY87y2Vvvlw9q2TjVaE=; b=JeG/rVWr6munMsU2tDQvB1Nk++rIjuVo998c5ovw62m6/hV33MDrUtod+920DbxTqr IFPdMl+46jG7/7SrMrJVYlEm7whtleDcKjXovI05AnZ6pY8u4SsjhOKwGQ28crIvlOc9 Qp7HV04XYJKc4s9631DP5/OlpcMxnE3Em2q6yIo3+iBf8kHcdXkD/SrB9AnTDkwuMS8E 1tTMsUdZcRUsuuLBR8wRJbLWqKB4J/j5n2U8rIJKubYfu2Di9ZeBJkMBMxAeySB9Kk5X uxDVdLyjQatvxbuTMR00ylCx1nMtl3z1qQjAPUj33qEK+77jGU2UEidwrni2UIqskyVF p//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h3nj/RX/"; 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 l6-20020a05622a174600b00403f05af810si1109012qtk.64.2023.08.10.08.39.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 08:39:27 -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="h3nj/RX/"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU7iY-0005PM-ER; Thu, 10 Aug 2023 11:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU7iV-0005MT-S0 for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU7iQ-0003Em-9U for qemu-devel@nongnu.org; Thu, 10 Aug 2023 11:36:51 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b9ba3d6157so16122561fa.3 for ; Thu, 10 Aug 2023 08:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; b=h3nj/RX/PEBMGORRsUbFI+KHNK8wIaqFIm9SzLx3IjDxRl0jb+QuZhpiW3teTbcfg6 E3PDpgaFrplq5WN2SUvJF6yvqcGP5fJ1dOh3LxM5VMG/SNRT4c/bKr2pPH7bLmbTwfVV MYwk+w19KETrxyA6AM55Gjd6bltBVB1bNz4JeCcnRx68GeNwANgl7WrEAgoVb0WrzPKl 5zv9fkpVQuNjZB8VLhymMm+Gs21b94erzYQ+XkN6XU78H+RbEFAZ3d8Z7RLgZawXVpaF KENHZDcCDwdJwFXag+RXdA5gu9v3lmCT34Jx4q790KQu5G25Yz3SyYv7nimdRTLR4AhD DHDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691681804; x=1692286604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pWHkl2jpAyxPACNnTV5P1s0rijLChl436ygUcdDaXic=; b=E+VSDc8Wfk9wYEOL5OFFtXwBsN7PJZoRX8p8SGBOnUZgjNnSW70t/6s7ONc59rNz7C 3QuvD89HiQfU3ODlWtb6p0fMZS8BJDlNnks1UdH6Kriwh9Bx4ksbfsV8l+pwlBILBj+V t1QxBMAyOTVdArrKwiuCXvaWFqXxVvByr/6SB1ly0UAVScZhh51b2B8o4y2OUILN+ytJ QSSb3qICdRCEmfhMB1PR4LqTVvgsB/CT6hDK/XQBZ/DsstXFo577mzdoH5e+xav0LWRb vwPlOIjNwVV0meeOY40KTRsqElDR1+S2G9x6taxhHrG+sZgBj66Lz2fKKnWDlqNouKEK gJzA== X-Gm-Message-State: AOJu0YyJB09IBhTWXVNRizt68KgUc1ERcm5ECcxXNh8i64dN9fA4zeub 6ZDChapZBg4KnZT+6oCSnT+6ug== X-Received: by 2002:a2e:9190:0:b0:2b9:ac48:d7fb with SMTP id f16-20020a2e9190000000b002b9ac48d7fbmr2385872ljg.41.1691681804724; Thu, 10 Aug 2023 08:36:44 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z15-20020a05600c114f00b003fe2bea77ccsm2504470wmz.5.2023.08.10.08.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 08:36:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F52C1FFC1; Thu, 10 Aug 2023 16:36:41 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich , Yonggang Luo , Beraldo Leal , Richard Henderson , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , David Hildenbrand , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Wainer dos Santos Moschetta Subject: [PATCH 6/8] tests/tcg: ensure system-mode gdb tests start stopped Date: Thu, 10 Aug 2023 16:36:38 +0100 Message-Id: <20230810153640.1879717-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org> References: <20230810153640.1879717-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22a.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 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-bounces+patch=linaro.org@nongnu.org Without -S we run into potential races with tests starting before the gdbstub attaches. We don't need to worry about user-mode as enabling the gdbstub implies we wait for the initial connection. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/guest-debug/run-test.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index c0d0075e2e..b13b27d4b1 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -69,13 +69,10 @@ def log(output, msg): # Launch QEMU with binary if "system" in args.qemu: - cmd = "%s %s %s -gdb unix:path=%s,server=on" % (args.qemu, - args.qargs, - args.binary, - socket_name) + cmd = f'{args.qemu} {args.qargs} {args.binary}' \ + f' -S -gdb unix:path={socket_name},server=on' else: - cmd = "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name, - args.binary) + cmd = f'{args.qemu} {args.qargs} -g {socket_name} {args.binary}' log(output, "QEMU CMD: %s" % (cmd)) inferior = subprocess.Popen(shlex.split(cmd))