From patchwork Thu Aug 10 18:08:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 712370 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:baf:b0:129:c516:61db with SMTP id gf47csp810797rwb; Thu, 10 Aug 2023 11:09:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQWO2FecSxBuYPYzr/mt2g4+w6p18rQih1tyA08CWqXkAnZtto54xhFweYdyPw0WZaKC1P X-Received: by 2002:a05:622a:5a9a:b0:40f:2e2c:6df4 with SMTP id fz26-20020a05622a5a9a00b0040f2e2c6df4mr4361124qtb.6.1691690992075; Thu, 10 Aug 2023 11:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691690992; cv=none; d=google.com; s=arc-20160816; b=GA077oxDk8gxT+NfG4RnxslhyZUsqcN+a1pRD/r7sKoopEc6G/H0/HQFs0tHPuONO3 /L3JbR/GL3UkCwHBvVQh96h46/7pWsqVZgbi8VLGtiPIcnHAddtHRcw8fXauJe7Qjd0U Q2Ebfz6OXor2WhHqSI6LCW3Jcqt1kSMlX9saU8B12psskEsIN7r8bAgqCpcqDHIbc0+p ZXHIejgMO19uNcI9SXWVGxS6FuAsGfMVeVZmF/+l0/4aWkIMCEJ1xRY01K5o2am6FwYP BDjpjVr/DhGIK4Hd8TG6B87ouwjFVZSlHWvVqh0UP2PD1fDBf7SquK8plJSwkh5MBP90 OhkA== 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=fo39w1Ncf4bpUzNN7kkWxqgkT7EH9KrCL5R8N2HXRgE=; fh=P0V/Y70HKiPuHhoCuPJxmK0kQFpmXwOOVIu7VqYXDLE=; b=gcO36qU2zmqjOMtxLF2KX2C06eE7M9+GRazQIoHFFZikVOdPq6751FqjgyLNSGCFEY cOqE9aLm7SKkdOdGJCv6KlQC/ndWxxVqb+NkOskvuizz/vZoeEWleQKa78LXDFzvCpMD CKfIvDUIyTEMh875MjAnErsDsER1dp0tQnaEpagh4hxotpM33Lg+z5G+Ja1gHAvHsGoO DiD2FKYl2KCI1oS0iVDdgwdSC05owy4GytYnHb605nN9gDW4lcl+yp6tMiS8y24ti79G xw73xZEgX/J09eQDv5xgE/mhrea1Iq4cs1wtOWCTuRqfahbi/EVFOKnO/7zBoe4XT2vY FFgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="De5lx/fQ"; 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 u11-20020ac858cb000000b004036d2abaa9si1268534qta.52.2023.08.10.11.09.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Aug 2023 11:09:52 -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="De5lx/fQ"; 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 1qUA6A-000242-94; Thu, 10 Aug 2023 14:09:26 -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 1qUA5s-0001yc-DB for qemu-devel@nongnu.org; Thu, 10 Aug 2023 14:09:10 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUA5m-0001y7-Di for qemu-devel@nongnu.org; Thu, 10 Aug 2023 14:09:06 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1bc0d39b52cso8858485ad.2 for ; Thu, 10 Aug 2023 11:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691690936; x=1692295736; 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=fo39w1Ncf4bpUzNN7kkWxqgkT7EH9KrCL5R8N2HXRgE=; b=De5lx/fQBqDRIGzs7BXZmBUhFKVgkX4zg/MSoiNOzZjflBt9LZGUPKMhMHHsiac0/l sEZAVZFc6FAQC5M0cJFXdurVAhelCFyRXo+yXexiFVj7/ynaNsdiftJg+AMOC0ZAqe+R HpH36TkUaUSB47DBkPlsxg8DqmTmj4J7VWUZXXF2wbRh0xzEXPavNErGyuQj3ZbePFdG 0/mAeoa+UiimoC/35cM3AmT67x8OqlfaoArVkIV9WiJEvdYCUeuoOsMi7Ny9v91OnXwf ZgjOpxbgjvlgxIRhhIIdOdPI0/MKP2DuvUYNnFVMLq1Mv7rG7k5wIoI1ciDG6w0L2RTT HHhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691690936; x=1692295736; 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=fo39w1Ncf4bpUzNN7kkWxqgkT7EH9KrCL5R8N2HXRgE=; b=mHaU13qctogNUzhtDqjqg2DaVy9ioXRM2HUADjSeWLF/SGZBtfoljEX7ZLpzil0Vwc oe1Q6tHtlPSNKB21mvBW95A/CedNlx2zGp5Aq+WpW0Ivc5qiFBToQw14XaFSwLvPzdia 1DOMFuqCol7fvdGe3Kv2VOIqNtdk5+NR7pIBckLPmt4aGWQcvLZlcOCrq99/sxRetw9o yD9lg+enZHKEXJfzoL4mcTddJObto4dTDLvA5L9UlD4f6mhLfZ7aZVx7xK66yVJLU2W6 TWwrVk+cpnfspAiyPw4j0KXrd+UjrkmyjfmWPV4SCfnGkjSAsMexSEGBTUrfGgxE4f4/ oAVw== X-Gm-Message-State: AOJu0Yw7v6+cpQEfq2nNmtu8DGTa26ELkwJB1MlxsUl/mexYBra7Bzzr 6W9Dkrqk7UOK3pAE1hjXCM5CyEhUkjMqgSdFPB4= X-Received: by 2002:a17:903:234e:b0:1bc:8c6c:217d with SMTP id c14-20020a170903234e00b001bc8c6c217dmr3234350plh.61.1691690936363; Thu, 10 Aug 2023 11:08:56 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:9e4d:b830:d4fd:9164]) by smtp.gmail.com with ESMTPSA id b14-20020a170902b60e00b001bd41b70b65sm2085212pls.49.2023.08.10.11.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 11:08:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PULL 2/4] tests/tcg: ensure system-mode gdb tests start stopped Date: Thu, 10 Aug 2023 11:08:50 -0700 Message-Id: <20230810180852.54477-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810180852.54477-1-richard.henderson@linaro.org> References: <20230810180852.54477-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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 From: Alex Bennée 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: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230810153640.1879717-7-alex.bennee@linaro.org> Signed-off-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 de6106a5e5..a032e01f79 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))