From nobody Fri May 10 02:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610723392; cv=none; d=zohomail.com; s=zohoarc; b=R1mbIx+/pfApfDctmf05wESP4nx2EEdh114oRPBQUmPjBt6OtVYr+P8NTOBEn1AKZhd2Gi3tQqSxX/GGufmgHFkMaGMqyH8q26FENTT4NwY6BAQVNPxwn5mV/DE9dLDavxuux5AS01jGCv1ovQ+sVk1xT9wCgc0zTglQVc64oYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610723392; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=YgVLLacDQILJN6YonWv28T7UMj9spgsD7n9ORYdJelQ=; b=Ht4dP7XTYZ3jwWzUOEsbomxEh1pRhPjvkKv0aswBKTrOYy3yLIVQHsRpoRRvHX2ujNbXrJsKcOCos49QDx796wAkAmRNr9Wug7pWJjs8GXqa0Ib20XMr1skxW8ZzMnzQbRUmIXewArqMQJoqdkvS/1VLyS2h2xcD86JPLGBaIHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1610723392363705.5628246798263; Fri, 15 Jan 2021 07:09:52 -0800 (PST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-6u0tGWIMOpS5B-dY4iRiPQ-1; Fri, 15 Jan 2021 10:09:49 -0500 Received: by mail-ed1-f71.google.com with SMTP id f21so3683714edx.23 for ; Fri, 15 Jan 2021 07:09:49 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id c12sm3916306edw.55.2021.01.15.07.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 07:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610723391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YgVLLacDQILJN6YonWv28T7UMj9spgsD7n9ORYdJelQ=; b=DdILNkh3BYJwsaEtZN/DymjjJuAX0j9hWqwOKvspficz99ljHwn1No24kBbjcjdP63M/3t KI1FXZ4lGkoMNfIUkBIODNMI+cFV/0s2SlR8VaYzePUBhBaptmPDF4ZTRQ53puinkX0Q0K q8mK7WFneUOriegwdx7bsGCQrUP2cEA= X-MC-Unique: 6u0tGWIMOpS5B-dY4iRiPQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YgVLLacDQILJN6YonWv28T7UMj9spgsD7n9ORYdJelQ=; b=QAPXWI/LaIkNWag0v/+hLT0RLwgIV/r+u718LL/Nh4jauBEsu4BaCJEU4K/o7rIPRf fZWk6RzeGykRW+xmh+csXdpyPx2hzClAYhgUoYAr4WF7Kt+wFToC8ENiuBfibANcKqF/ 0olwwYMgCjmoLS9FPg2Nsch23+Ei7yEZzIMYX/Gx4kxfS5w7nECeLzIE7dg9xrTwPlUM YScrM47n5WmmK8WKV8MG0B2vDCjT+KINveT4UTfoWzUYPxnsNOwhQYpNQiFy1uMMEM4G Z6Jr86CxrNHtd6eTHMgL2+ItHgo3g0/7JE1GY5UeR5edO4+03pkBbhzpaMZVucI3GXC8 tM4Q== X-Gm-Message-State: AOAM533eDa7VynvNgC3M28+cnpPXiUMfFD513dule1GGn9QXJGY6NBZj JsA1WjA5jIrd6MCQnex+MXTt8V/brpILQUYOgkljL55/QnDmUa+JbucWTDZWsEvhgfdnn2OKGM8 ZuSOseIHsZN0sTQ== X-Received: by 2002:a17:907:3e06:: with SMTP id hp6mr9303076ejc.254.1610723387868; Fri, 15 Jan 2021 07:09:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5WkCIxOL6jNBQBfFrJk1fIG5mxjb5+lkCeMIC3vJsPkOo49V9kp1LpJKr8BmGbK3OK/TrnA== X-Received: by 2002:a17:907:3e06:: with SMTP id hp6mr9302808ejc.254.1610723384376; Fri, 15 Jan 2021 07:09:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Thomas Huth , Laurent Vivier , Paolo Bonzini , Li Qiang , Alexander Bulekov , Hannes Reinecke , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] tests/qtest: Remove TPM tests Date: Fri, 15 Jan 2021 16:09:33 +0100 Message-Id: <20210115150936.3333282-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210115150936.3333282-1-philmd@redhat.com> References: <20210115150936.3333282-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The TPM tests are failing, and no further tests are run, making the rest of the testsuite pointless: $ make check-qtest =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D3330026=3D=3DERROR: LeakSanitizer: detected memory leaks Indirect leak of 444960 byte(s) in 108 object(s) allocated from: #0 0x55a2df5adb87 in calloc (tests/qtest/tpm-crb-swtpm-test+0x266b87) #1 0x7f507bbff9b0 in g_malloc0 (/lib64/libglib-2.0.so.0+0x589b0) #2 0x55a2df898766 in parse_object qobject/json-parser.c:318:12 #3 0x55a2df897d86 in parse_value qobject/json-parser.c:546:16 #4 0x55a2df8979be in json_parser_parse qobject/json-parser.c:580:14 #5 0x55a2df81ccc1 in json_message_process_token qobject/json-streamer= .c:92:12 #6 0x55a2df85f773 in json_lexer_feed_char qobject/json-lexer.c:313:13 #7 0x55a2df85eb04 in json_lexer_feed qobject/json-lexer.c:350:9 #8 0x55a2df81d7ed in json_message_parser_feed qobject/json-streamer.c= :121:5 #9 0x55a2df5f15f9 in qmp_fd_receive tests/qtest/libqtest.c:614:9 #10 0x55a2df5f1dda in qtest_qmp_receive_dict tests/qtest/libqtest.c:6= 36:12 #11 0x55a2df5ef444 in qtest_qmp_receive tests/qtest/libqtest.c:624:27 #12 0x55a2df5f3a2d in qtest_vqmp tests/qtest/libqtest.c:715:12 #13 0x55a2df5efa62 in qtest_qmp tests/qtest/libqtest.c:756:16 #14 0x55a2df5eb480 in tpm_util_wait_for_migration_complete tests/qtes= t/tpm-util.c:245:15 #15 0x55a2df5e4167 in tpm_test_swtpm_migration_test tests/qtest/tpm-t= ests.c:117:5 #16 0x55a2df5e340c in tpm_crb_swtpm_migration_test tests/qtest/tpm-cr= b-swtpm-test.c:44:5 #17 0x7f507bc2229d (/lib64/libglib-2.0.so.0+0x7b29d) Indirect leak of 3456 byte(s) in 108 object(s) allocated from: #0 0x55a2df5adb87 in calloc (tests/qtest/tpm-crb-swtpm-test+0x266b87) #1 0x7f507bbff9b0 in g_malloc0 (/lib64/libglib-2.0.so.0+0x589b0) #2 0x55a2df7886af in qdict_put_obj qobject/qdict.c:126:17 #3 0x55a2df89d706 in parse_pair qobject/json-parser.c:300:5 #4 0x55a2df898889 in parse_object qobject/json-parser.c:327:13 #5 0x55a2df897d86 in parse_value qobject/json-parser.c:546:16 #6 0x55a2df8979be in json_parser_parse qobject/json-parser.c:580:14 #7 0x55a2df81ccc1 in json_message_process_token qobject/json-streamer= .c:92:12 #8 0x55a2df85f773 in json_lexer_feed_char qobject/json-lexer.c:313:13 #9 0x55a2df85eb04 in json_lexer_feed qobject/json-lexer.c:350:9 #10 0x55a2df81d7ed in json_message_parser_feed qobject/json-streamer.= c:121:5 #11 0x55a2df5f15f9 in qmp_fd_receive tests/qtest/libqtest.c:614:9 #12 0x55a2df5f1dda in qtest_qmp_receive_dict tests/qtest/libqtest.c:6= 36:12 #13 0x55a2df5ef444 in qtest_qmp_receive tests/qtest/libqtest.c:624:27 #14 0x55a2df5f3a2d in qtest_vqmp tests/qtest/libqtest.c:715:12 #15 0x55a2df5efa62 in qtest_qmp tests/qtest/libqtest.c:756:16 #16 0x55a2df5eb480 in tpm_util_wait_for_migration_complete tests/qtes= t/tpm-util.c:245:15 #17 0x55a2df5e4167 in tpm_test_swtpm_migration_test tests/qtest/tpm-t= ests.c:117:5 #18 0x55a2df5e340c in tpm_crb_swtpm_migration_test tests/qtest/tpm-cr= b-swtpm-test.c:44:5 #19 0x7f507bc2229d (/lib64/libglib-2.0.so.0+0x7b29d) Indirect leak of 756 byte(s) in 108 object(s) allocated from: #0 0x55a2df5ad9cf in malloc (tests/qtest/tpm-crb-swtpm-test+0x2669cf) #1 0x7f507bbff958 in g_malloc (/lib64/libglib-2.0.so.0+0x58958) SUMMARY: AddressSanitizer: 449172 byte(s) leaked in 324 allocation(s). make: *** [Makefile.mtest:1025: run-test-126] Error 1 Remove these tests to be able to run the rest. Cc: Stefan Berger Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/meson.build | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 16d04625b8b..bcbb04d2bb4 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -41,10 +41,6 @@ (config_all_devices.has_key('CONFIG_USB_UHCI') and = \ config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] := []) + \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test= '] : []) + \ - (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) += \ - (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] := []) + \ - (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : [= ]) + \ - (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test= '] : []) + \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : [= ]) + \ qtests_pci + = \ ['fdc-test', --=20 2.26.2 From nobody Fri May 10 02:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610723398; cv=none; d=zohomail.com; s=zohoarc; b=FFTNCaNCKFJDCZ5auRMSBL6sK+lBUKlKdxYY+SN6E735p1IiD0Y0E4cPLLQMp+WmUpIZmJ2s7pGRb2FDcs+T9eY9xRfMhIT6IIKLRzWGCAKuEni+0HhF9Cws8xmpnO6RNNETN9LPUkfBQYr2CYhNqh921EMO+obyNgRD+iG3EQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610723398; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=RNVtd4o7MvAgZeXi6TxxZ/2iuwmVNRUF2Da2XYVkLog=; b=gkY+XMOujqhuLAqR4QhyD1bUpGjzUIwHp2q0afEYvKDaILv6Mm3oYdBOODQEZwZZ0z955yf/o2fbKoaW4Z9uF/aVSmAkKybjIRYYApn0isOZQ4rQb8vxez4BjbnvoxnvxP3BBUH/efKqL+2FqdvOsBHMXRJrsmvhmouwnlLdAoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161072339865192.96330941283941; Fri, 15 Jan 2021 07:09:58 -0800 (PST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-kWGvcGHLMZ2KxHAKs8eYAw-1; Fri, 15 Jan 2021 10:09:54 -0500 Received: by mail-ej1-f71.google.com with SMTP id q11so3702426ejd.0 for ; Fri, 15 Jan 2021 07:09:54 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id g18sm3999142edt.2.2021.01.15.07.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 07:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610723397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RNVtd4o7MvAgZeXi6TxxZ/2iuwmVNRUF2Da2XYVkLog=; b=FCR5QvHDPwzWQ5XBxApSuWaLohGuAnfetSi02IVyg7+eQFSTEHlLc3pVSQ8eETl8yjG/uu KPzTwuiisa/Q12kcLyFISGdEJW98Yfczw/RjkHAMd8EH/BkpMP0H9eCr+XQNdJSgLRJbET 5THq0sS9HD6B7YK4UO6+5Z9bf4vne48= X-MC-Unique: kWGvcGHLMZ2KxHAKs8eYAw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RNVtd4o7MvAgZeXi6TxxZ/2iuwmVNRUF2Da2XYVkLog=; b=I0fOa4HlWJdb/93w2VmJMwV5JZa51RKYYZ8B1ogXjXBWg/MQsJX1n8Nk2W2IkXBPcu iZdSFV3BQjdKhy/KbGFcH+PakdA9NVz9DNSwzRw3bPSTUHyWn50b5Z02AtFoB4cTIoV0 9FO8N+ZhwNou5myBQtKWAkbQ8RFafq7P/YSC3JPfAm9nEoyCFHK0XEkkjLOTdfV431c8 61p/krB1Kygiq/MBwSbWVCudGU/fMrBYv54kVzhBtWY6rgHPRJOaClSyIb8aiJdxyRxX x6tbxGQ/rKmNFgELctiecK3HJn4fT3v/EJ8hmM5eHiU0HdzNYePgvREUZOfde70+cO66 Auqg== X-Gm-Message-State: AOAM532Zvlo8WyZqUnMDZsD/VL2K1ZfFs24hodlXG4q1JvmvrgSgmxIs kOwSFmFjXP+quonctRgnYBQ+jY3g19QwYVfMc1qsPNueqfLIhsYkujpfDTdX3B1eOT7gooEIEO4 cDduP994I2tKBig== X-Received: by 2002:a50:d50a:: with SMTP id u10mr9732741edi.58.1610723393158; Fri, 15 Jan 2021 07:09:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZX7BZh8OokyHz8V9cno3q0hxctCJzdYu6oh4ydjgQckYRiWv47ayXW8h+eZX2Q6FTAAr13g== X-Received: by 2002:a50:d50a:: with SMTP id u10mr9732732edi.58.1610723393038; Fri, 15 Jan 2021 07:09:53 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Thomas Huth , Laurent Vivier , Paolo Bonzini , Li Qiang , Alexander Bulekov , Hannes Reinecke , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/4] tests/qtest: Make fuzz-test generic to all targets Date: Fri, 15 Jan 2021 16:09:34 +0100 Message-Id: <20210115150936.3333282-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210115150936.3333282-1-philmd@redhat.com> References: <20210115150936.3333282-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Tests in fuzz-test's main() already check for the supported architecture before adding tests, therefore this test is not specific to the X86 target. Move it to the generic set. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index bcbb04d2bb4..874f5d34674 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -13,7 +13,9 @@ 'qom-test', 'test-hmp', 'qos-test', + 'fuzz-test', ] + if config_host.has_key('CONFIG_MODULES') qtests_generic +=3D [ 'modules-test' ] endif @@ -50,7 +52,6 @@ 'bios-tables-test', 'rtc-test', 'i440fx-test', - 'fuzz-test', 'fw_cfg-test', 'device-plug-test', 'drive_del-test', --=20 2.26.2 From nobody Fri May 10 02:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610723405; cv=none; d=zohomail.com; s=zohoarc; b=e06UoL7+tKpgZnKocKKoKobYb3qFy8rmeriYqGe4T4bZILokkEFzO50SUaREgx0DhSi+Dm4tGu9YaGX9ZTWh4JNAEVb7MRjuQdPWK1iiwS6InZOggZO6qB+4k/b62r32EDuJxR1M50VNeT3MetO79fKUSAvCNhcdUqaOKIYNwWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610723405; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=0/+/AX09CbbEizWPkEMvsyLmancVxaiGyOdttwtAppI=; b=SaskwP+Ne+YBrmulF0MSDHk1mCMPuYI5cW2AOgrGGIexFzPTrFTIXW9UaPgU7E0KnF+zObb7s2dhVNKfsGFl52X9Eindzbwq6i34HUnBQFa9m6HzSb1JSgFjhUDnEKCXxpn5ftsoZpuQ+XKYapalMlJiw9YIe5OhQ7NLgeEbOjQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1610723405136896.9954390589387; Fri, 15 Jan 2021 07:10:05 -0800 (PST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-m4QDGPvJNXe47_FZQhPhAQ-1; Fri, 15 Jan 2021 10:10:00 -0500 Received: by mail-ej1-f71.google.com with SMTP id x22so3684091ejb.10 for ; Fri, 15 Jan 2021 07:09:59 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id h12sm3667242eja.113.2021.01.15.07.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 07:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610723404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0/+/AX09CbbEizWPkEMvsyLmancVxaiGyOdttwtAppI=; b=MLhA3QDqLkgcfmjRfQKmxxbgjU89y/+5i9xlRYsyv1Za2VEIOA/c/xA7u1TfYwR7TrYm0a PirYFUzfkEQ3wslqrW9LBIQ3YqZM9LuoH1SbBQsQnO8Pt/mI7o5CAkRMD5ICagisPGB0Nj iScoID7X4jU2/EyW49Is5iSzQvfDPNQ= X-MC-Unique: m4QDGPvJNXe47_FZQhPhAQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0/+/AX09CbbEizWPkEMvsyLmancVxaiGyOdttwtAppI=; b=KUPNoEI7/RFLEYP8wyjIWtho5/ADJC3YSO8C979sxS+CbWppDJ6zsq+wOnIRaHkUCe SWYgrD8d9YEpKYsmOmufxfCUszOtgYYrSfZ7Q+dnfnplxdOkTfEonBcypXPorLu3i60z 6dk5Njqyh8RFzhxvt9Y/fJRf7kgQ829kkz7y2Ufi56ZUmJ46LXrdQP2gGF3YikdwvPyn PzwduNBVmC/v3fi5VlzrXpU9CqQMs37k6NEvUSKCkwDeM+VgkDtn22C1mseobwhbuC2V znFJqtMcZKWeYZLFU4B+125U9jeXhbNhtB6p9jhxZKYAgM/58cplLY3U53j1dIXgy6dU IpBQ== X-Gm-Message-State: AOAM531bUcAH1rXCwr/IoNQbk9j6K1YgaXtRxQko3WGQO/73+Uy7m+If 8L6VrDhPzc1HvbkgU0xxefzVzXP5eBHjTie7fKqSYPae0unO0xufISW3z3bmYp1hC4E1jZe/Wve qt03FgxsB6DpO9Q== X-Received: by 2002:a05:6402:1c0f:: with SMTP id ck15mr1048686edb.171.1610723398746; Fri, 15 Jan 2021 07:09:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRmYcfzEbNzRbED9BztKtmSiCCZaTKca9N4JmFSnyd7nzKI3T6HAWLZwmTzZm+xxAptnmmzw== X-Received: by 2002:a05:6402:1c0f:: with SMTP id ck15mr1048665edb.171.1610723398539; Fri, 15 Jan 2021 07:09:58 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Thomas Huth , Laurent Vivier , Paolo Bonzini , Li Qiang , Alexander Bulekov , Hannes Reinecke , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] tests/qtest: Only run fuzz-megasas-test if megasas device is available Date: Fri, 15 Jan 2021 16:09:35 +0100 Message-Id: <20210115150936.3333282-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210115150936.3333282-1-philmd@redhat.com> References: <20210115150936.3333282-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This test fails when QEMU is built without the megasas device, restrict it to its availability. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/fuzz-megasas-test.c | 49 +++++++++++++++++++++++++++++++++ tests/qtest/fuzz-test.c | 25 ----------------- MAINTAINERS | 1 + tests/qtest/meson.build | 4 ++- 4 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 tests/qtest/fuzz-megasas-test.c diff --git a/tests/qtest/fuzz-megasas-test.c b/tests/qtest/fuzz-megasas-tes= t.c new file mode 100644 index 00000000000..940a76bf25a --- /dev/null +++ b/tests/qtest/fuzz-megasas-test.c @@ -0,0 +1,49 @@ +/* + * QTest fuzzer-generated testcase for megasas device + * + * Copyright (c) 2020 Li Qiang + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" + +#include "libqos/libqtest.h" + +/* + * This used to trigger the assert in scsi_dma_complete + * https://bugs.launchpad.net/qemu/+bug/1878263 + */ +static void test_lp1878263_megasas_zero_iov_cnt(void) +{ + QTestState *s; + + s =3D qtest_init("-nographic -monitor none -serial none " + "-M q35 -device megasas -device scsi-cd,drive=3Dnull0 " + "-blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull0"); + qtest_outl(s, 0xcf8, 0x80001818); + qtest_outl(s, 0xcfc, 0xc101); + qtest_outl(s, 0xcf8, 0x8000181c); + qtest_outl(s, 0xcf8, 0x80001804); + qtest_outw(s, 0xcfc, 0x7); + qtest_outl(s, 0xcf8, 0x8000186a); + qtest_writeb(s, 0x14, 0xfe); + qtest_writeb(s, 0x0, 0x02); + qtest_outb(s, 0xc1c0, 0x17); + qtest_quit(s); +} + +int main(int argc, char **argv) +{ + const char *arch =3D qtest_get_arch(); + + g_test_init(&argc, &argv, NULL); + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", + test_lp1878263_megasas_zero_iov_cnt); + } + + return g_test_run(); +} diff --git a/tests/qtest/fuzz-test.c b/tests/qtest/fuzz-test.c index cdb1100a0b8..6188fbb8e96 100644 --- a/tests/qtest/fuzz-test.c +++ b/tests/qtest/fuzz-test.c @@ -11,29 +11,6 @@ =20 #include "libqos/libqtest.h" =20 -/* - * This used to trigger the assert in scsi_dma_complete - * https://bugs.launchpad.net/qemu/+bug/1878263 - */ -static void test_lp1878263_megasas_zero_iov_cnt(void) -{ - QTestState *s; - - s =3D qtest_init("-nographic -monitor none -serial none " - "-M q35 -device megasas -device scsi-cd,drive=3Dnull0 " - "-blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull0"); - qtest_outl(s, 0xcf8, 0x80001818); - qtest_outl(s, 0xcfc, 0xc101); - qtest_outl(s, 0xcf8, 0x8000181c); - qtest_outl(s, 0xcf8, 0x80001804); - qtest_outw(s, 0xcfc, 0x7); - qtest_outl(s, 0xcf8, 0x8000186a); - qtest_writeb(s, 0x14, 0xfe); - qtest_writeb(s, 0x0, 0x02); - qtest_outb(s, 0xc1c0, 0x17); - qtest_quit(s); -} - static void test_lp1878642_pci_bus_get_irq_level_assert(void) { QTestState *s; @@ -104,8 +81,6 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); =20 if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", - test_lp1878263_megasas_zero_iov_cnt); qtest_add_func("fuzz/test_lp1878642_pci_bus_get_irq_level_assert", test_lp1878642_pci_bus_get_irq_level_assert); qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", diff --git a/MAINTAINERS b/MAINTAINERS index cb0656aec3d..b2ef820a9fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1925,6 +1925,7 @@ S: Supported F: hw/scsi/megasas.c F: hw/scsi/mfi.h F: tests/qtest/megasas-test.c +F: tests/qtest/fuzz-megasas-test.c =20 Network packet abstractions M: Dmitry Fleytman diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 874f5d34674..a24e7f1c34a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -4,7 +4,9 @@ subdir_done() endif =20 -qtests_generic =3D [ +qtests_generic =3D \ + (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-= test'] : []) + \ + [ 'cdrom-test', 'device-introspect-test', 'machine-none-test', --=20 2.26.2 From nobody Fri May 10 02:20:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610723410; cv=none; d=zohomail.com; s=zohoarc; b=kpxxcQDneQlH8/HMa2/oGJmRrUhFRtCG2XkGRRxSo4EbXsW+5dUw5r8bsj3P5sam0GswOHXpYBtZvkMSN5uWt6+LntL9ENv03WH9gKFus73CFdna7a+kLw1RH0OtPHec9cSiv1RVgRIto43yW5iFUapab6aKderVPSQlD1FBnGs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610723410; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HJ2rym1EGto3bV2T1JhEJ1XWDZjEYMIZIVaj040uhTQ=; b=b/ZelfRC7KCJgYxfxPPz4NSoYoZtslEE40nvlOYlXZ+iojttfOGgNsKC6xTX2ZlTyKq+zCHuD7Z+dA+THWslKJTP9BWrxE5WholLmkmCQsud67HLgRDWGhthzj/KnnO8uYmZTTfC2A6AOPf8fLlPERT+nvdvqkaZbzAEGUB/uMc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1610723410007240.3439321105035; Fri, 15 Jan 2021 07:10:10 -0800 (PST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-571-NYtOS84RNjuMDl1wurS_3w-1; Fri, 15 Jan 2021 10:10:05 -0500 Received: by mail-ej1-f71.google.com with SMTP id k3so3676769ejr.16 for ; Fri, 15 Jan 2021 07:10:05 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id e10sm3451718ejx.48.2021.01.15.07.10.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 07:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610723409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HJ2rym1EGto3bV2T1JhEJ1XWDZjEYMIZIVaj040uhTQ=; b=MROHZtkXjvR7MVPecQyhZL+JRdj1AC9+O6ScXkfH6A20ITORjwFk4XXvFd/0lGLRUt4Qh4 IHdG3Q3StpV7xStn8LpmgXx+4s948xj0T27ILjqjCrIhDR/6f5pK4qy98ys87jMy6MGhss gJsHuZQ2Q14krzVVbHE5PPqTHNQ7SWc= X-MC-Unique: NYtOS84RNjuMDl1wurS_3w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HJ2rym1EGto3bV2T1JhEJ1XWDZjEYMIZIVaj040uhTQ=; b=VIXFB0BF131yNyrZw3VuX0AlgNeWvfjeNkHkiS8SMrgTkxmsvlc+V59cDsY+ceGTle BT20atBF5z7NzNU2O+WI8jLKg+B9cF+Z1b+pH2q52M14bQhVFph9dVmgFid62R9WX1+w fv9pipkd43nVu6viR3gT0V7JNes6inltPHesyeDMY41H06aC/2SDs7M3crbJ1eG7TYCC ZC0ThtvfT671g/HU4kJOGz+2VKWPhD6VtHGPZeVINZ5iM++hMn8fQpKg3nWgWlX2KoHF FoUaXToY5fHRxebqL2HDtvNuYxawl/1r6pDYDkwbf9BPxZ0h/mQ5bqqaP1DghaytZPGl E/Ng== X-Gm-Message-State: AOAM531o+qKiS986rzeSqIaBav+lc4YoD3syQ7ddLQqkwJ7/yw5h3VXh kIzZqZUhG6PSka6veQG6iuHL2Z2coZTEAido4u68dEsTYIA3hEH0JV0vgUspelfCS5/GPrH9ecA NCETjjVcqyFoGjw== X-Received: by 2002:aa7:d2c9:: with SMTP id k9mr9935668edr.74.1610723404341; Fri, 15 Jan 2021 07:10:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzS9HcSW/ye/BYS4c6NE910JKgkETEr3jv/sG4sMOuI9zLsvHfRF3VeU1yphcgZ6TBvjveDDQ== X-Received: by 2002:aa7:d2c9:: with SMTP id k9mr9935648edr.74.1610723404157; Fri, 15 Jan 2021 07:10:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Fam Zheng , Thomas Huth , Laurent Vivier , Paolo Bonzini , Li Qiang , Alexander Bulekov , Hannes Reinecke , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" Subject: [PATCH 4/4] tests/qtest: Only run fuzz-virtio-scsi when virtio-scsi is available Date: Fri, 15 Jan 2021 16:09:36 +0100 Message-Id: <20210115150936.3333282-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210115150936.3333282-1-philmd@redhat.com> References: <20210115150936.3333282-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This test fails when QEMU is built without the virtio-scsi device, restrict it to its availability. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- Cc: "Michael S. Tsirkin" Note when running check-qtest-i386 I still get this failure: qemu-system-i386: Cannot map used it comes from virtio_init_region_cache(). --- tests/qtest/fuzz-test.c | 51 -------------------- tests/qtest/fuzz-virtio-scsi-test.c | 75 +++++++++++++++++++++++++++++ MAINTAINERS | 1 + tests/qtest/meson.build | 1 + 4 files changed, 77 insertions(+), 51 deletions(-) create mode 100644 tests/qtest/fuzz-virtio-scsi-test.c diff --git a/tests/qtest/fuzz-test.c b/tests/qtest/fuzz-test.c index 6188fbb8e96..d112798afe3 100644 --- a/tests/qtest/fuzz-test.c +++ b/tests/qtest/fuzz-test.c @@ -25,55 +25,6 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(= void) qtest_quit(s); } =20 -/* - * Here a MemoryRegionCache pointed to an MMIO region but had a - * larger size than the underlying region. - */ -static void test_mmio_oob_from_memory_region_cache(void) -{ - QTestState *s; - - s =3D qtest_init("-M pc-q35-5.2 -display none -m 512M " - "-device virtio-scsi,num_queues=3D8,addr=3D03.0 "); - - qtest_outl(s, 0xcf8, 0x80001811); - qtest_outb(s, 0xcfc, 0x6e); - qtest_outl(s, 0xcf8, 0x80001824); - qtest_outl(s, 0xcf8, 0x80001813); - qtest_outl(s, 0xcfc, 0xa080000); - qtest_outl(s, 0xcf8, 0x80001802); - qtest_outl(s, 0xcfc, 0x5a175a63); - qtest_outb(s, 0x6e08, 0x9e); - qtest_writeb(s, 0x9f003, 0xff); - qtest_writeb(s, 0x9f004, 0x01); - qtest_writeb(s, 0x9e012, 0x0e); - qtest_writeb(s, 0x9e01b, 0x0e); - qtest_writeb(s, 0x9f006, 0x01); - qtest_writeb(s, 0x9f008, 0x01); - qtest_writeb(s, 0x9f00a, 0x01); - qtest_writeb(s, 0x9f00c, 0x01); - qtest_writeb(s, 0x9f00e, 0x01); - qtest_writeb(s, 0x9f010, 0x01); - qtest_writeb(s, 0x9f012, 0x01); - qtest_writeb(s, 0x9f014, 0x01); - qtest_writeb(s, 0x9f016, 0x01); - qtest_writeb(s, 0x9f018, 0x01); - qtest_writeb(s, 0x9f01a, 0x01); - qtest_writeb(s, 0x9f01c, 0x01); - qtest_writeb(s, 0x9f01e, 0x01); - qtest_writeb(s, 0x9f020, 0x01); - qtest_writeb(s, 0x9f022, 0x01); - qtest_writeb(s, 0x9f024, 0x01); - qtest_writeb(s, 0x9f026, 0x01); - qtest_writeb(s, 0x9f028, 0x01); - qtest_writeb(s, 0x9f02a, 0x01); - qtest_writeb(s, 0x9f02c, 0x01); - qtest_writeb(s, 0x9f02e, 0x01); - qtest_writeb(s, 0x9f030, 0x01); - qtest_outb(s, 0x6e10, 0x00); - qtest_quit(s); -} - int main(int argc, char **argv) { const char *arch =3D qtest_get_arch(); @@ -83,8 +34,6 @@ int main(int argc, char **argv) if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { qtest_add_func("fuzz/test_lp1878642_pci_bus_get_irq_level_assert", test_lp1878642_pci_bus_get_irq_level_assert); - qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", - test_mmio_oob_from_memory_region_cache); } =20 return g_test_run(); diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-= scsi-test.c new file mode 100644 index 00000000000..aaf6d10e189 --- /dev/null +++ b/tests/qtest/fuzz-virtio-scsi-test.c @@ -0,0 +1,75 @@ +/* + * QTest fuzzer-generated testcase for virtio-scsi device + * + * Copyright (c) 2020 Li Qiang + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" + +#include "libqos/libqtest.h" + +/* + * Here a MemoryRegionCache pointed to an MMIO region but had a + * larger size than the underlying region. + */ +static void test_mmio_oob_from_memory_region_cache(void) +{ + QTestState *s; + + s =3D qtest_init("-M pc-q35-5.2 -display none -m 512M " + "-device virtio-scsi,num_queues=3D8,addr=3D03.0 "); + + qtest_outl(s, 0xcf8, 0x80001811); + qtest_outb(s, 0xcfc, 0x6e); + qtest_outl(s, 0xcf8, 0x80001824); + qtest_outl(s, 0xcf8, 0x80001813); + qtest_outl(s, 0xcfc, 0xa080000); + qtest_outl(s, 0xcf8, 0x80001802); + qtest_outl(s, 0xcfc, 0x5a175a63); + qtest_outb(s, 0x6e08, 0x9e); + qtest_writeb(s, 0x9f003, 0xff); + qtest_writeb(s, 0x9f004, 0x01); + qtest_writeb(s, 0x9e012, 0x0e); + qtest_writeb(s, 0x9e01b, 0x0e); + qtest_writeb(s, 0x9f006, 0x01); + qtest_writeb(s, 0x9f008, 0x01); + qtest_writeb(s, 0x9f00a, 0x01); + qtest_writeb(s, 0x9f00c, 0x01); + qtest_writeb(s, 0x9f00e, 0x01); + qtest_writeb(s, 0x9f010, 0x01); + qtest_writeb(s, 0x9f012, 0x01); + qtest_writeb(s, 0x9f014, 0x01); + qtest_writeb(s, 0x9f016, 0x01); + qtest_writeb(s, 0x9f018, 0x01); + qtest_writeb(s, 0x9f01a, 0x01); + qtest_writeb(s, 0x9f01c, 0x01); + qtest_writeb(s, 0x9f01e, 0x01); + qtest_writeb(s, 0x9f020, 0x01); + qtest_writeb(s, 0x9f022, 0x01); + qtest_writeb(s, 0x9f024, 0x01); + qtest_writeb(s, 0x9f026, 0x01); + qtest_writeb(s, 0x9f028, 0x01); + qtest_writeb(s, 0x9f02a, 0x01); + qtest_writeb(s, 0x9f02c, 0x01); + qtest_writeb(s, 0x9f02e, 0x01); + qtest_writeb(s, 0x9f030, 0x01); + qtest_outb(s, 0x6e10, 0x00); + qtest_quit(s); +} + +int main(int argc, char **argv) +{ + const char *arch =3D qtest_get_arch(); + + g_test_init(&argc, &argv, NULL); + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", + test_mmio_oob_from_memory_region_cache); + } + + return g_test_run(); +} diff --git a/MAINTAINERS b/MAINTAINERS index b2ef820a9fa..fcbe3ac79a8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1717,6 +1717,7 @@ S: Supported F: include/hw/scsi/* F: hw/scsi/* F: tests/qtest/virtio-scsi-test.c +F: tests/qtest/fuzz-virtio-scsi-test.c T: git https://github.com/bonzini/qemu.git scsi-next =20 SSI diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index a24e7f1c34a..fedce3ee3c1 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -6,6 +6,7 @@ =20 qtests_generic =3D \ (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-= test'] : []) + \ + (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-t= est'] : []) + \ [ 'cdrom-test', 'device-introspect-test', --=20 2.26.2