diff mbox series

[2/4] kunit: qemu_configs: add LoongArch config

Message ID 20241014-kunit-loongarch-v1-2-1699b2ad6099@linutronix.de (mailing list archive)
State New
Delegated to: Brendan Higgins
Headers show
Series kunit: Add support for LoongArch | expand

Commit Message

Thomas Weißschuh Oct. 14, 2024, 11:36 a.m. UTC
Add a basic config to run kunit tests on LoongArch.
This requires QEMU 9.1.0 or later for the necessary direct kernel boot
support.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 tools/testing/kunit/qemu_configs/loongarch.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

bibo mao Oct. 15, 2024, 7:31 a.m. UTC | #1
Hi Thomas,

Thanks for work it out on LoongArch.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>

On 2024/10/14 下午7:36, Thomas Weißschuh wrote:
> Add a basic config to run kunit tests on LoongArch.
> This requires QEMU 9.1.0 or later for the necessary direct kernel boot
> support.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>   tools/testing/kunit/qemu_configs/loongarch.py | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
> new file mode 100644
> index 0000000000000000000000000000000000000000..e7bb7c07819677dfdefac012821a732555813cae
> --- /dev/null
> +++ b/tools/testing/kunit/qemu_configs/loongarch.py
> @@ -0,0 +1,16 @@
> +from ..qemu_config import QemuArchParams
> +
> +QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
> +			   kconfig='''
> +CONFIG_EFI_STUB=n
> +CONFIG_PCI_HOST_GENERIC=y
> +CONFIG_SERIAL_8250=y
> +CONFIG_SERIAL_8250_CONSOLE=y
> +CONFIG_SERIAL_OF_PLATFORM=y
> +''',
> +			   qemu_arch='loongarch64',
> +			   kernel_path='arch/loongarch/boot/vmlinux.elf',
> +			   kernel_command_line='console=ttyS0',
> +			   extra_qemu_params=[
> +					   '-machine', 'virt',
> +					   '-cpu', 'max',])
>
David Gow Oct. 17, 2024, 7:24 a.m. UTC | #2
On Mon, 14 Oct 2024 at 19:36, Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Add a basic config to run kunit tests on LoongArch.
> This requires QEMU 9.1.0 or later for the necessary direct kernel boot
> support.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---

Thanks a lot. I've confirmed that this works with the kernel.org
gcc-14.2.0 toolchains and qemu 9.1.0.

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David
Shuah Khan Oct. 17, 2024, 8:27 p.m. UTC | #3
Hi Thomas,

On 10/14/24 05:36, Thomas Weißschuh wrote:
> Add a basic config to run kunit tests on LoongArch.
> This requires QEMU 9.1.0 or later for the necessary direct kernel boot
> support.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>   tools/testing/kunit/qemu_configs/loongarch.py | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
> new file mode 100644
> index 0000000000000000000000000000000000000000..e7bb7c07819677dfdefac012821a732555813cae
> --- /dev/null
> +++ b/tools/testing/kunit/qemu_configs/loongarch.py

Missing SPDX-License-Identifier.

> @@ -0,0 +1,16 @@
> +from ..qemu_config import QemuArchParams
> +
> +QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
> +			   kconfig='''
> +CONFIG_EFI_STUB=n
> +CONFIG_PCI_HOST_GENERIC=y
> +CONFIG_SERIAL_8250=y
> +CONFIG_SERIAL_8250_CONSOLE=y
> +CONFIG_SERIAL_OF_PLATFORM=y
> +''',
> +			   qemu_arch='loongarch64',
> +			   kernel_path='arch/loongarch/boot/vmlinux.elf',
> +			   kernel_command_line='console=ttyS0',
> +			   extra_qemu_params=[
> +					   '-machine', 'virt',
> +					   '-cpu', 'max',])
> 

Please send v2 with all the reviewed by tags. If there
is a resend 3.4 and 4/4 in this series, send them.

thanks,
-- Shuah
Thomas Weißschuh Oct. 17, 2024, 8:31 p.m. UTC | #4
Hi Shuah,

Oct 17, 2024 22:27:29 Shuah Khan <skhan@linuxfoundation.org>:

> On 10/14/24 05:36, Thomas Weißschuh wrote:
>> Add a basic config to run kunit tests on LoongArch.
>> This requires QEMU 9.1.0 or later for the necessary direct kernel boot
>> support.
>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>> ---
>>   tools/testing/kunit/qemu_configs/loongarch.py | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>> diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..e7bb7c07819677dfdefac012821a732555813cae
>> --- /dev/null
>> +++ b/tools/testing/kunit/qemu_configs/loongarch.py
>
> Missing SPDX-License-Identifier.

Tue others configs don't have one either.

>> @@ -0,0 +1,16 @@
>> +from ..qemu_config import QemuArchParams
>> +
>> +QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
>> +              kconfig='''
>> +CONFIG_EFI_STUB=n
>> +CONFIG_PCI_HOST_GENERIC=y
>> +CONFIG_SERIAL_8250=y
>> +CONFIG_SERIAL_8250_CONSOLE=y
>> +CONFIG_SERIAL_OF_PLATFORM=y
>> +''',
>> +              qemu_arch='loongarch64',
>> +              kernel_path='arch/loongarch/boot/vmlinux.elf',
>> +              kernel_command_line='console=ttyS0',
>> +              extra_qemu_params=[
>> +                      '-machine', 'virt',
>> +                      '-cpu', 'max',])
>>
>
> Please send v2 with all the reviewed by tags. If there
> is a resend 3.4 and 4/4 in this series, send them.

I'll do that. But it will take some weeks, as I just went on vacation.

Thomas
Shuah Khan Oct. 17, 2024, 8:36 p.m. UTC | #5
On 10/17/24 14:31, Thomas Weißschuh wrote:
> Hi Shuah,
> 
> Oct 17, 2024 22:27:29 Shuah Khan <skhan@linuxfoundation.org>:
> 
>> On 10/14/24 05:36, Thomas Weißschuh wrote:
>>> Add a basic config to run kunit tests on LoongArch.
>>> This requires QEMU 9.1.0 or later for the necessary direct kernel boot
>>> support.
>>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>>> ---
>>>    tools/testing/kunit/qemu_configs/loongarch.py | 16 ++++++++++++++++
>>>    1 file changed, 16 insertions(+)
>>> diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
>>> new file mode 100644
>>> index 0000000000000000000000000000000000000000..e7bb7c07819677dfdefac012821a732555813cae
>>> --- /dev/null
>>> +++ b/tools/testing/kunit/qemu_configs/loongarch.py
>>
>> Missing SPDX-License-Identifier.
> 
> Tue others configs don't have one either.
> 
>>> @@ -0,0 +1,16 @@
>>> +from ..qemu_config import QemuArchParams
>>> +
>>> +QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
>>> +              kconfig='''
>>> +CONFIG_EFI_STUB=n
>>> +CONFIG_PCI_HOST_GENERIC=y
>>> +CONFIG_SERIAL_8250=y
>>> +CONFIG_SERIAL_8250_CONSOLE=y
>>> +CONFIG_SERIAL_OF_PLATFORM=y
>>> +''',
>>> +              qemu_arch='loongarch64',
>>> +              kernel_path='arch/loongarch/boot/vmlinux.elf',
>>> +              kernel_command_line='console=ttyS0',
>>> +              extra_qemu_params=[
>>> +                      '-machine', 'virt',
>>> +                      '-cpu', 'max',])
>>>
>>
>> Please send v2 with all the reviewed by tags. If there
>> is a resend 3.4 and 4/4 in this series, send them.
> 
> I'll do that. But it will take some weeks, as I just went on vacation.
> 

Sounds good. Enjoy your vacation.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
new file mode 100644
index 0000000000000000000000000000000000000000..e7bb7c07819677dfdefac012821a732555813cae
--- /dev/null
+++ b/tools/testing/kunit/qemu_configs/loongarch.py
@@ -0,0 +1,16 @@ 
+from ..qemu_config import QemuArchParams
+
+QEMU_ARCH = QemuArchParams(linux_arch='loongarch',
+			   kconfig='''
+CONFIG_EFI_STUB=n
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+''',
+			   qemu_arch='loongarch64',
+			   kernel_path='arch/loongarch/boot/vmlinux.elf',
+			   kernel_command_line='console=ttyS0',
+			   extra_qemu_params=[
+					   '-machine', 'virt',
+					   '-cpu', 'max',])