All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>,
	Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Darren Kenny <darren.kenny@oracle.com>,
	Qiuhao Li <Qiuhao.Li@outlook.com>,
	Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH 02/12] tests/qtest: Do not run lsi53c895a test if device is not present
Date: Tue, 07 Feb 2023 11:02:46 -0300	[thread overview]
Message-ID: <878rh9o9o9.fsf@suse.de> (raw)
In-Reply-To: <c612ab5f-157b-264b-31e5-94b16b3c30b3@redhat.com>

Thomas Huth <thuth@redhat.com> writes:

> On 06/02/2023 16.04, Fabiano Rosas wrote:
>> The tests are built once for all the targets, so as long as one QEMU
>> binary is built with CONFIG_LSI_SCSI_PCI=y, this test will
>> run. However some binaries might not include the device. So check this
>> again in runtime.
>> 
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>>   tests/qtest/fuzz-lsi53c895a-test.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>> 
>> diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c895a-test.c
>> index 392a7ae7ed..a9254b455d 100644
>> --- a/tests/qtest/fuzz-lsi53c895a-test.c
>> +++ b/tests/qtest/fuzz-lsi53c895a-test.c
>> @@ -112,6 +112,10 @@ static void test_lsi_do_dma_empty_queue(void)
>>   
>>   int main(int argc, char **argv)
>>   {
>> +    if (!qtest_has_device("lsi53c895a")) {
>> +        return 0;
>> +    }
>
> I'm a little bit confused right now ... We're already checking 
> CONFIG_LSI_SCSI_PCI in meson.build, and we're only adding the test to 
> qtests_i386 there ... so how did you end up in a situation where you needed 
> this change?

I building with
--target-list=i386-softmmu,x86_64-softmmu,aarch64-softmmu,arm-softmmu
and the arm machines are selecting the CONFIG. That goes into
config_all_devices and meson can't tell the difference. In theory that
could be try for any CONFIG out there. Here's the output:

$ (...) qemu/build/tests/qtest/fuzz-lsi53c895a-test --tap -k
# random seed: R02Sfd8259d54ecdb6bdd8187b52e1a921c4
1..2
# Start of i386 tests
# Start of fuzz tests
# Start of lsi53c895a tests

# starting QEMU: exec ./qemu-system-i386 -qtest
  unix:/tmp/qtest-5629.sock -qtest-log /dev/null -chardev
  socket,path=/tmp/qtest-5629.qmp,id=char0 -mon
  chardev=char0,mode=control -display none -M q35 -nographic -monitor
  none -serial none -drive
  if=none,id=drive0,file=null-co://,file.read-zeroes=on,format=raw
  -device lsi53c895a,id=scsi0 -device
  scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0 -accel
  qtest

qemu-system-i386: -device lsi53c895a,id=scsi0: 'lsi53c895a' is not a valid device model name
Broken pipe
../tests/qtest/libqtest.c:181: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
Aborted (core dumped)

$ find build -name "*.mak" -exec grep -H LSI_SCSI_PCI {} \;
./aarch64-softmmu-config-devices.mak:CONFIG_LSI_SCSI_PCI=y
./arm-softmmu-config-devices.mak:CONFIG_LSI_SCSI_PCI=y

hw/arm/Kconfig has:

config REALVIEW
    ...
    select LSI_SCSI_PCI

config VERSATILE
    ...
    select LSI_SCSI_PCI


  reply	other threads:[~2023-02-07 14:03 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 15:04 [PATCH 00/12] qtests vs. default devices Fabiano Rosas
2023-02-06 15:04 ` [PATCH 01/12] tests/qtest: Skip PXE tests for missing devices Fabiano Rosas
2023-02-07 13:14   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 02/12] tests/qtest: Do not run lsi53c895a test if device is not present Fabiano Rosas
2023-02-06 15:31   ` Philippe Mathieu-Daudé
2023-02-06 17:46     ` Fabiano Rosas
2023-02-06 18:52       ` Philippe Mathieu-Daudé
2023-02-07 13:12   ` Thomas Huth
2023-02-07 14:02     ` Fabiano Rosas [this message]
2023-02-07 14:12       ` Thomas Huth
2023-02-06 15:04 ` [PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c Fabiano Rosas
2023-02-07 13:22   ` Thomas Huth
2023-02-07 15:02     ` Fabiano Rosas
2023-02-06 15:04 ` [PATCH 04/12] tests/qtest: Skip virtio-serial-console tests if device not present Fabiano Rosas
2023-02-07 13:25   ` Thomas Huth
2023-02-07 15:35     ` Laurent Vivier
2023-02-07 13:37   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 05/12] tests/qtest: hd-geo-test: Check for missing devices Fabiano Rosas
2023-02-07 13:52   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 06/12] tests/qtest: Skip unplug tests that use " Fabiano Rosas
2023-02-07 13:59   ` Thomas Huth
2023-02-07 14:17     ` Fabiano Rosas
2023-02-07 14:22       ` Thomas Huth
2023-02-06 15:04 ` [PATCH 07/12] tests/qtest: drive_del-test: Skip tests that require " Fabiano Rosas
2023-02-07 14:20   ` Thomas Huth
2023-02-07 14:32     ` Fabiano Rosas
2023-02-06 15:04 ` [PATCH 08/12] tests/qtest: Check for devices in bios-tables-test Fabiano Rosas
2023-02-06 15:21   ` Michael S. Tsirkin
2023-02-06 15:04 ` [PATCH 09/12] tests/qtest: Do not include hexloader-test if loader device is not present Fabiano Rosas
2023-02-07 14:30   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 10/12] tests/qemu-iotests: Require virtio-scsi-pci Fabiano Rosas
2023-02-07 14:32   ` Thomas Huth
2023-02-06 15:04 ` [PATCH 11/12] tests/qtest: bios-tables-test: Skip if missing configs Fabiano Rosas
2023-02-07 14:35   ` Thomas Huth
2023-02-07 14:42     ` Michael S. Tsirkin
2023-02-08 10:52       ` Igor Mammedov
2023-02-08 14:25         ` Michael S. Tsirkin
2023-02-06 15:04 ` [PATCH 12/12] [NOT FOR MERGE] tests/qtest: Introduce qtest_validate_args Fabiano Rosas
2023-02-07 14:55   ` Thomas Huth
2023-02-07 15:35     ` Fabiano Rosas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rh9o9o9.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=Qiuhao.Li@outlook.com \
    --cc=alxndr@bu.edu \
    --cc=bsd@redhat.com \
    --cc=darren.kenny@oracle.com \
    --cc=fam@euphon.net \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.