From patchwork Mon Feb 10 20:42:02 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: 863845 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e42:0:b0:385:e875:8a9e with SMTP id r2csp1792608wrt; Mon, 10 Feb 2025 12:47:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWyvKlpUuYp7L4TamE28+Aa7tfEYZsVzqNt/Ck7IaJDWq+DGYzQnNN1Yl9bKZD0UqdBlOB1Zg==@linaro.org X-Google-Smtp-Source: AGHT+IEcs+XOZkBn9G+jI7XcaWKJwThgT6bqqKrj7DFqMaRktCo8hIaI5xA21sR/NJsMBOx1JOVo X-Received: by 2002:a05:622a:303:b0:471:9d8c:da20 with SMTP id d75a77b69052e-4719d8cdbe4mr29615531cf.8.1739220442737; Mon, 10 Feb 2025 12:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739220442; cv=none; d=google.com; s=arc-20240605; b=f8opQm6yl1iQ7JAPGtfkCe+jZk9vysQnXFq5mQ6zj1Y2k9m0npD7B8C/Nu5L/Tqk1p tunu6jMg4csH7SQRx623LEHDb8HcT0VtNMBcLh3XV/zOR9Kb+iyEsF0onPQ6XzDFKS3y rA/5aHs858A0/jN9omm4/thZlpa90UQacXvNIgHw83/lWjMTY/BfSa/GrOMxV19EF7F6 4aLXZLb4rhTW76jGXAr5ahKbLPKNqiSFI7khLEb6cBwMf/wk9G8U/RUPZptcnNyP1JJJ 71sxkfXanvk4a7BalFVGf6bVVrYAaZhdUBIBTFYVvgCz4NJXpfSzSA6xHzb+NsrapJYr zheA== 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=b9KWIiGOWq55nxx0C4B7NMOGhhvAoCPOGFcu0xxlyb8=; fh=7gZvlf5c4KqY17UefY3VLfTm+bVDxskXHVg/jnbpAaM=; b=ebfH4U+3J/YruuEq52cCFuGDo7TuU4lT8xpDJYPcSuII7CrTeqZB71RH3Eg59Zu11N FmP50FeTl9Wwq2HKNYRWGuI7DkSsDLDtwo/9pehYE5qig9s6W1OIm32THAGFLaRjxebm iJ0JwyjWWw877maWVTTiUZ94DoKYaPgbmab18/X88qAdlk0Mlyr4xmY2irXlxGgdi0K7 2ljNSgNIF3AtFRk8G5cSpf8luXYLFt20pSRinINNEQ1JKN1zSVKcIJh815DS6711Ac/M xplzAiQB04LkHMQaDa6zmrIHNnEPtIO5U9O4RVA3CX0WzD+qGApcp1F5FplSR3N27jDu PvvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eSa9mDTV; 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 d75a77b69052e-47191977c23si29649121cf.494.2025.02.10.12.47.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Feb 2025 12:47:22 -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=eSa9mDTV; 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 1thaeJ-0005zO-5v; Mon, 10 Feb 2025 15:44:59 -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 1thae9-0004pi-DE for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:44:49 -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 1thae1-00041N-JU for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:44:48 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38de17a5fc9so686341f8f.3 for ; Mon, 10 Feb 2025 12:44:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739220280; x=1739825080; 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=b9KWIiGOWq55nxx0C4B7NMOGhhvAoCPOGFcu0xxlyb8=; b=eSa9mDTVeQMo8N33+FIUVT+1+y4H86s2PqQDzEyBSF9T11lpSEQ8QLDBOFpiX48pSP VgPWnrmVhR3Um9ci6m3HI3kPstbJA9SQ9X99eI0mXl+5U2pI0o27OLJ3pFaY9QJGPPPp pUKEduGBIOECl6YSzVO+eBSq/UL0wbGyl0TLbOXe9wjO+BdGXvRp4KdMx3/XsXYdvXsv SApWFPEhmwSZ1t9N5C39oWRI85NvSdFcbEP8gWBN8psfpiiFRRtcS2+PPSWsc5DM4st8 yw1fY1QDhRUOu5YCKL4Krh5zf8Xxh8GW/ThH9s7qWSTBd6WVZjPGeSw5Fo+E+KccPMTE 1Hkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739220280; x=1739825080; 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=b9KWIiGOWq55nxx0C4B7NMOGhhvAoCPOGFcu0xxlyb8=; b=F9l/iwfCHcRIn0j+zWiB/mZ2CX3qwjK7tNyHZo7ugs0Su89VkSHalQAGq1Fi0f1wlq fHkcG/3RDH0YjI4yHQIhu0bttv1lEY5rAf9S3QVwnbxh5zYpbRRlTAf8ahIh/t7eeJ7l drxd7OwXA0RZgQ6IeamUkClVmoxAZDAfpOAIn3b+3KaQ0KquPw/r1r526mEc49urdjDB 1ac3AHdHoi0di2cAVuSjHI1YxfpkcTN9BRTRtmuzJhz2A7rG7vsMQWv1pbjorHHtypsv ahkxV1/PI8oqDKYHVNAcr2Z6eq2rcdtj3Umrg2ryMIAFGtQMleNSmvYYH/kv7kwj7ZC7 otBA== X-Gm-Message-State: AOJu0Yw2C+fnmgBruEVc5md906HGEjbmWjBy/Ly2GhF+Wi46Y5O2Phqe CeaYBvnKQESgDm8WErDs19WAzraGIatCcQ+lFZGi4JZp0afJQSP2Ey5Z8AbahLh5q1Jqf9DTWuB Wq3g= X-Gm-Gg: ASbGnctNRL9cBvYgkoI0HoIdgpoP6oEp+6ZMdQiOi9OeWNH71sD+h18eMXZY88l4C8j 4B5Oo27wgzlfSyaAm/F6QG6SqN/35vIlvDjxN19yKvsh1gWSA37w9MUKqqHeUlpFB+eg6gKtuNL BweEF9FM0o2khQMYJF5PLaEbznHA7VwGJv5n4wYiN0XrJPBnnxIJvfNJHnybXGgVoMjkVHN+1TV o43G8r+T976ROWKcd4gXJmPBusnoDZBbiIT04SEMw6j0i7rWaInfBhICh4ExtcjxU7laJFDzkxX iOxnU7MFK+LpxeYaBGztk3bWPFFgp08bE70Bl71km8KftfPfW/3R+CLcRFWOnKziQw== X-Received: by 2002:a05:6000:2a7:b0:38d:b448:65c4 with SMTP id ffacd0b85a97d-38dc959fec4mr11531269f8f.55.1739220279727; Mon, 10 Feb 2025 12:44:39 -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-38dd9c48173sm5410642f8f.37.2025.02.10.12.44.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 12:44:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PULL 30/32] tests/functional: Have microblaze tests inherit common parent class Date: Mon, 10 Feb 2025 21:42:02 +0100 Message-ID: <20250210204204.54407-31-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210204204.54407-1-philmd@linaro.org> References: <20250210204204.54407-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 Have the MicroblazeMachine class being common to both MicroblazeBigEndianMachine and MicroblazeLittleEndianMachine classes. Move the xmaton and ballerina tests to the parent class. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250206131052.30207-16-philmd@linaro.org> --- .../functional/test_microblaze_s3adsp1800.py | 23 +++++++++++++++ .../test_microblazeel_s3adsp1800.py | 29 ++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functional/test_microblaze_s3adsp1800.py index c4226f49cf3..177c8a685bc 100755 --- a/tests/functional/test_microblaze_s3adsp1800.py +++ b/tests/functional/test_microblaze_s3adsp1800.py @@ -7,6 +7,7 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. +from qemu_test import exec_command_and_wait_for_pattern from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern @@ -20,6 +21,10 @@ class MicroblazeMachine(QemuSystemTest): 'day17.tar.xz'), '3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057') + ASSET_IMAGE_LE = Asset( + ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), + 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') + def do_ballerina_be_test(self, machine): self.set_machine(machine) self.archive_extract(self.ASSET_IMAGE_BE) @@ -34,6 +39,24 @@ def do_ballerina_be_test(self, machine): # message, that's why we don't test for a later string here. This # needs some investigation by a microblaze wizard one day... + def do_xmaton_le_test(self, machine): + self.require_netdev('user') + self.set_machine(machine) + self.archive_extract(self.ASSET_IMAGE_LE) + self.vm.set_console() + self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin')) + tftproot = self.scratch_file('day13') + self.vm.add_args('-nic', f'user,tftp={tftproot}') + self.vm.launch() + wait_for_console_pattern(self, 'QEMU Advent Calendar 2023') + wait_for_console_pattern(self, 'buildroot login:') + exec_command_and_wait_for_pattern(self, 'root', '#') + exec_command_and_wait_for_pattern(self, + 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png', + '821cd3cab8efd16ad6ee5acc3642a8ea') + +class MicroblazeBigEndianMachine(MicroblazeMachine): + def test_microblaze_s3adsp1800_legacy_be(self): self.do_ballerina_be_test('petalogix-s3adsp1800') diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/functional/test_microblazeel_s3adsp1800.py index 60aab4a45e8..56645bd0bb2 100755 --- a/tests/functional/test_microblazeel_s3adsp1800.py +++ b/tests/functional/test_microblazeel_s3adsp1800.py @@ -7,34 +7,11 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. -from qemu_test import exec_command_and_wait_for_pattern -from qemu_test import QemuSystemTest, Asset -from qemu_test import wait_for_console_pattern +from qemu_test import QemuSystemTest +from test_microblaze_s3adsp1800 import MicroblazeMachine -class MicroblazeelMachine(QemuSystemTest): - - timeout = 90 - - ASSET_IMAGE_LE = Asset( - ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), - 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') - - def do_xmaton_le_test(self, machine): - self.require_netdev('user') - self.set_machine(machine) - self.archive_extract(self.ASSET_IMAGE_LE) - self.vm.set_console() - self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin')) - tftproot = self.scratch_file('day13') - self.vm.add_args('-nic', f'user,tftp={tftproot}') - self.vm.launch() - wait_for_console_pattern(self, 'QEMU Advent Calendar 2023') - wait_for_console_pattern(self, 'buildroot login:') - exec_command_and_wait_for_pattern(self, 'root', '#') - exec_command_and_wait_for_pattern(self, - 'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png', - '821cd3cab8efd16ad6ee5acc3642a8ea') +class MicroblazeLittleEndianMachine(MicroblazeMachine): def test_microblaze_s3adsp1800_legacy_le(self): self.do_xmaton_le_test('petalogix-s3adsp1800')