tools/testing/vsock/vsock_test.c | 211 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+)
This adds two tests: for receive timeout and reading to invalid buffer provided by user. I forgot to put both patches to main patchset. Arseniy Krasnov(2): af_vsock: SOCK_SEQPACKET receive timeout test af_vsock: SOCK_SEQPACKET broken buffer test tools/testing/vsock/vsock_test.c | 211 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) v1 -> v2: see every patch after '---' line. -- 2.25.1
On Wed, Mar 16, 2022 at 07:25:07AM +0000, Krasnov Arseniy Vladimirovich wrote:
>This adds two tests: for receive timeout and reading to invalid
>buffer provided by user. I forgot to put both patches to main
>patchset.
>
>Arseniy Krasnov(2):
>
>af_vsock: SOCK_SEQPACKET receive timeout test
>af_vsock: SOCK_SEQPACKET broken buffer test
>
>tools/testing/vsock/vsock_test.c | 211 +++++++++++++++++++++++++++++++++++++++
>1 file changed, 211 insertions(+)
I think there are only small things to fix, so next series you can
remove RFC (remember to use net-next).
I added the tests to my suite and everything is running correctly.
I also suggest you to solve these little issues that checkpatch has
highlighted to have patches ready for submission :-)
Thanks,
Stefano
$ ./scripts/checkpatch.pl --strict -g master..HEAD
---------------------------------------------------------------------
Commit 2a1bfb93b51d ("af_vsock: SOCK_SEQPACKET receive timeout test")
---------------------------------------------------------------------
CHECK: Unnecessary parentheses around 'errno != EAGAIN'
#70: FILE: tools/testing/vsock/vsock_test.c:434:
+ if ((read(fd, &dummy, sizeof(dummy)) != -1) ||
+ (errno != EAGAIN)) {
WARNING: From:/Signed-off-by: email name mismatch: 'From: Krasnov Arseniy Vladimirovich <AVKrasnov@sberdevices.ru>' != 'Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>'
total: 0 errors, 1 warnings, 1 checks, 97 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
Commit 2a1bfb93b51d ("af_vsock: SOCK_SEQPACKET receive timeout test") has style problems, please review.
-------------------------------------------------------------------
Commit 9176bcabcdd7 ("af_vsock: SOCK_SEQPACKET broken buffer test")
-------------------------------------------------------------------
CHECK: Comparison to NULL could be written "!buf1"
#51: FILE: tools/testing/vsock/vsock_test.c:486:
+ if (buf1 == NULL) {
CHECK: Comparison to NULL could be written "!buf2"
#57: FILE: tools/testing/vsock/vsock_test.c:492:
+ if (buf2 == NULL) {
CHECK: Please don't use multiple blank lines
#152: FILE: tools/testing/vsock/vsock_test.c:587:
+
+
WARNING: From:/Signed-off-by: email name mismatch: 'From: Krasnov Arseniy Vladimirovich <AVKrasnov@sberdevices.ru>' != 'Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>'
total: 0 errors, 1 warnings, 3 checks, 150 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
Commit 9176bcabcdd7 ("af_vsock: SOCK_SEQPACKET broken buffer test") has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
On 16.03.2022 11:58, Stefano Garzarella wrote:
> On Wed, Mar 16, 2022 at 07:25:07AM +0000, Krasnov Arseniy Vladimirovich wrote:
>> This adds two tests: for receive timeout and reading to invalid
>> buffer provided by user. I forgot to put both patches to main
>> patchset.
>>
>> Arseniy Krasnov(2):
>>
>> af_vsock: SOCK_SEQPACKET receive timeout test
>> af_vsock: SOCK_SEQPACKET broken buffer test
>>
>> tools/testing/vsock/vsock_test.c | 211 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 211 insertions(+)
>
> I think there are only small things to fix, so next series you can remove RFC (remember to use net-next).
>
> I added the tests to my suite and everything is running correctly.
>
> I also suggest you to solve these little issues that checkpatch has highlighted to have patches ready for submission :-)
>
> Thanks,
> Stefano
>
> $ ./scripts/checkpatch.pl --strict -g master..HEAD
> ---------------------------------------------------------------------
> Commit 2a1bfb93b51d ("af_vsock: SOCK_SEQPACKET receive timeout test")
> ---------------------------------------------------------------------
> CHECK: Unnecessary parentheses around 'errno != EAGAIN'
> #70: FILE: tools/testing/vsock/vsock_test.c:434:
> + if ((read(fd, &dummy, sizeof(dummy)) != -1) ||
> + (errno != EAGAIN)) {
>
> WARNING: From:/Signed-off-by: email name mismatch: 'From: Krasnov Arseniy Vladimirovich <AVKrasnov@sberdevices.ru>' != 'Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>'
>
> total: 0 errors, 1 warnings, 1 checks, 97 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
>
> Commit 2a1bfb93b51d ("af_vsock: SOCK_SEQPACKET receive timeout test") has style problems, please review.
> -------------------------------------------------------------------
> Commit 9176bcabcdd7 ("af_vsock: SOCK_SEQPACKET broken buffer test")
> -------------------------------------------------------------------
> CHECK: Comparison to NULL could be written "!buf1"
> #51: FILE: tools/testing/vsock/vsock_test.c:486:
> + if (buf1 == NULL) {
>
> CHECK: Comparison to NULL could be written "!buf2"
> #57: FILE: tools/testing/vsock/vsock_test.c:492:
> + if (buf2 == NULL) {
>
> CHECK: Please don't use multiple blank lines
> #152: FILE: tools/testing/vsock/vsock_test.c:587:
> +
> +
>
> WARNING: From:/Signed-off-by: email name mismatch: 'From: Krasnov Arseniy Vladimirovich <AVKrasnov@sberdevices.ru>' != 'Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>'
>
> total: 0 errors, 1 warnings, 3 checks, 150 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
>
> Commit 9176bcabcdd7 ("af_vsock: SOCK_SEQPACKET broken buffer test") has style problems, please review.
>
> NOTE: If any of the errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
Ack
>
>
>
>
© 2016 - 2026 Red Hat, Inc.