[Qemu-devel] [RFC 03/19] fuzz: add fuzz accelerator

Oleinik, Alexander posted 19 patches 6 years, 6 months ago
Maintainers: Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Juan Quintela <quintela@redhat.com>, Richard Henderson <rth@twiddle.net>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
[Qemu-devel] [RFC 03/19] fuzz: add fuzz accelerator
Posted by Oleinik, Alexander 6 years, 6 months ago
Much like the qtest accelerator, the fuzz accelerator skips the CPU
emulation

Signed-off-by: Alexander Oleinik <alxndr@bu.edu>
---
 include/sysemu/qtest.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index cd114b8d80..adfbd10d20 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -23,7 +23,12 @@ static inline bool qtest_enabled(void)
 }
 
 bool qtest_driver(void);
-
+#ifdef CONFIG_FUZZ
+/* Both the client and the server have qtest_init's, Rename on of them... */
+void qtest_init_server(const char *qtest_chrdev, const char *qtest_log, Error **errp);
+void qtest_server_recv(GString *inbuf); /* Client sends commands using this */
+#else
 void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
+#endif
 
 #endif
-- 
2.20.1


Re: [Qemu-devel] [RFC 03/19] fuzz: add fuzz accelerator
Posted by Paolo Bonzini 6 years, 6 months ago
On 25/07/19 05:23, Oleinik, Alexander wrote:
> +#ifdef CONFIG_FUZZ
> +/* Both the client and the server have qtest_init's, Rename on of them... */
> +void qtest_init_server(const char *qtest_chrdev, const char *qtest_log, Error **errp);

Just rename it in qtest.c and vl.c.

> +void qtest_server_recv(GString *inbuf); /* Client sends commands using this */

Please define this in this patch already.

> +#else
>  void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
> +#endif
>  


Re: [Qemu-devel] [RFC 03/19] fuzz: add fuzz accelerator
Posted by Stefan Hajnoczi 6 years, 6 months ago
On Thu, Jul 25, 2019 at 03:23:46AM +0000, Oleinik, Alexander wrote:
> Much like the qtest accelerator, the fuzz accelerator skips the CPU
> emulation
> 
> Signed-off-by: Alexander Oleinik <alxndr@bu.edu>
> ---
>  include/sysemu/qtest.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
> index cd114b8d80..adfbd10d20 100644
> --- a/include/sysemu/qtest.h
> +++ b/include/sysemu/qtest.h
> @@ -23,7 +23,12 @@ static inline bool qtest_enabled(void)
>  }
>  
>  bool qtest_driver(void);
> -
> +#ifdef CONFIG_FUZZ
> +/* Both the client and the server have qtest_init's, Rename on of them... */

s/on/one/

> +void qtest_init_server(const char *qtest_chrdev, const char *qtest_log, Error **errp);
> +void qtest_server_recv(GString *inbuf); /* Client sends commands using this */

qtest_server_init() is more consistent since the other function is
called qtest_server_recv().