From patchwork Thu Feb 20 08:02:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 866722 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f85:b0:38f:210b:807b with SMTP id hj5csp79327wrb; Thu, 20 Feb 2025 00:03:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVIDGC6RF0N09ilC28n1hyea5HxTCtOxhoy7wVIGOHZLqspdZHUAWG3Qd/ymIgoK3wCgwHG7A==@linaro.org X-Google-Smtp-Source: AGHT+IE2LDyOcmbapQ2D3B91WUK2CMHL2/8yJczsyf6gv90cUBVFy945W+xTNKJJkCl/k/4YwZN4 X-Received: by 2002:a05:6214:c4b:b0:6e6:5a8a:aba with SMTP id 6a1803df08f44-6e6974f98ebmr104593796d6.21.1740038594304; Thu, 20 Feb 2025 00:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740038594; cv=none; d=google.com; s=arc-20240605; b=Uoja5bimd0FyxbysRj25664TF57MOr4ltSDdJtn7AjD82y4Fu9ouuP5W1xr12AraxC h9zDmpedJVCacxyWdKiI4LT/YzqBcYSN52eS2u9wCcUYoHOcZ2UJLTw8wPtQbfHXxmxx iLQIemt4JsAB+wZDiiIOtPPDUV53BUVJcxw6G1MOK7aW61Z0Dzs3f5j5Wvvfpr+Y3AIq axkPYsUapTgCWGZnvxOHwId0z7kEzRrR/l+zQZFFc0vvylf37xdBu830vjINmPwazy3f Zc+Bn60C71BMoOY3zK94DRwBRccsFpvucfq8Wb0WfwHb6w2RDCVcn4QWsIrcaoShuNcT T/Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=TlxCO3OP4jHOxjhIDriULZskStv3lHgU44Xm50YhQ6s=; fh=kFzGdfcYPFuBXEyHFHPPwY1OgP3mj8o7jsJ3Asz+PGs=; b=HK7GsSypyyKnf0++8lyqVtxdlbSf5rXNOP4XKimodcUpVDdgXR/I+Sv8A9KmujWx3D GSCSwDatGJGeQOjjc/6/UuwZO2bwr1Ugr15gbJbr4rjcWd3L4IppydWboHqOr5dAHXW5 JpXpcR/hcuff6VBTMu2egcq+f9bkXRbR+xWprKcSQAHW2nad1zhnlP22IS4xJjQ3FK+g TiARRFwFTAR3Pw2yTEkBlkQbWhBgA7bi4U500WBunFJdrZYUZEySADepH6+EzwS9/Ny0 zzfZf1tvY23xMEYVVF4PZpibOHpYgSTooedoIdrOFSIgbFb1XlYOFoGvDWwt0/mDEFcy 2q9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ezRh1XB2; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e65d7429a2si143823826d6.159.2025.02.20.00.03.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Feb 2025 00:03:14 -0800 (PST) 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=ezRh1XB2; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tl1W0-0005mf-AT; Thu, 20 Feb 2025 03:02:36 -0500 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 1tl1Vw-0005mK-Fw for qemu-devel@nongnu.org; Thu, 20 Feb 2025 03:02:32 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tl1Vu-00050s-T0 for qemu-devel@nongnu.org; Thu, 20 Feb 2025 03:02:32 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38f3913569fso1022223f8f.1 for ; Thu, 20 Feb 2025 00:02:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740038549; x=1740643349; darn=nongnu.org; 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=TlxCO3OP4jHOxjhIDriULZskStv3lHgU44Xm50YhQ6s=; b=ezRh1XB2EME+0KMfL19cuQSvMmbOfp9JiJsNr08arOYlDDg9p1dfYWaAVauVkPWhSr 5dl9073nVCIoDpOJFRz2KBwlf4HC34zcBMBUjoH3KjNEx5PsbHVA2w+TEYqzDIHy1M/M K1Ttl3HxusVGn7D5itat+kBMvM4yyww1lunD99l28XGEd5vhcGWc0NHzz2veSNZy/64O 5rfuQglW8jyEJdLwYxJShLq2fPQPcPs6/6fEs85b+DZKtLAxt522tMuIqSCI0rG2y7ra 4h6CDbBLPdmBC5gZHE23FeKutysftN9q2d12MASSCmeZsfnA8sPt7nvSACI1CxTHJ2qJ pQeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740038549; x=1740643349; 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=TlxCO3OP4jHOxjhIDriULZskStv3lHgU44Xm50YhQ6s=; b=FofKus7aDI3xpfkGopEy4ldGRj6g3oDqcXWqLo8p1gVJKLwDcWN2hp7pOA82iqxsvu 3TETsuTIm0ipsOoXYSCiSuSeFXrAn86woEqx/pohL7Cn5ndNXPZWbX92aDfcxNs6xFD7 kBMp93BkRee+d6N09IFl3nB56/Fmf3zlgZYeoYPqkr+1dg5/4LygdgSXfwQq2BI2grIw N0AMlVXJKmv8C0nmbjwwTFJJ2BzDigbXItV5wnbf0AqTo7+E7bP5Vw5jAuG6Ynlf9VvJ 9nkdnGbX5dsUxXtZUFVmLU7wFc0R1Z0P3sCCR+bpb5yZccd2iNomVtO4uRbSlQ3Ukt2G f11Q== X-Gm-Message-State: AOJu0Yy/+L7lXVOkY5Lhk01r/ZXb2c1k9ESDDAEZKIAtYUsf1ZwiNJ5C 1k9qVxeVdoDJIm9MQ9Jhxl1MMK0eyJ0q1vVAI9Iyo2Zeayb0r74q1OQGGIqXHE8Qr2ZQKbcrgou vCxc= X-Gm-Gg: ASbGncv6J5YrqzUso9Bb6SjDJDQ6+J6agaXTRV+bN1axOd/IqQr+6ctd6AU49v7UWHH eWWfM5gTNgdas5Z0djnOUVzI0n4ctGCpaPhRz3jcf53kicPuVvz4BeJjR7eTZv82kep04x+kGTG 1yif+w94Nqnfg3q+YPZ5ncXh+EGewDNNdfv/qztxx49jGxLfEgLYsLdzskgc5NUwwTLh6QVyWfD RLrw1dBz9rZiWTCKtGtuuU2+uSPxJQra8ZPafASbQ6Tr02nDTHojGkVv1lAgpALV3DhtZ1zNJ6z YrJpu+Mj+2omdqJtPL091cCS25X4e/L09atpCKkvRB1X6Cn7blfSG1P15ov56G5zkQ== X-Received: by 2002:a5d:47c3:0:b0:38d:d59c:c9d6 with SMTP id ffacd0b85a97d-38f61611400mr1853120f8f.21.1740038548901; Thu, 20 Feb 2025 00:02:28 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a055910sm233020165e9.9.2025.02.20.00.02.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 20 Feb 2025 00:02:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Thomas Huth , Yonggang Luo , Akihiko Odaki , Pierrick Bouvier Subject: [PATCH v2 2/3] tests/functional: Introduce the dso_suffix() helper Date: Thu, 20 Feb 2025 09:02:14 +0100 Message-ID: <20250220080215.49165-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250220080215.49165-1-philmd@linaro.org> References: <20250220080215.49165-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@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 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 Introduce a helper to get the default shared library suffix used on the host. Suggested-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 1 - tests/functional/qemu_test/config.py | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py index 5c972843a6d..45f7befa374 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -7,7 +7,7 @@ from .asset import Asset -from .config import BUILD_DIR +from .config import BUILD_DIR, dso_suffix from .cmd import is_readable_executable_file, \ interrupt_interactive_console_until_pattern, wait_for_console_pattern, \ exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index dc5f422b77d..254e23ef748 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -15,7 +15,6 @@ import os import os.path - def which(tool): """ looks up the full path for @tool, returns None if not found or if @tool does not have executable permissions. diff --git a/tests/functional/qemu_test/config.py b/tests/functional/qemu_test/config.py index edd75b7fd06..0eab1baa541 100644 --- a/tests/functional/qemu_test/config.py +++ b/tests/functional/qemu_test/config.py @@ -13,6 +13,7 @@ import os from pathlib import Path +import platform def _source_dir(): @@ -34,3 +35,8 @@ def _build_dir(): raise Exception("Cannot identify build dir, set QEMU_BUILD_ROOT") BUILD_DIR = _build_dir() + +def dso_suffix(): + '''Return the dynamic libraries suffix for the current platform''' + DSO_SUFFIXES = { 'Linux': 'so', 'Darwin': 'dylib', 'Windows': 'dll' } + return DSO_SUFFIXES[platform.system()]