From nobody Sat Feb 7 07:11:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769524135; cv=none; d=zohomail.com; s=zohoarc; b=hiSedmjySnIa2wurZMZiNBzWhLFE7kGvmHAS25q1llixeSNiInkbHhrdglzmneANra6Nle/T+aQI2lKeCMDFMSSPXcxQ7tFABQXnzAq2JX+MWLpunoPZ5tbXtrfYi8T52YP8oY9AKxRusUajAxCPUPSRsUaiM64dwdhHsaF0JIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769524135; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3gcl3Dbzs1jyEG1yBKpjfMi+5eNyPUahQKGJSe7GrLo=; b=T6lSlI1I99p1+hb4dYpscC4Y4N6Z3DfXIV4OAi0bs9cJrYhQbgSHXseRItFdLwMRCU0aDNNsf6t8PCN5z2LqnHMonIoYsWMabpDXnW0ym+L4QBL551gIjKY7bHBDoZeQ4KGx0U2rI3qz9U9tAI6EkpR5Mj5iIEfZHElOeJgIPfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769524135446924.2366030475546; Tue, 27 Jan 2026 06:28:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vkk2h-0006Hq-6L; Tue, 27 Jan 2026 09:27:43 -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 1vkk2R-0006An-Lz for qemu-devel@nongnu.org; Tue, 27 Jan 2026 09:27:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vkk2Q-0003bH-9N for qemu-devel@nongnu.org; Tue, 27 Jan 2026 09:27:27 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-10-bth3LGysNB-B1pruoLqPMw-1; Tue, 27 Jan 2026 09:27:22 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3AB0C1800370; Tue, 27 Jan 2026 14:27:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.209]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 926A818001D5; Tue, 27 Jan 2026 14:27:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769524045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3gcl3Dbzs1jyEG1yBKpjfMi+5eNyPUahQKGJSe7GrLo=; b=IgKFfFMHA7oOSKQYnIRiVKXFYd0ITEnyACsj2KX79lWaSnj28bg92pDXKvTeAhj6hzhD51 zFvZyySDnIhLGAph+Ojx4o2p3K7feNwYoiczd9n7VSIvYHhWBOAX6E6izBUyL6U5PfqZAX IB5yXJxHNwpiI06OPRbgEoRWG0EI9eY= X-MC-Unique: bth3LGysNB-B1pruoLqPMw-1 X-Mimecast-MFC-AGG-ID: bth3LGysNB-B1pruoLqPMw_1769524041 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Zhao Liu Subject: [PULL 3/9] tests/functional/x86_64: Limit the memlock test to Linux hosts Date: Tue, 27 Jan 2026 15:27:04 +0100 Message-ID: <20260127142710.131904-4-thuth@redhat.com> In-Reply-To: <20260127142710.131904-1-thuth@redhat.com> References: <20260127142710.131904-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769524151046158500 From: Thomas Huth The memlock test analyzes /proc/*/status files and expects the layout from Linux in there. However, these files also exist on NetBSD hosts with a completely different layout, causing this test to fail. Thus limit the test to Linux hosts now. We already have a decorator to skip a test if it is running on a certain host system, but in this case, we rather want to skip if we are not running on a specific host system, so introduce a new @skipUnlessOperatingSystem decorator for this job. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Thomas Huth Message-ID: <20260121111140.99482-1-thuth@redhat.com> --- tests/functional/qemu_test/__init__.py | 4 ++-- tests/functional/qemu_test/decorators.py | 12 ++++++++++++ tests/functional/x86_64/test_memlock.py | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu= _test/__init__.py index 320193591b2..03e5c73d39d 100644 --- a/tests/functional/qemu_test/__init__.py +++ b/tests/functional/qemu_test/__init__.py @@ -15,8 +15,8 @@ from .linuxkernel import LinuxKernelTest from .decorators import skipIfMissingCommands, skipIfNotMachine, \ skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \ - skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest, \ - skipIfMissingEnv + skipIfMissingImports, skipIfOperatingSystem, skipUnlessOperatingSystem= , \ + skipLockedMemoryTest, skipIfMissingEnv from .archive import archive_extract from .uncompress import uncompress from .gdb import GDB diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qe= mu_test/decorators.py index 807418359ab..fcf236ecfdf 100644 --- a/tests/functional/qemu_test/decorators.py +++ b/tests/functional/qemu_test/decorators.py @@ -57,6 +57,18 @@ def skipIfOperatingSystem(*args): 'running on an OS (%s) that is not able to run this test= ' % ", ".join(args)) =20 +def skipUnlessOperatingSystem(*args): + ''' + Decorator to skip execution of a test if the current host + operating system does not match one of the allowed ones. + Example: + + @skipUnlessOperatingSystem("Linux", "Darwin") + ''' + return skipUnless(platform.system() in args, + 'not running on one of the required operating systems (%= s)' % + ", ".join(args)) + def skipIfNotMachine(*args): ''' Decorator to skip execution of a test if the current diff --git a/tests/functional/x86_64/test_memlock.py b/tests/functional/x86= _64/test_memlock.py index f970a2c3095..d88843ab5f9 100755 --- a/tests/functional/x86_64/test_memlock.py +++ b/tests/functional/x86_64/test_memlock.py @@ -14,12 +14,13 @@ from typing import Dict =20 from qemu_test import QemuSystemTest -from qemu_test import skipLockedMemoryTest +from qemu_test import skipLockedMemoryTest, skipUnlessOperatingSystem =20 =20 STATUS_VALUE_PATTERN =3D re.compile(r'^(\w+):\s+(\d+) kB', re.MULTILINE) =20 =20 +@skipUnlessOperatingSystem('Linux') @skipLockedMemoryTest(2_097_152) # 2GB class MemlockTest(QemuSystemTest): """ --=20 2.52.0