On 27/8/24 07:27, Thomas Huth wrote:
On 26/08/2024 22.59, Philippe Mathieu-Daudé wrote:
On 26/8/24 11:10, Thomas Huth wrote:
On 24/08/2024 18.08, Philippe Mathieu-Daudé wrote:
Straight forward conversion. Update the SHA1 hashes to
SHA256 hashes since SHA1 should not be used anymore nowadays.

Add extract_from_deb() method in qemu_test.utils package.

Should we maybe rather copy the whole LinuxKernelTest class into a new file in the qemu_tests folder, so that all the related tests can simply inherit from that class? That way we would also get the KERNEL_COMMON_COMMAND_LINE handling for free in all the tests that we convert. What do you think?

Except that variable, I'm not sure what can be reused. Most tests
are trivial. Maybe I'll realize after converting a few more :)

Apart from that variable and the extract_from_* functions, that class is

I don't see extract_from_deb() and extract_from_rpm() being specific
to a LinuxKernelTest class, IMO they belong to .utils with other
helpers such archive_extract().

I haven't added extract_from_rpm() there since I'd need to convert
a test using it to be able to test it, but it is planned.

Similarly image_pow2ceil_expand(), pow2ceil() and file_truncate()
are generic, not restricted to Linux console tests.

also redefining wait_for_console_pattern():

     def wait_for_console_pattern(self, success_message, vm=None):
         wait_for_console_pattern(self, success_message,
                              failure_message='Kernel panic - not syncing',
                              vm=vm)

So that failure_message handling is now missing in your converted test. I think I'd feel better if we keep that, or do you think it is ok to drop it?

Doh, I missed that.

Reply via email to