From patchwork Thu Feb 6 13:10:51 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: 862510 Delivered-To: patch@linaro.org Received: by 2002:a5d:51d2:0:b0:385:e875:8a9e with SMTP id n18csp119368wrv; Thu, 6 Feb 2025 05:13:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVmsdT/IOWFhKxUN9dAGkopzzaS2bT11MNMrSv8C7daFGEpg4g2ROy1dXPaAZynB7JkXVqqZw==@linaro.org X-Google-Smtp-Source: AGHT+IGnOFvMftvz3wqx8cBHP86PFPqKndG/s3Q4L6m3igawk0zZpMef5CeTm61hknoUZ/wVdTwo X-Received: by 2002:a05:620a:3197:b0:7b7:142d:53c9 with SMTP id af79cd13be357-7c03a028be6mr1058816585a.53.1738847634487; Thu, 06 Feb 2025 05:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738847634; cv=none; d=google.com; s=arc-20240605; b=QVrsSSXOTGEBkCo1QE8XyrYa0A7zZ+aVcgW8nO6BSZyzVccrL1voTHO7fFTw8605NT lKv0lUrtBXCW26x23ShJ8ZZY7Kb5pKMGTBKoOtiNIIwl50GEDZcDg/WBN9sn5h5O6Gkj /FNRryXMhnd42nhavEaAUVpIeIMuyrI8QRhT1RgolD5eeTCqI8IZqsZMu79VQ47nZ+tD 21OBxmoBD7HmYHINfJss9iBy8PCacdnSQaREpjGbhg+rQDCwHEsAlQoVOUObUz/aakBm BetQlXmMPIX7HD8AR72zkd1oOrwTyUTjwUhD1sQaL4lQEQPoxHQeTihoes9WgwNhjDCw XkkA== 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=YeunrBTdlxarEESrVvUOHeU40/m+EAzAKhgKeitt+so=; fh=7NsVx5R+L140HvZ0es4udPXCD2KdHoHcZm3kdyNBbE4=; b=fBkWxw2WzwqqQmM8ncMchk67Dmtj7hSIUn4zhprN/b14o/top7IRf8yS4TRg23iR+t p23iAFx5Sh/4vqACE5VuEEimbmLCj50at7bEUR+rRQsX1r0WpK3NOo2sCoD1ohqBqAGl l6v/MFtfQnGTmAbO8GTi1rGzzepN034+b4gww0thJPQKijhPI0IPAmRjasrNu1BxJkZP 2cFxHvHXwlCMimZbeIWTD41UAjbYDxm2n+owA1VxK69/giTo5ZztrvwiYIqyK3SMnOll J7jubQLfyfUah9YRxp4hW/M9+LC8qtZK6i/PsATN0DzTdf5hglYOBHjqjSSGOYsSOgJz 4mLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dss3fVcm; 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-7c041ed03a1si112241485a.469.2025.02.06.05.13.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Feb 2025 05:13:54 -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=dss3fVcm; 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 1tg1gK-0006ju-UF; Thu, 06 Feb 2025 08:12:37 -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 1tg1g3-0006QW-BV for qemu-devel@nongnu.org; Thu, 06 Feb 2025 08:12:20 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tg1g0-0008JU-IT for qemu-devel@nongnu.org; Thu, 06 Feb 2025 08:12:19 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-436345cc17bso6253545e9.0 for ; Thu, 06 Feb 2025 05:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738847530; x=1739452330; 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=YeunrBTdlxarEESrVvUOHeU40/m+EAzAKhgKeitt+so=; b=dss3fVcmHATTQ1/Bp3Wb77WX4Mh7qATOZMRhrok0CI4Y63kkcplkBPlHxT7Y4UZEAH 2ATEZeKct4xC3Ymnd3IN9oxiHR4I30xcVie3b0mnnZ/Nh/f+PYnIcxaJGSowRfuW0B20 gFHJLjShQUbTr+D7b1F3oxfVfAxpFdU3knNPytt8s2b0G5fWM727/VkrbIwLmqyLxGFF AVC53Nf5QV4C+j1JAZdbU/6E3W1AVaL047E35LjdUJgnDH5R2YBApws8vf+uSxXq7ND9 a7gygurW6PiBjBwaoQE90dI9pXCJXt1ccNdqplEOxsIX7lMdmrwtwprZh+Gj0Om+Pe7m cycA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738847530; x=1739452330; 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=YeunrBTdlxarEESrVvUOHeU40/m+EAzAKhgKeitt+so=; b=NmM30i0l+CRzICChEEWBk2C2Ko9ogrBsES/mQLiVUStyD3RclfQKjYC31qDEWz9Tls Pg4/eoDib12+OXu77ZhHwi/cXTpM+Jp+9DLLXCl8dVRZu6lvc5C83iVMLNQdt2J4CqcQ a3zL85VX9XZRUDoJvka4I1BA3PfZQbcmbglJDvlonhgxRQOJHcWEkTssGD92CprGvvK9 LYRZ3kFsC+hIVuPHIfq0fgs0IEzNoHDPcV1E7jU2KuOuUSXp3P7bQqgyAFMm2afuMRbn HlIOPFA0V4zm524QLVxj8urKNLzKh0QhQCYutHNl60rSRZBjZZMeuXvo4j38BWE9dRAy f+XQ== X-Gm-Message-State: AOJu0YxAeE3hKIrWteroffgwwJ9Nq0LPpiqY1iZfYixrbuH8FRRyTSdy iXAdU8ahLtWvig+8ee2nxRAdVcRRiaNQ0d/kv5foH2HcMAkLhZj56a7IkM9RdF7ZIQR5IbzCl26 huTA= X-Gm-Gg: ASbGnctlPQhAuAg8P/iEldI8h2qM6vSNoowSIVsDfwHJ+iIWcd0/S5CsCpluGDWcBHJ 06O2lnFNHg7izSemveBHh8umySJPLWnusJmFbC3px9VtZYue2Yxkg0ymxVoSgnKI5nH9NnM5qIm F7JjIS6w4kqwWUL7oVkNqD+kwmRxk20c7hO78C+BDKdiSC4EujlW6G9rG8YSFX9H+AEen67qVWu OyaXrxAysmYhbdiW0I7OSkSBhd+FyXLXu5KbBuHUHnELU1eCCK59D9iPFwVgLaQkdumzFTW5llk r5HSnyXt0FMDHakoa1doP1RbU5DzK5PH5k/Yq0JOxZ4pl5tdO2Fmi/ztf2jNLlQbHg== X-Received: by 2002:a5d:64e5:0:b0:382:6f3:a20f with SMTP id ffacd0b85a97d-38db48a9dcemr5085557f8f.11.1738847529776; Thu, 06 Feb 2025 05:12:09 -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-4391dcb0e92sm18665985e9.24.2025.02.06.05.12.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Feb 2025 05:12:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Anton Johansson , Jason Wang , Paolo Bonzini , Alistair Francis , Thomas Huth , Richard Henderson , Peter Maydell , "Edgar E. Iglesias" , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH v5 15/16] tests/functional: Have microblaze tests inherit common parent class Date: Thu, 6 Feb 2025 14:10:51 +0100 Message-ID: <20250206131052.30207-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250206131052.30207-1-philmd@linaro.org> References: <20250206131052.30207-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable 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 --- .../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')