[PATCH v3 0/2] fuzz: Skip QTest serialization

Alexander Bulekov posted 2 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200529221450.26673-1-alxndr@bu.edu
Maintainers: Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Laurent Vivier <lvivier@redhat.com>
tests/qtest/fuzz/Makefile.include |  21 +++
tests/qtest/fuzz/fuzz.c           |  20 ++-
tests/qtest/fuzz/fuzz.h           |   3 +
tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
4 files changed, 295 insertions(+), 1 deletion(-)
create mode 100644 tests/qtest/fuzz/qtest_wrappers.c
[PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by Alexander Bulekov 3 years, 11 months ago
In the same vein as Philippe's patch:

https://patchew.org/QEMU/20200528165303.1877-1-f4bug@amsat.org/

This uses linker trickery to wrap calls to libqtest functions and
directly call the corresponding read/write functions, rather than
relying on the ASCII-serialized QTest protocol.

v2: applies properly

v3: add missing qtest_wrappers.c file and fix formatting in fuzz.c

Alexander Bulekov (2):
  fuzz: skip QTest serialization
  fuzz: Add support for logging QTest commands

 tests/qtest/fuzz/Makefile.include |  21 +++
 tests/qtest/fuzz/fuzz.c           |  20 ++-
 tests/qtest/fuzz/fuzz.h           |   3 +
 tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
 4 files changed, 295 insertions(+), 1 deletion(-)
 create mode 100644 tests/qtest/fuzz/qtest_wrappers.c

-- 
2.26.2


Re: [PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20200529221450.26673-1-alxndr@bu.edu/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200529221450.26673-1-alxndr@bu.edu
Subject: [PATCH v3 0/2] fuzz: Skip QTest serialization
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
690701b fuzz: Add support for logging QTest commands
c833a8a fuzz: skip QTest serialization

=== OUTPUT BEGIN ===
1/2 Checking commit c833a8a44c55 (fuzz: skip QTest serialization)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#105: 
new file mode 100644

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#131: FILE: tests/qtest/fuzz/qtest_wrappers.c:22:
+#define WRAP(RET_TYPE, NAME_AND_ARGS)\
+    RET_TYPE __wrap_##NAME_AND_ARGS;\
+    RET_TYPE __real_##NAME_AND_ARGS;

total: 1 errors, 1 warnings, 322 lines checked

Patch 1/2 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/2 Checking commit 690701bb2f91 (fuzz: Add support for logging QTest commands)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200529221450.26673-1-alxndr@bu.edu/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by Darren Kenny 3 years, 11 months ago
Hi Alex,

In general the series looks good, so:

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>

But not sure how to handle the patchew output though, not sure if it is
really a concern or not, since do/while won't work that context.

Thanks,

Darren.

On Friday, 2020-05-29 at 18:14:48 -04, Alexander Bulekov wrote:
> In the same vein as Philippe's patch:
>
> https://patchew.org/QEMU/20200528165303.1877-1-f4bug@amsat.org/
>
> This uses linker trickery to wrap calls to libqtest functions and
> directly call the corresponding read/write functions, rather than
> relying on the ASCII-serialized QTest protocol.
>
> v2: applies properly
>
> v3: add missing qtest_wrappers.c file and fix formatting in fuzz.c
>
> Alexander Bulekov (2):
>   fuzz: skip QTest serialization
>   fuzz: Add support for logging QTest commands
>
>  tests/qtest/fuzz/Makefile.include |  21 +++
>  tests/qtest/fuzz/fuzz.c           |  20 ++-
>  tests/qtest/fuzz/fuzz.h           |   3 +
>  tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
>  4 files changed, 295 insertions(+), 1 deletion(-)
>  create mode 100644 tests/qtest/fuzz/qtest_wrappers.c
>
> -- 
> 2.26.2

Re: [PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by Alexander Bulekov 3 years, 11 months ago
Thank you Darren.

On 200602 1428, Darren Kenny wrote:
> 
> Hi Alex,
> 
> In general the series looks good, so:
> 
> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
> 
> But not sure how to handle the patchew output though, not sure if it is
> really a concern or not, since do/while won't work that context.
> 

Yes - I was not really sure how to deal with those failures, so I sent
the patch anyway. Maybe someone else knows a workaround.
-Alex

> Thanks,
> 
> Darren.
> 
> On Friday, 2020-05-29 at 18:14:48 -04, Alexander Bulekov wrote:
> > In the same vein as Philippe's patch:
> >
> > https://patchew.org/QEMU/20200528165303.1877-1-f4bug@amsat.org/
> >
> > This uses linker trickery to wrap calls to libqtest functions and
> > directly call the corresponding read/write functions, rather than
> > relying on the ASCII-serialized QTest protocol.
> >
> > v2: applies properly
> >
> > v3: add missing qtest_wrappers.c file and fix formatting in fuzz.c
> >
> > Alexander Bulekov (2):
> >   fuzz: skip QTest serialization
> >   fuzz: Add support for logging QTest commands
> >
> >  tests/qtest/fuzz/Makefile.include |  21 +++
> >  tests/qtest/fuzz/fuzz.c           |  20 ++-
> >  tests/qtest/fuzz/fuzz.h           |   3 +
> >  tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
> >  4 files changed, 295 insertions(+), 1 deletion(-)
> >  create mode 100644 tests/qtest/fuzz/qtest_wrappers.c
> >
> > -- 
> > 2.26.2

Re: [PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by Thomas Huth 3 years, 11 months ago
On 02/06/2020 15.40, Alexander Bulekov wrote:
> Thank you Darren.
> 
> On 200602 1428, Darren Kenny wrote:
>>
>> Hi Alex,
>>
>> In general the series looks good, so:
>>
>> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
>>
>> But not sure how to handle the patchew output though, not sure if it is
>> really a concern or not, since do/while won't work that context.
>>
> 
> Yes - I was not really sure how to deal with those failures, so I sent
> the patch anyway. Maybe someone else knows a workaround.
> -Alex

Don't worry, the checkpatch script is known to generate false
warnings/errors in some cases. If you've got such a case, simply state
it as a reply to the mail from patchew, and then the message from
patchew can be simply ignored.

By the way, I'm finally back to the state where I can pick up qtest
patches again (btw2, thanks for Stefan for picking up all the fuzzer
patches in the past months). So question: With your two patches here,
the patch from Philippe is not required anymore, right?

 Thanks,
  Thomas


>> On Friday, 2020-05-29 at 18:14:48 -04, Alexander Bulekov wrote:
>>> In the same vein as Philippe's patch:
>>>
>>> https://patchew.org/QEMU/20200528165303.1877-1-f4bug@amsat.org/
>>>
>>> This uses linker trickery to wrap calls to libqtest functions and
>>> directly call the corresponding read/write functions, rather than
>>> relying on the ASCII-serialized QTest protocol.
>>>
>>> v2: applies properly
>>>
>>> v3: add missing qtest_wrappers.c file and fix formatting in fuzz.c
>>>
>>> Alexander Bulekov (2):
>>>   fuzz: skip QTest serialization
>>>   fuzz: Add support for logging QTest commands
>>>
>>>  tests/qtest/fuzz/Makefile.include |  21 +++
>>>  tests/qtest/fuzz/fuzz.c           |  20 ++-
>>>  tests/qtest/fuzz/fuzz.h           |   3 +
>>>  tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
>>>  4 files changed, 295 insertions(+), 1 deletion(-)
>>>  create mode 100644 tests/qtest/fuzz/qtest_wrappers.c
>>>
>>> -- 
>>> 2.26.2
> 


Re: [PATCH v3 0/2] fuzz: Skip QTest serialization
Posted by Alexander Bulekov 3 years, 11 months ago
On 200603 1646, Thomas Huth wrote:
> On 02/06/2020 15.40, Alexander Bulekov wrote:
> > Thank you Darren.
> > 
> > On 200602 1428, Darren Kenny wrote:
> >>
> >> Hi Alex,
> >>
> >> In general the series looks good, so:
> >>
> >> Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
> >>
> >> But not sure how to handle the patchew output though, not sure if it is
> >> really a concern or not, since do/while won't work that context.
> >>
> > 
> > Yes - I was not really sure how to deal with those failures, so I sent
> > the patch anyway. Maybe someone else knows a workaround.
> > -Alex
> 
> Don't worry, the checkpatch script is known to generate false
> warnings/errors in some cases. If you've got such a case, simply state
> it as a reply to the mail from patchew, and then the message from
> patchew can be simply ignored.
> 
> By the way, I'm finally back to the state where I can pick up qtest
> patches again (btw2, thanks for Stefan for picking up all the fuzzer
> patches in the past months). So question: With your two patches here,
> the patch from Philippe is not required anymore, right?

Hi Thomas,
Yes - I think this series enables the same improvements as Philippe's
patch.
Thank you
-Alex

>  Thanks,
>   Thomas 

> 
> >> On Friday, 2020-05-29 at 18:14:48 -04, Alexander Bulekov wrote:
> >>> In the same vein as Philippe's patch:
> >>>
> >>> https://patchew.org/QEMU/20200528165303.1877-1-f4bug@amsat.org/
> >>>
> >>> This uses linker trickery to wrap calls to libqtest functions and
> >>> directly call the corresponding read/write functions, rather than
> >>> relying on the ASCII-serialized QTest protocol.
> >>>
> >>> v2: applies properly
> >>>
> >>> v3: add missing qtest_wrappers.c file and fix formatting in fuzz.c
> >>>
> >>> Alexander Bulekov (2):
> >>>   fuzz: skip QTest serialization
> >>>   fuzz: Add support for logging QTest commands
> >>>
> >>>  tests/qtest/fuzz/Makefile.include |  21 +++
> >>>  tests/qtest/fuzz/fuzz.c           |  20 ++-
> >>>  tests/qtest/fuzz/fuzz.h           |   3 +
> >>>  tests/qtest/fuzz/qtest_wrappers.c | 252 ++++++++++++++++++++++++++++++
> >>>  4 files changed, 295 insertions(+), 1 deletion(-)
> >>>  create mode 100644 tests/qtest/fuzz/qtest_wrappers.c
> >>>
> >>> -- 
> >>> 2.26.2
> > 
>