[PATCH] tests/functional: Convert the RV32-on-RV64 riscv test

Thomas Huth posted 1 patch 2 weeks, 4 days ago
tests/avocado/tuxrun_baselines.py       | 16 ----------------
tests/functional/test_riscv64_tuxrun.py | 13 +++++++++++++
2 files changed, 13 insertions(+), 16 deletions(-)
[PATCH] tests/functional: Convert the RV32-on-RV64 riscv test
Posted by Thomas Huth 2 weeks, 4 days ago
A straggler that has been added to the Avocado framework while the
conversion to the functional framework was already in progress...
Move it over now, too!

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/avocado/tuxrun_baselines.py       | 16 ----------------
 tests/functional/test_riscv64_tuxrun.py | 13 +++++++++++++
 2 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
index 366c262e32..38064840da 100644
--- a/tests/avocado/tuxrun_baselines.py
+++ b/tests/avocado/tuxrun_baselines.py
@@ -222,19 +222,3 @@ def test_arm64be(self):
                  "rootfs.ext4.zst" :
                  "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"}
         self.common_tuxrun(csums=sums)
-
-    def test_riscv64_rv32(self):
-        """
-        :avocado: tags=arch:riscv64
-        :avocado: tags=machine:virt
-        :avocado: tags=tuxboot:riscv32
-        :avocado: tags=cpu:rv32
-        """
-        sums = { "Image" :
-                 "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5",
-                 "fw_jump.elf" :
-                 "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b18936676985",
-                 "rootfs.ext4.zst" :
-                 "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba" }
-
-        self.common_tuxrun(csums=sums)
diff --git a/tests/functional/test_riscv64_tuxrun.py b/tests/functional/test_riscv64_tuxrun.py
index 13501628f9..4e2449539c 100755
--- a/tests/functional/test_riscv64_tuxrun.py
+++ b/tests/functional/test_riscv64_tuxrun.py
@@ -23,6 +23,13 @@ class TuxRunRiscV64Test(TuxRunBaselineTest):
         'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst',
         'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb')
 
+    ASSET_RISCV32_KERNEL = Asset(
+        'https://storage.tuxboot.com/20230331/riscv32/Image',
+        '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5')
+    ASSET_RISCV32_ROOTFS = Asset(
+        'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst',
+        '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba')
+
     def test_riscv64(self):
         self.set_machine('virt')
         self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
@@ -34,5 +41,11 @@ def test_riscv64_maxcpu(self):
         self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
                            rootfs_asset=self.ASSET_RISCV64_ROOTFS)
 
+    def test_riscv64_rv32(self):
+        self.set_machine('virt')
+        self.cpu='rv32'
+        self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL,
+                           rootfs_asset=self.ASSET_RISCV32_ROOTFS)
+
 if __name__ == '__main__':
     TuxRunBaselineTest.main()
-- 
2.47.0
Re: [PATCH] tests/functional: Convert the RV32-on-RV64 riscv test
Posted by Alistair Francis 2 weeks, 3 days ago
On Tue, Nov 5, 2024 at 8:36 PM Thomas Huth <thuth@redhat.com> wrote:
>
> A straggler that has been added to the Avocado framework while the
> conversion to the functional framework was already in progress...
> Move it over now, too!
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  tests/avocado/tuxrun_baselines.py       | 16 ----------------
>  tests/functional/test_riscv64_tuxrun.py | 13 +++++++++++++
>  2 files changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
> index 366c262e32..38064840da 100644
> --- a/tests/avocado/tuxrun_baselines.py
> +++ b/tests/avocado/tuxrun_baselines.py
> @@ -222,19 +222,3 @@ def test_arm64be(self):
>                   "rootfs.ext4.zst" :
>                   "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"}
>          self.common_tuxrun(csums=sums)
> -
> -    def test_riscv64_rv32(self):
> -        """
> -        :avocado: tags=arch:riscv64
> -        :avocado: tags=machine:virt
> -        :avocado: tags=tuxboot:riscv32
> -        :avocado: tags=cpu:rv32
> -        """
> -        sums = { "Image" :
> -                 "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5",
> -                 "fw_jump.elf" :
> -                 "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b18936676985",
> -                 "rootfs.ext4.zst" :
> -                 "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba" }
> -
> -        self.common_tuxrun(csums=sums)
> diff --git a/tests/functional/test_riscv64_tuxrun.py b/tests/functional/test_riscv64_tuxrun.py
> index 13501628f9..4e2449539c 100755
> --- a/tests/functional/test_riscv64_tuxrun.py
> +++ b/tests/functional/test_riscv64_tuxrun.py
> @@ -23,6 +23,13 @@ class TuxRunRiscV64Test(TuxRunBaselineTest):
>          'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst',
>          'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb')
>
> +    ASSET_RISCV32_KERNEL = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/Image',
> +        '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5')
> +    ASSET_RISCV32_ROOTFS = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst',
> +        '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba')
> +
>      def test_riscv64(self):
>          self.set_machine('virt')
>          self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
> @@ -34,5 +41,11 @@ def test_riscv64_maxcpu(self):
>          self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
>                             rootfs_asset=self.ASSET_RISCV64_ROOTFS)
>
> +    def test_riscv64_rv32(self):
> +        self.set_machine('virt')
> +        self.cpu='rv32'
> +        self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL,
> +                           rootfs_asset=self.ASSET_RISCV32_ROOTFS)
> +
>  if __name__ == '__main__':
>      TuxRunBaselineTest.main()
> --
> 2.47.0
>
>
Re: [PATCH] tests/functional: Convert the RV32-on-RV64 riscv test
Posted by Alistair Francis 2 weeks, 3 days ago
On Tue, Nov 5, 2024 at 8:36 PM Thomas Huth <thuth@redhat.com> wrote:
>
> A straggler that has been added to the Avocado framework while the
> conversion to the functional framework was already in progress...
> Move it over now, too!
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Sorry about that!

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  tests/avocado/tuxrun_baselines.py       | 16 ----------------
>  tests/functional/test_riscv64_tuxrun.py | 13 +++++++++++++
>  2 files changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
> index 366c262e32..38064840da 100644
> --- a/tests/avocado/tuxrun_baselines.py
> +++ b/tests/avocado/tuxrun_baselines.py
> @@ -222,19 +222,3 @@ def test_arm64be(self):
>                   "rootfs.ext4.zst" :
>                   "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"}
>          self.common_tuxrun(csums=sums)
> -
> -    def test_riscv64_rv32(self):
> -        """
> -        :avocado: tags=arch:riscv64
> -        :avocado: tags=machine:virt
> -        :avocado: tags=tuxboot:riscv32
> -        :avocado: tags=cpu:rv32
> -        """
> -        sums = { "Image" :
> -                 "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5",
> -                 "fw_jump.elf" :
> -                 "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b18936676985",
> -                 "rootfs.ext4.zst" :
> -                 "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba" }
> -
> -        self.common_tuxrun(csums=sums)
> diff --git a/tests/functional/test_riscv64_tuxrun.py b/tests/functional/test_riscv64_tuxrun.py
> index 13501628f9..4e2449539c 100755
> --- a/tests/functional/test_riscv64_tuxrun.py
> +++ b/tests/functional/test_riscv64_tuxrun.py
> @@ -23,6 +23,13 @@ class TuxRunRiscV64Test(TuxRunBaselineTest):
>          'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst',
>          'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb')
>
> +    ASSET_RISCV32_KERNEL = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/Image',
> +        '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5')
> +    ASSET_RISCV32_ROOTFS = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst',
> +        '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba')
> +
>      def test_riscv64(self):
>          self.set_machine('virt')
>          self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
> @@ -34,5 +41,11 @@ def test_riscv64_maxcpu(self):
>          self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
>                             rootfs_asset=self.ASSET_RISCV64_ROOTFS)
>
> +    def test_riscv64_rv32(self):
> +        self.set_machine('virt')
> +        self.cpu='rv32'
> +        self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL,
> +                           rootfs_asset=self.ASSET_RISCV32_ROOTFS)
> +
>  if __name__ == '__main__':
>      TuxRunBaselineTest.main()
> --
> 2.47.0
>
>
Re: [PATCH] tests/functional: Convert the RV32-on-RV64 riscv test
Posted by LIU Zhiwei 2 weeks, 4 days ago
On 2024/11/5 18:35, Thomas Huth wrote:
> A straggler that has been added to the Avocado framework while the
> conversion to the functional framework was already in progress...
> Move it over now, too!
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/avocado/tuxrun_baselines.py       | 16 ----------------
>   tests/functional/test_riscv64_tuxrun.py | 13 +++++++++++++
>   2 files changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
> index 366c262e32..38064840da 100644
> --- a/tests/avocado/tuxrun_baselines.py
> +++ b/tests/avocado/tuxrun_baselines.py
> @@ -222,19 +222,3 @@ def test_arm64be(self):
>                    "rootfs.ext4.zst" :
>                    "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7"}
>           self.common_tuxrun(csums=sums)
> -
> -    def test_riscv64_rv32(self):
> -        """
> -        :avocado: tags=arch:riscv64
> -        :avocado: tags=machine:virt
> -        :avocado: tags=tuxboot:riscv32
> -        :avocado: tags=cpu:rv32
> -        """
> -        sums = { "Image" :
> -                 "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5",
> -                 "fw_jump.elf" :
> -                 "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b18936676985",
> -                 "rootfs.ext4.zst" :
> -                 "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba" }
> -
> -        self.common_tuxrun(csums=sums)
> diff --git a/tests/functional/test_riscv64_tuxrun.py b/tests/functional/test_riscv64_tuxrun.py
> index 13501628f9..4e2449539c 100755
> --- a/tests/functional/test_riscv64_tuxrun.py
> +++ b/tests/functional/test_riscv64_tuxrun.py
> @@ -23,6 +23,13 @@ class TuxRunRiscV64Test(TuxRunBaselineTest):
>           'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst',
>           'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb')
>   
> +    ASSET_RISCV32_KERNEL = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/Image',
> +        '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5')
> +    ASSET_RISCV32_ROOTFS = Asset(
> +        'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst',
> +        '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba')
> +
>       def test_riscv64(self):
>           self.set_machine('virt')
>           self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
> @@ -34,5 +41,11 @@ def test_riscv64_maxcpu(self):
>           self.common_tuxrun(kernel_asset=self.ASSET_RISCV64_KERNEL,
>                              rootfs_asset=self.ASSET_RISCV64_ROOTFS)
>   
> +    def test_riscv64_rv32(self):
> +        self.set_machine('virt')
> +        self.cpu='rv32'
> +        self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL,
> +                           rootfs_asset=self.ASSET_RISCV32_ROOTFS)
> +

Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>

Zhiwei

>   if __name__ == '__main__':
>       TuxRunBaselineTest.main()