From patchwork Wed Feb 19 19:23:39 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: 866445 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2241999wri; Wed, 19 Feb 2025 11:24:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXa9WgD+wxw4LziNPuF5VUZboNcX42s5d24jikdCmEn3XOlbxRS/s1e0t8VoQPvb4NFbxw+Dg==@linaro.org X-Google-Smtp-Source: AGHT+IGfgPxl7BOjv0BlNLIwcFvwGCoqjLmjVgqapeqAzMKXtzpzOqoh8s6BUrhH64cP8JX0s+Pd X-Received: by 2002:a05:620a:4108:b0:7c0:6139:8f6d with SMTP id af79cd13be357-7c08aa8a437mr2474059985a.46.1739993070962; Wed, 19 Feb 2025 11:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739993070; cv=none; d=google.com; s=arc-20240605; b=a3MaV0ve3+bwbTpDMLrxb3qpO+6yAWIScc0PF7KMMfj72a/QKbxtMLFp4x55Z3pfS9 04tnxmE4c+wLVZiknGnS4zOPi6BwAK0+xJEfsuhQNMKOurmYnVQj7oYijPtZxNRPxlNJ xHUQe/+eWb/O40PzsehOVEEusLq/Hlg/V3zFSoAKKkSs4iIRdebisz/JmPVzeooN2abX gFWHgxYDNKOISIVlwZSnqH8eNBzbRKTyI34HkQrDYHL5QDCs//dBDqoNck75J7mnrwIy eo4lWxtblQt8VRUnqHsu9sRJYBq5e8UZBZenN45HQAcqKA1qKCBbUBIgAYZCvHlxwk/U VIzw== 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=XAdS2AzhgVB27ZZVS2e2BP8pQ8iWHjSm4H3O9eLeBHQ=; fh=PGdGaMLJ91kx0FefE54gNgxptYi4rn/rurKWCclWpcE=; b=g5uhG7ifpiEuN6maxl4Mcc/4QNic+m58+0D73bLOBcov0XDMybs2a9hzY8DvE3/QEX 7VEDGmxJsLAA8cWdIzfqJiq7fMIuJCQNlsN+IaNBeu/objbZf7fnKoz3AkD4CxeOpGaF DvN4mOLm9F6g9kcQIXbwndyXdgLW2/jZ+iGiE5HzHhdP2I7qgy1RZZseVJKiPO9wJYRB qCOMaDIjvuiQU98OQKPGlLE3nKT1F8qiU2nvusmHP74gf2kF5y1O0/OcCZpqzfyHxOC0 2np8RRwyPYlvS2u7wohwgonTq0kSByb+hdNY++nemB771zAQnjvR3IxmVtb4qdDMgAId K8bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K3oylEzZ; 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 af79cd13be357-7c09fd58bd3si604537585a.84.2025.02.19.11.24.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 11:24:30 -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=K3oylEzZ; 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 1tkpfn-0003ys-4L; Wed, 19 Feb 2025 14:23:55 -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 1tkpfj-0003ya-K6 for qemu-devel@nongnu.org; Wed, 19 Feb 2025 14:23:51 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tkpfh-0002Oy-Lg for qemu-devel@nongnu.org; Wed, 19 Feb 2025 14:23:51 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-38f26a82d1dso80569f8f.2 for ; Wed, 19 Feb 2025 11:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739993028; x=1740597828; 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=XAdS2AzhgVB27ZZVS2e2BP8pQ8iWHjSm4H3O9eLeBHQ=; b=K3oylEzZlb0UGpcvR0VlbzuOBRt3R0zRUHd2FaHXLBMuXX8DDQjsDWzpe7hw2TU5cF FD6P8JIrxqtMYHTo+WyAARq3ig3TFjsn/YPN1NGZzu26jsz127LBCQUv17E03CbOLb/d NtI5ogp7cKI2tcpY0a1BDiSaTJOR31symlYbUJhXbHagh6sMCZXZ9ACzoSxCuQbbOg/z gSA7YhlzosBn0Z5X0YnR2glQa6LIst0n2kr33/LZOVilcslSgSKYXDRNSCsxSS6Xj0U3 9M4lsP337SUCWhPlVSJj54fvE8n5XqYQL3ICWoM+0NJjVPpHAzv4zKKmvvzM5wcthos1 lViw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739993028; x=1740597828; 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=XAdS2AzhgVB27ZZVS2e2BP8pQ8iWHjSm4H3O9eLeBHQ=; b=JE8FolBOLjQC9HxVGvbG13p8H+EwkfySAWpfxyjZ3tDFIDZvfmH9pU8AmWoPNQB5tE RJevIX+zo9+CPRCagDNVCWw1XcPH890/L+ISCSINW7tOKGiq1WS39t3Ng93wtGAZ8m/P dXdYnsfVid6S+iJtcYkQS+zMRqrzkaEadObPQ3l9sBU7Ke0VV3TUzxsQ41/5ur6t5R0S AWqcXI/pQMkab8gZVXb0eoEor55tFSCMN7nI+K74ZjMgGEL8Qb6zRC6VSjr9N8wStRAv 1PDvirrrq9+yj1yfoWsSzLmx5jWpc60esbvlDhY2M0CxNIQSpZPiDCWQI2xWMdHdU8Qd CntQ== X-Gm-Message-State: AOJu0Yy7s6AN/+KE1DkypltovYhQwFpCUNSKb4+p06WQhglmj49Ih23C teGvzG0Y1FKiK3+CKX6D3DfegQp8gGMjecWMkMNXuaVm5RTb9QO+3JDYRKtLXqRrXGOKsrKfSay syRA= X-Gm-Gg: ASbGncu+hubCb3pzx7Rqnc0BRwyLaXZjJ5DV2vsPfLv3dB8gDqfFEwcXJqyRL+kMa8t rdaFrJqmngdwJxU8YnlGMQykL2DufaZKr0TAmlJFKgTQRe4SmgdsGbIFf78I5tcMSad1pYnQQbM sHskS3rr2t4NVyS/PWHUoYqgUB0cilgcOPLK+tO/8Ae2rwbQh4NvDL512oBKbrk3NeZzCJwc58u 2vbOAVlPD+J0xXv60WoApFOotYsNkEnq6cAUiAcxFj5pqaryJsv4q11d/6/sEx5lx0lF3v5iQt1 m5NE1jj9+b9QRWodn25V5MzM92lmR07O8SH5xPS9jkzOIuXaqhpzsc1yx0cxNkG46w== X-Received: by 2002:a5d:4cc7:0:b0:38f:2bd2:45d0 with SMTP id ffacd0b85a97d-38f33f58d98mr15577888f8f.51.1739993027694; Wed, 19 Feb 2025 11:23:47 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259f7df2sm18610709f8f.84.2025.02.19.11.23.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 19 Feb 2025 11:23:47 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mahmoud Mandour , Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Paolo Bonzini , Alexandre Iooss , Yonggang Luo Subject: [PATCH 1/2] tests/functional: Introduce the dso_suffix() helper Date: Wed, 19 Feb 2025 20:23:39 +0100 Message-ID: <20250219192340.92240-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250219192340.92240-1-philmd@linaro.org> References: <20250219192340.92240-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py index 5c972843a6d..e253288ee7f 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -8,7 +8,7 @@ from .asset import Asset from .config import BUILD_DIR -from .cmd import is_readable_executable_file, \ +from .cmd import is_readable_executable_file, dso_suffix, \ interrupt_interactive_console_until_pattern, wait_for_console_pattern, \ exec_command, exec_command_and_wait_for_pattern, get_qemu_img, which from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py index dc5f422b77d..c4704dfb7bc 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -14,6 +14,12 @@ import logging import os import os.path +import platform + +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()] def which(tool): From patchwork Wed Feb 19 19:23:40 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: 866444 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp2241961wri; Wed, 19 Feb 2025 11:24:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUHoT3gHdszE65diXqDfFA61pCzpLgXLcPPHBqUf+m8ww8OFAKNPSYOoaQLOaLVkyznuWNqlQ==@linaro.org X-Google-Smtp-Source: AGHT+IFlWDITNQIE3PykeGRLxKW7zKQkefLcTXdpm5dZFQyvPNTHFN9kBHGu2Kznp1mz6YlxD6Dq X-Received: by 2002:a05:620a:4714:b0:7c0:af78:17ab with SMTP id af79cd13be357-7c0af7819c8mr1052465585a.18.1739993063668; Wed, 19 Feb 2025 11:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739993063; cv=none; d=google.com; s=arc-20240605; b=EC0keFk4TIqCuWuRsMZZk6lCQOrdradybS5ouSirWLxdBNRaYPLvorapAALt+uR6f8 NGW772wNsvNL7uBwAfzSBW0NjDX9m1x8BwLSXJ3a8wvXV4IUiL6u88e+Sw5TnQgnavYA teFzygtqNLdHMP0wgvldtRtIoK7MjP8fTt1r6jv5DPeA+8Kt/xoe7Z9MCmHyXIBaeUht I/b/DdzubT6mb4kpFoJOUy3I/Rk2h+S72AytAKTHzMXZCctzQxRmbCbxGxW70jFX1lj/ 0nidbCwIOaa7fGEOsdov1LmMxzI3TJ+hdeUebeHFjBNSMlIqv2FsYD5wqHJv0JdAhXHG 4/tQ== 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=dpCypAtbAdRfHr1nP5vbTeramo1Dr981PUBxWlWPTN0=; fh=PGdGaMLJ91kx0FefE54gNgxptYi4rn/rurKWCclWpcE=; b=YrAf0W6RSNKiTOphq8o93Dp+UhlqCp7EDGzDE2MwLHEaCJHJjcsC5IMtP/9st5XQOz E4meEzyVDEfGkOk88O+fzsNzt5Zmt3hphBDbH9lxPtTQbWEemHTRIBm6f2Ahdv77Cb84 t8W1msYPgZX05Zp/GbufnZO4QWACrtx6w1I+Ue9Z14uiyT22yPXqQD3HqGpDBsTW8YIz Onh+RhL2l+FBv8ZeEGBgPSGOTns6W2Ucfvilcq2xrMbXuoxVLsxcPxYpd4rx32oMX8sP Wvgys2QmLNM4nINwIREPbx3z+xt5FfOzePD2TbRiqJHD43JA8dbVR5CTWhfBdGbMhfHV ZdNg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lxuIgT16; 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 af79cd13be357-7c0b52af21csi225544585a.611.2025.02.19.11.24.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Feb 2025 11:24:23 -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=lxuIgT16; 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 1tkpg4-00042W-Dm; Wed, 19 Feb 2025 14:24:12 -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 1tkpfp-0003zV-NE for qemu-devel@nongnu.org; Wed, 19 Feb 2025 14:23:59 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tkpfm-0002PD-NY for qemu-devel@nongnu.org; Wed, 19 Feb 2025 14:23:56 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-38f1e8efe82so187538f8f.0 for ; Wed, 19 Feb 2025 11:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739993033; x=1740597833; 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=dpCypAtbAdRfHr1nP5vbTeramo1Dr981PUBxWlWPTN0=; b=lxuIgT16SpXPlM/5NfOLFvVtmZcXIKdD8+9kfVD6Vf3fqpZxVOpBaegi+Eot4eNzLx 4UbOSCIk9KmW99F/wMjkcZ2aFtG0tjyBPqkLeGUMeYWb/46g52bdi71dxhraOSeWlOxW 8gV4WNpVSjR7kkZqGsIcDeETcuahCdeUlKVgen3kIL1TNZbEMMF1RUzvg4tczmU28yDu jsfh16tPY/2yG+ZWJU7NOO06cIANc3JSVGxPFuEn9jcBHYEKNvXTFjCoxwSXiRvuO8ms Y4Y7CeTEpjax5EatdJbIvKutAfY5gjolGT2Ytzb9TaxDXf88hl2humDYiFUkTEtxG8mV RckQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739993033; x=1740597833; 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=dpCypAtbAdRfHr1nP5vbTeramo1Dr981PUBxWlWPTN0=; b=P0tV4lDp3GpLsT/mawVv4ZTWhV9uhpHCmuKbc6flDCY2eUS2VBCzSHfQ8wUNSpQG3p mN+UCh7B6rXGjPySVpaFY5vBSxqh8QfObY039Xtw3hmYdKC8+8M+InDjJu/Eyyme53Wg 4MS/Nd1B/6LBiFzuEp7UDIWyHHZkH8k4XaPdc0XfvtvEWG0TRfaxKfn94szf7zDcNf5z uxSNtvUiNQAjMd2aYwZ+Ro5bJe04DT+2TdRt9FRspO3SFIpRLzQzvRw4i8eTzptq+CcO D0cQkMTWoceSVOG+AmcaosTcvR1rfPwaaiuECwvdbVG1ZpOPpNNxsx98fyFlPmHDtXAb yWfQ== X-Gm-Message-State: AOJu0YxOutJmO8wzoqoP4bXgOU88Gh78CAabTa1+Yyd/dTdihBd5uKvh DnHj+a2sE4JMauP/Bzc3CKcUOddKh3Zx099+Mw04FDUQ9DK7IT+t7dgeiNTWalWzpj1G8JlTxli toyU= X-Gm-Gg: ASbGncvKWSfWTl+YJNHgUKQPf5HP/SbpxUs/mDnStYtTBd/gytNkE5SJ0WdkNvkOtTM L8TClDrSVD31/5mGlWWRkC4O7/BMoeUGz77jKLpqmyWP9zBEU7WJxJKVrf2AYXjaj+fUnBqxNUE S2UhyJkyJ52gQQxtrP/c3IRtMtt8A5ytA7BlFl393hVFqGpAzd4aY2fX0SBrme0QTmrg/LZBE+3 YpAfDFCcAIIxxv4ZRLHnRh252sJaAe3qSISZSL2O3fyTqNhzQQd5zn/A8lFtplcQr8Vw4SeukGB ZUr2XozZsUSULPnmhiSSlX5+AP249yRFWs5a94De17XBxssVxYEpeShQ0QIEP1sgOg== X-Received: by 2002:a05:6000:11d0:b0:38d:af14:cb1 with SMTP id ffacd0b85a97d-38f33f58dbdmr15159987f8f.54.1739993032672; Wed, 19 Feb 2025 11:23:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258b44b2sm18385648f8f.20.2025.02.19.11.23.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 19 Feb 2025 11:23:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Mahmoud Mandour , Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Paolo Bonzini , Alexandre Iooss , Yonggang Luo Subject: [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Date: Wed, 19 Feb 2025 20:23:40 +0100 Message-ID: <20250219192340.92240-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250219192340.92240-1-philmd@linaro.org> References: <20250219192340.92240-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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 Not all platforms use the '.so' suffix for shared libraries, which is how plugins are built. Use the recently introduced dso_suffix() helper to get the proper host suffix. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2804 Suggested-by: Pierrick Bouvier Suggested-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- tests/functional/test_aarch64_tcg_plugins.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_aarch64_tcg_plugins.py b/tests/functional/test_aarch64_tcg_plugins.py index 7e8beacc833..306e46c7972 100755 --- a/tests/functional/test_aarch64_tcg_plugins.py +++ b/tests/functional/test_aarch64_tcg_plugins.py @@ -16,7 +16,7 @@ import re from qemu.machine.machine import VMLaunchFailure -from qemu_test import LinuxKernelTest, Asset +from qemu_test import LinuxKernelTest, Asset, dso_suffix class PluginKernelBase(LinuxKernelTest): @@ -62,6 +62,10 @@ class PluginKernelNormal(PluginKernelBase): ('https://storage.tuxboot.com/20230331/arm64/Image'), 'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7') + def plugin_file(self, plugin_name): + suffix = dso_suffix() + return f'tests/tcg/plugins/{plugin_name}.{suffix}' + def test_aarch64_virt_insn(self): self.set_machine('virt') self.cpu='cortex-a53' @@ -74,7 +78,7 @@ def test_aarch64_virt_insn(self): suffix=".log") self.run_vm(kernel_path, kernel_command_line, - "tests/tcg/plugins/libinsn.so", plugin_log.name, + self.plugin_file('libinsn'), plugin_log.name, console_pattern) with plugin_log as lf, \ @@ -100,7 +104,7 @@ def test_aarch64_virt_insn_icount(self): suffix=".log") self.run_vm(kernel_path, kernel_command_line, - "tests/tcg/plugins/libinsn.so", plugin_log.name, + self.plugin_file('libinsn'), plugin_log.name, console_pattern, args=('-icount', 'shift=1'))