Messages in this thread | | | Date | Wed, 27 Sep 2023 09:37:46 +0200 | From | Stefano Garzarella <> | Subject | Re: [PATCH net-next v1 12/12] test/vsock: io_uring rx/tx tests |
| |
On Tue, Sep 26, 2023 at 11:00:19PM +0300, Arseniy Krasnov wrote: > > >On 26.09.2023 16:04, Stefano Garzarella wrote: >> On Fri, Sep 22, 2023 at 08:24:28AM +0300, Arseniy Krasnov wrote: >>> This adds set of tests which use io_uring for rx/tx. This test suite is >>> implemented as separated util like 'vsock_test' and has the same set of >>> input arguments as 'vsock_test'. These tests only cover cases of data >>> transmission (no connect/bind/accept etc). >>> >>> Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> >>> --- >>> Changelog: >>> v5(big patchset) -> v1: >>> * Use LDLIBS instead of LDFLAGS. >>> >>> tools/testing/vsock/Makefile | 7 +- >>> tools/testing/vsock/vsock_uring_test.c | 321 +++++++++++++++++++++++++ >>> 2 files changed, 327 insertions(+), 1 deletion(-) >>> create mode 100644 tools/testing/vsock/vsock_uring_test.c >>> >>> diff --git a/tools/testing/vsock/Makefile b/tools/testing/vsock/Makefile >>> index 1a26f60a596c..c84380bfc18d 100644 >>> --- a/tools/testing/vsock/Makefile >>> +++ b/tools/testing/vsock/Makefile >>> @@ -1,12 +1,17 @@ >>> # SPDX-License-Identifier: GPL-2.0-only >>> +ifeq ($(MAKECMDGOALS),vsock_uring_test) >>> +LDLIBS = -luring >>> +endif >>> + >> >> This will fails if for example we call make with more targets, >> e.g. `make vsock_test vsock_uring_test`. >> >> I'd suggest to use something like this: >> >> --- a/tools/testing/vsock/Makefile >> +++ b/tools/testing/vsock/Makefile >> @@ -1,13 +1,11 @@ >> # SPDX-License-Identifier: GPL-2.0-only >> -ifeq ($(MAKECMDGOALS),vsock_uring_test) >> -LDLIBS = -luring >> -endif >> - >> all: test vsock_perf >> test: vsock_test vsock_diag_test >> vsock_test: vsock_test.o vsock_test_zerocopy.o timeout.o control.o util.o >> vsock_diag_test: vsock_diag_test.o timeout.o control.o util.o >> vsock_perf: vsock_perf.o >> + >> +vsock_uring_test: LDLIBS = -luring >> vsock_uring_test: control.o util.o vsock_uring_test.o timeout.o >> >> CFLAGS += -g -O2 -Werror -Wall -I. -I../../include -I../../../usr/include -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -D_GNU_SOURCE >> >>> all: test vsock_perf >>> test: vsock_test vsock_diag_test >>> vsock_test: vsock_test.o vsock_test_zerocopy.o timeout.o control.o util.o >>> vsock_diag_test: vsock_diag_test.o timeout.o control.o util.o >>> vsock_perf: vsock_perf.o >>> +vsock_uring_test: control.o util.o vsock_uring_test.o timeout.o >> >> Shoud we add this new test to the "test" target as well? > >Ok, but in this case, this target will always depend on liburing.
I think it's fine.
If they want to run all the tests, they need liburing. If they don't want to build io_uring tests, they can just do `make vsock_test`.
Stefano
| |