From patchwork Thu May 14 14:34:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 282723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DEFFC433E0 for ; Thu, 14 May 2020 15:07:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4ABCB205CB for ; Thu, 14 May 2020 15:07:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KVOcHED6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ABCB205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFS0-00051x-Cm for qemu-devel@archiver.kernel.org; Thu, 14 May 2020 11:07:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZEwf-0003Kl-6V for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:45 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29277 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZEwe-0000sB-BA for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589466882; 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=0fZcSJPuDm3rgQwqx1pq50sJQ8CKF/TiPFjSTzaQEVo=; b=KVOcHED6ZQg/Zv6GzaQpAR6YV4OxiGkN/lLlU+rE30xB/MyDnTGcQH6OeZrxvjGFcpFcgI CarvCf1I1gqZIveYXrPKg5JMuKflkzD5O2Nfi0mAwi4PltCCdHMTQHzziRsTHRJCs+ZIo4 SL6QCY9YXQ4Ih6SXHUWaWqU4XJMm+4I= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-83-S9x9ucT0P4uXYOZjaKer1g-1; Thu, 14 May 2020 10:34:41 -0400 X-MC-Unique: S9x9ucT0P4uXYOZjaKer1g-1 Received: by mail-wr1-f70.google.com with SMTP id 90so1656706wrg.23 for ; Thu, 14 May 2020 07:34:40 -0700 (PDT) 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=0fZcSJPuDm3rgQwqx1pq50sJQ8CKF/TiPFjSTzaQEVo=; b=eh2QxJsk6BynMgvJNeZJ4K+WdxR983xcGF2hFodkgdbXsBCvWnhTpcZoD6P7fRd04t Kbz/uYL51ZBsEsE84cfzT+8FnE5Ej5lD3hwoZzlB20ApZA1ti64dbptoIinRQ3crLAF2 fOzpnOA0Jg7fPnwX9D6n6LYpGF3tPJAuEgzQ0xP2lvDJhbneVODx1glzjnEQaDXDBa5P MNMD1+1vgyTvvItB0irb9D+DS7zT0kS9UhuONdqnlfyHiHtvHZZyOSyjM8D57RBS7wh0 Kct1cu8FxY1gcqvAGsovQbDmVdflf2dlNTQP6HKG6XTBDSysJ0X+ZMUReYedzzuxlZtV RGXw== X-Gm-Message-State: AGi0PuZlV9oUaclfnb9ze/4+fJ3yuWQax1BHgNTWCOdEk9XncZW33oeh GTCf2oWmWSbrPg5uwT+cNBSlEE4PBniuCFvktD7b1wL3s4Pg/iIUA9CkQSZ+MKlOvcFAu21nb8R GcOTFp85muSI7AsA= X-Received: by 2002:a1c:bbc5:: with SMTP id l188mr28304607wmf.163.1589466879630; Thu, 14 May 2020 07:34:39 -0700 (PDT) X-Google-Smtp-Source: APiQypK13PQWHWc8MbuQyiea9a4gfdZCEWxdWQmg3oPs/8377GIDTWyRIkPo5A9KzhduV8A3YkXXcQ== X-Received: by 2002:a1c:bbc5:: with SMTP id l188mr28304596wmf.163.1589466879479; Thu, 14 May 2020 07:34:39 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id q18sm6219068wmk.28.2020.05.14.07.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2020 07:34:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/6] tests/fuzz/Makefile: Do not link code using unavailable devices Date: Thu, 14 May 2020 16:34:28 +0200 Message-Id: <20200514143433.18569-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200514143433.18569-1-philmd@redhat.com> References: <20200514143433.18569-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Some devices availability depends on CONFIG options. Use these options to only link tests when requested device is available. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/Makefile.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qtest/fuzz/Makefile.include b/tests/qtest/fuzz/Makefile.include index cde3e9636c..f259d866c9 100644 --- a/tests/qtest/fuzz/Makefile.include +++ b/tests/qtest/fuzz/Makefile.include @@ -7,9 +7,9 @@ fuzz-obj-y += tests/qtest/fuzz/fork_fuzz.o fuzz-obj-y += tests/qtest/fuzz/qos_fuzz.o # Targets -fuzz-obj-y += tests/qtest/fuzz/i440fx_fuzz.o -fuzz-obj-y += tests/qtest/fuzz/virtio_net_fuzz.o -fuzz-obj-y += tests/qtest/fuzz/virtio_scsi_fuzz.o +fuzz-obj-$(CONFIG_PCI_I440FX) += tests/qtest/fuzz/i440fx_fuzz.o +fuzz-obj-$(CONFIG_VIRTIO_NET) += tests/qtest/fuzz/virtio_net_fuzz.o +fuzz-obj-$(CONFIG_SCSI) += tests/qtest/fuzz/virtio_scsi_fuzz.o FUZZ_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest From patchwork Thu May 14 14:34:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 282725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1C22C433DF for ; Thu, 14 May 2020 14:57:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A94DD205CB for ; Thu, 14 May 2020 14:57:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bs6cLFRk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A94DD205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFIo-0004mr-Ng for qemu-devel@archiver.kernel.org; Thu, 14 May 2020 10:57:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZEwi-0003TH-Vq for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:50986 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZEwh-0000tF-QC for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589466887; 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=7wMp/XuOBwT8pOPQVaxGqTdCRCcjqyuE5pzfypPMZ2U=; b=bs6cLFRkfj7Bune6ns/LgYLcaQbWav1UkdD5sWnX9x8NqKKOVpW6k++BBOucG7iENIVlSz h4FIPNUKyUw0CxPQBBRe8jWv3bKyV1TtkhZRF3uS4lxNnZfwgbNBxhRZKe2QU2IXeMIk4G 2NLqz6xRUTgF3HUo2YdQI5Sky44xr6E= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-506-7Yrlo0N2Mr2-1KpsFrzAgQ-1; Thu, 14 May 2020 10:34:45 -0400 X-MC-Unique: 7Yrlo0N2Mr2-1KpsFrzAgQ-1 Received: by mail-wr1-f69.google.com with SMTP id g10so1670132wrr.10 for ; Thu, 14 May 2020 07:34:45 -0700 (PDT) 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=7wMp/XuOBwT8pOPQVaxGqTdCRCcjqyuE5pzfypPMZ2U=; b=A2lNT4TyKebbm68Dese7vAr0QCLzi2uuJ3WTcPueco8O0/Pp0iv7rbt1PCI4Fr3GI3 FAgRjxf2EbUnJKVET6e2EV5/c5UGdNYjt7i7s5ZbokaDDqoeo1c/nzxeCO/Zsuj28IN0 o9AZZJ+0/Z4krDiH9x3qjZPwu3WUQ/mBMrJd6ObKb4v/5dyYEa1qtNg1npF23siq0gHf fxImr6XAAKwDnfTtqHwRpp2F1+4r0PwB9D3Q007F9oIYzP/qSb8SPcypfQURfKNLuN/9 cgo8EUhKok0nwY2b6D/muAX9k2zUQ4db54QXKYS0J9J4W2ZBl/w0ilRLMeLQgFeOHV5a fu2g== X-Gm-Message-State: AOAM531e+D0vqNiJh9PuLMo8Q+GevI8CkpX9D4NSFIc9JwgAMESH3wMq RXU01CHSFPyO/MDGNvi1EI90GGVtGLFJV+mHRv2t2AzYoDxKS8ZXJEjFvA6oKcvriEVO7HCHz+J CiLmhPqvb/0NqlVM= X-Received: by 2002:a5d:614b:: with SMTP id y11mr6175874wrt.77.1589466884269; Thu, 14 May 2020 07:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0HLo6T+C3GXvIMYkzIEsH9/8M7eocEEV031RX83rgxNeAAkwQTaYu0mnxQVUxzzcpWtmqMg== X-Received: by 2002:a5d:614b:: with SMTP id y11mr6175852wrt.77.1589466884075; Thu, 14 May 2020 07:34:44 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id h1sm40860124wme.42.2020.05.14.07.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2020 07:34:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/6] Makefile: List fuzz targets in 'make help' Date: Thu, 14 May 2020 16:34:29 +0200 Message-Id: <20200514143433.18569-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200514143433.18569-1-philmd@redhat.com> References: <20200514143433.18569-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" List softmmu fuzz targets in 'make help' output: $ make help ... Architecture specific targets: aarch64-softmmu/all - Build for aarch64-softmmu aarch64-softmmu/fuzz - Build fuzzer for aarch64-softmmu alpha-softmmu/all - Build for alpha-softmmu alpha-softmmu/fuzz - Build fuzzer for alpha-softmmu arm-softmmu/all - Build for arm-softmmu arm-softmmu/fuzz - Build fuzzer for arm-softmmu ... Signed-off-by: Philippe Mathieu-Daudé --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 34275f57c9..40e4f7677b 100644 --- a/Makefile +++ b/Makefile @@ -1252,7 +1252,11 @@ endif @$(if $(TARGET_DIRS), \ echo 'Architecture specific targets:'; \ $(foreach t, $(TARGET_DIRS), \ - $(call print-help-run,$(t)/all,Build for $(t));) \ + $(call print-help-run,$(t)/all,Build for $(t)); \ + $(if $(CONFIG_FUZZ), \ + $(if $(findstring softmmu,$(t)), \ + $(call print-help-run,$(t)/fuzz,Build fuzzer for $(t)); \ + ))) \ echo '') @$(if $(TOOLS), \ echo 'Tools targets:'; \ From patchwork Thu May 14 14:34:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 282724 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7F82C433E0 for ; Thu, 14 May 2020 15:02:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A594D20643 for ; Thu, 14 May 2020 15:02:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bh90yliI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A594D20643 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFNA-0003iD-Np for qemu-devel@archiver.kernel.org; Thu, 14 May 2020 11:02:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZEws-0003jB-4C for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:32354 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZEwr-0000yR-8W for qemu-devel@nongnu.org; Thu, 14 May 2020 10:34:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589466896; 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=lZ1u6qNZotSgU2037p6zpII9seREemya6EtGwZgs+40=; b=bh90yliIuMyuWCFH3bMIFpvrbYr+lEBYqUJdd9zNt5MUskEB4YxZF/9wk72fx7GvpmyHmI ixWGKSezsU73dcWa+jgfGTRXdE+thPqxLTiAaju+VsQa1mXfZen9NizpbpLx/X5KofyAM9 rrusECA4cysfb6HfuxusOlMY/Xfi3TI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-L44-yClhM2ODLziVKGjt1A-1; Thu, 14 May 2020 10:34:55 -0400 X-MC-Unique: L44-yClhM2ODLziVKGjt1A-1 Received: by mail-wm1-f72.google.com with SMTP id q5so13575547wmc.9 for ; Thu, 14 May 2020 07:34:54 -0700 (PDT) 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=lZ1u6qNZotSgU2037p6zpII9seREemya6EtGwZgs+40=; b=Sd8RueTkmd+W2uHFWsXDFA2K7pQmucPDUELBNtSK6Tpb0khoNab8OCuvk9rvjZ4BEU cNTmwbvVA6Kz5o/62avA+fZwkNhBjCsMrS9X9/ob42G6Bnsp8YoQM9zkLXZIrFFu5Xhw twgoDoePjBNgY+lit2kP9z03hXK46OIKFeR14x2rPPRCe1WTFJilnMRfd+m6HZXKxcPe kA0BWvi+D7uoVVJ+S4tQ+RX1U7VeO80ataym0whmZUwFSk9GnwUs+kLBJYSZR3mft0NX JKPcZUIgtSv3hSevS2rE2QDqErDbwiZHALsFC5iU1nWf6zeWDvks/ujiF0dbCeArXmHb yJIw== X-Gm-Message-State: AOAM530gX/pwFuxxwnDhf8WJaRaovfE8ufAH3t7CvAEKOkY2ryXIZrgy 72Ppvou1QDEYp9FD2Qpobqv3c+4nOhlF9D6ocGjXnJHyKsiybyK9cUzvyYwBra2TUUq1NyOWZzC 5bhN+DcBllljNTdU= X-Received: by 2002:a5d:5105:: with SMTP id s5mr5887749wrt.202.1589466893760; Thu, 14 May 2020 07:34:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYhEwP2vSKQSTCH6UQ0+PvQcHOfYvpcR5pJ8b2UKz9ijVcmwRgA+DFo8SxlApETN+s1XUYkg== X-Received: by 2002:a5d:5105:: with SMTP id s5mr5887740wrt.202.1589466893614; Thu, 14 May 2020 07:34:53 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id s14sm38387741wmh.18.2020.05.14.07.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2020 07:34:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/6] tests/fuzz: Remove unuseful/unused typedefs Date: Thu, 14 May 2020 16:34:31 +0200 Message-Id: <20200514143433.18569-5-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200514143433.18569-1-philmd@redhat.com> References: <20200514143433.18569-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" These typedefs are not used. Use a simple structure, remote the typedefs. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/i440fx_fuzz.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c index 96fed9ff12..c197b026db 100644 --- a/tests/qtest/fuzz/i440fx_fuzz.c +++ b/tests/qtest/fuzz/i440fx_fuzz.c @@ -45,12 +45,11 @@ static void i440fx_fuzz_qtest(QTestState *s, * loop over the Data, breaking it up into actions. each action has an * opcode, address offset and value */ - typedef struct QTestFuzzAction { + struct { uint8_t opcode; uint8_t addr; uint32_t value; - } QTestFuzzAction; - QTestFuzzAction a; + } a; while (Size >= sizeof(a)) { /* make a copy of the action so we can normalize the values in-place */ @@ -91,19 +90,18 @@ static void i440fx_fuzz_qos(QTestState *s, * Same as i440fx_fuzz_qtest, but using QOS. devfn is incorporated into the * value written over Port IO */ - typedef struct QOSFuzzAction { + struct { uint8_t opcode; uint8_t offset; int devfn; uint32_t value; - } QOSFuzzAction; + } a; static QPCIBus *bus; if (!bus) { bus = qpci_new_pc(s, fuzz_qos_alloc); } - QOSFuzzAction a; while (Size >= sizeof(a)) { memcpy(&a, Data, sizeof(a)); switch (a.opcode % ACTION_MAX) { From patchwork Thu May 14 14:34:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 282722 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C02CC433E1 for ; Thu, 14 May 2020 15:09:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D20DB206A5 for ; Thu, 14 May 2020 15:09:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KHNy4d5y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D20DB206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFU4-0008JK-1k for qemu-devel@archiver.kernel.org; Thu, 14 May 2020 11:09:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZEx1-0003tU-VP for qemu-devel@nongnu.org; Thu, 14 May 2020 10:35:08 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:24490 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZEx1-00013U-1x for qemu-devel@nongnu.org; Thu, 14 May 2020 10:35:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589466906; 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=Q3QIbJXM9pRHScH3rDPsZVXm/otU1/pByMMT1prfehI=; b=KHNy4d5yT7L7cr7QYULeo2hfZuWf358vU0NJCY8Ih+SOMIhP/c7xxT6DddH062B+w2KqMN uc/k2RYDv2QNp3t/S3KCJIxzgt+dtqbGwwEFnCUjYM+Fp7i4O3f2WymNMHcLCvQXsphKP4 MtapFwmFbGWy4e8pgDTjCXeYJPQSHC8= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-6LXpoPmPPH2jSa8KQ72AlQ-1; Thu, 14 May 2020 10:35:04 -0400 X-MC-Unique: 6LXpoPmPPH2jSa8KQ72AlQ-1 Received: by mail-wm1-f70.google.com with SMTP id a67so7443586wme.6 for ; Thu, 14 May 2020 07:35:04 -0700 (PDT) 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=Q3QIbJXM9pRHScH3rDPsZVXm/otU1/pByMMT1prfehI=; b=Lvd5O7Sl5Sqs2QVycHRsYrtEnzwk8475E1JZPF+nU7DFwvA7UMZthHdFx3Xxg+nUrU +V21z9eJKIFtZ7wlwki4fxlGt9CwDTFFn2PLF64dhXaWuDVMWF93vBy7aTA9wb8Bp/AW Sj7GAY41yxM+9/VUZdh0Utlqaw/Q46vkP4ollQRC8UNEdlVwJRdIqm3H+JrEtfo3HADz GRf+7OmlTJfAngC21hkav8BYANJI9jm4DH9Q1jAckng1ESjhzPxO6FP+qj5S9WFojdo8 Qb4NTPmbhGwXflIvuoGkRtt+A2smTBx2aAwOn9zwpLBT255bjc/3wNTouU2XEaLmNJS3 hZYA== X-Gm-Message-State: AGi0PubiR8SQvsUuzUCsjeKW8CHnKLjX+W++B7ZgVqkwVea8Bgsh9/aH /Qn40czKcnrYDMNhl3H3EwInS4bQCp2j5JtNDHFOq+meHJHNLMQxubyEBhulJm4eumjqqe/Vxt8 b7lvGHxIDENzrLUo= X-Received: by 2002:a1c:7513:: with SMTP id o19mr46198977wmc.9.1589466903178; Thu, 14 May 2020 07:35:03 -0700 (PDT) X-Google-Smtp-Source: APiQypIONK3Ds0IOOywOiutQSJ69nJA31MfqA8Tmk9/E8YaCrFKUG562DUxyD3H+uKCZezZNxa2ckA== X-Received: by 2002:a1c:7513:: with SMTP id o19mr46198955wmc.9.1589466902941; Thu, 14 May 2020 07:35:02 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id t4sm4882445wri.54.2020.05.14.07.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2020 07:35:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 6/6] tests/fuzz: Extract ioport_fuzz_qtest() method Date: Thu, 14 May 2020 16:34:33 +0200 Message-Id: <20200514143433.18569-7-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200514143433.18569-1-philmd@redhat.com> References: <20200514143433.18569-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 22:25:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Extract generic ioport_fuzz_qtest() method from i440fx_fuzz_qtest(). This will help to write tests not specific to the i440FX controller. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/fuzz/i440fx_fuzz.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c index 558fa17c93..bcd6769b4c 100644 --- a/tests/qtest/fuzz/i440fx_fuzz.c +++ b/tests/qtest/fuzz/i440fx_fuzz.c @@ -39,7 +39,7 @@ enum action_id { ACTION_MAX }; -static void i440fx_fuzz_qtest(QTestState *s, +static void ioport_fuzz_qtest(QTestState *s, const unsigned char *Data, size_t Size) { /* * loop over the Data, breaking it up into actions. each action has an @@ -84,10 +84,17 @@ static void i440fx_fuzz_qtest(QTestState *s, flush_events(s); } +static void i440fx_fuzz_qtest(QTestState *s, + const unsigned char *Data, + size_t Size) +{ + ioport_fuzz_qtest(s, Data, Size); +} + static void pciconfig_fuzz_qos(QTestState *s, QPCIBus *bus, const unsigned char *Data, size_t Size) { /* - * Same as i440fx_fuzz_qtest, but using QOS. devfn is incorporated into the + * Same as ioport_fuzz_qtest, but using QOS. devfn is incorporated into the * value written over Port IO */ struct {