Skip to content

vsock/test: fix wrong setsockopt() parameters

Konstantin Shkolnyy lkml netdev virtualization 8 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 0 repliesApplied 3/3
  2. v73 patches 0 repliesSuperseded
  3. v63 patches 3 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v53 patches4 repliesSuperseded
v42 patches3 repliesSuperseded
v31 patch1 replySuperseded
v21 patch1 replySuperseded
v11 patch3 repliesSuperseded

Changes in v8 from the cover letter

- Fix whitespace warnings from "checkpatch.pl --strict"
- Add maintainers to Cc:

Patches in v8 All 3 applied

#Subject and filesSizeRepliesApplied
1/3vsock/test: fix failures due to wrong SO_RCVLOWAT parametertools/testing/vsock/vsock_perf.c tools/testing/vsock/vsock_test.c+5 -50 repliesApplied
2/3vsock/test: fix parameter types in SO_VM_SOCKETS_* callstools/testing/vsock/vsock_perf.c tools/testing/vsock/vsock_test.c+19 -70 repliesApplied
3/3vsock/test: verify socket options after setting themtools/testing/vsock/control.c tools/testing/vsock/msg_zerocopy_common.c tools/testing/vsock/msg_zerocopy_common.h +6 more+181 -530 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchStefano Garzarella
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH net v8 0/3] vsock/test: fix wrong setsockopt() parameters

Parameters were created using wrong C types, which caused them to be of wrong size on some architectures, causing problems.

The problem with SO_RCVLOWAT was found on s390 (big endian), while x86-64 didn't show it. After the fix, all tests pass on s390.
Then Stefano Garzarella pointed out that SO_VM_SOCKETS_* calls might have a similar problem, which turned out to be true, hence, the second patch.

Changes for v8:
- Fix whitespace warnings from "checkpatch.pl --strict"
- Add maintainers to Cc:
Changes for v7:
- Rebase on top of https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
- Add the "net" tags to the subjects
Changes for v6:
- rework the patch #3 to avoid creating a new file for new functions, and exclude vsock_perf from calling the new functions.
- add "Reviewed-by:" to the patch #2.
Changes for v5:
- in the patch #2 replace the introduced uint64_t with unsigned long long to match documentation
- add a patch #3 that verifies every setsockopt() call.
Changes for v4:
- add "Reviewed-by:" to the first patch, and add a second patch fixing SO_VM_SOCKETS_* calls, which depends on the first one (hence, it's now a patch series.)
Changes for v3:
- fix the same problem in vsock_perf and update commit message Changes for v2:
- add "Fixes:" lines to the commit message

Konstantin Shkolnyy (3):
vsock/test: fix failures due to wrong SO_RCVLOWAT parameter vsock/test: fix parameter types in SO_VM_SOCKETS_* calls vsock/test: verify socket options after setting them

 tools/testing/vsock/control.c             |   9 +-
 tools/testing/vsock/msg_zerocopy_common.c |  10 --
 tools/testing/vsock/msg_zerocopy_common.h |   1 -
 tools/testing/vsock/util.c                | 142 ++++++++++++++++++++++
 tools/testing/vsock/util.h                |   7 ++
 tools/testing/vsock/vsock_perf.c          |  20 ++-
 tools/testing/vsock/vsock_test.c          |  75 ++++++------
 tools/testing/vsock/vsock_test_zerocopy.c |   2 +-
 tools/testing/vsock/vsock_uring_test.c    |   2 +-
 9 files changed, 204 insertions(+), 64 deletions(-)
Signature · 1 line
2.34.1