Skip to content

Commit 4398546

Browse files
stefanhaRHdavem330
authored andcommitted
VSOCK: fix header include in vsock_diag_test
The vsock_diag_test program directly included ../../../include/uapi/ headers from the source tree. Tests are supposed to use the usr/include/linux/ headers that have been prepared with make headers_install instead. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a706a04 commit 4398546

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎tools/testing/vsock/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ all: test
33
test: vsock_diag_test
44
vsock_diag_test: vsock_diag_test.o timeout.o control.o
55

6-
CFLAGS += -g -O2 -Werror -Wall -I. -I../../include/uapi -I../../include -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -D_GNU_SOURCE
6+
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
77
.PHONY: all test clean
88
clean:
99
${RM} *.o *.d vsock_diag_test

‎tools/testing/vsock/README‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following tests are available:
1010
The following prerequisite steps are not automated and must be performed prior
1111
to running tests:
1212

13-
1. Build the kernel and these tests.
13+
1. Build the kernel, make headers_install, and build these tests.
1414
2. Install the kernel and tests on the host.
1515
3. Install the kernel and tests inside the guest.
1616
4. Boot the guest and ensure that the AF_VSOCK transport is enabled.

‎tools/testing/vsock/vsock_diag_test.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
#include <linux/list.h>
2222
#include <linux/net.h>
2323
#include <linux/netlink.h>
24+
#include <linux/vm_sockets.h>
2425
#include <linux/sock_diag.h>
26+
#include <linux/vm_sockets_diag.h>
2527
#include <netinet/tcp.h>
2628

27-
#include "../../../include/uapi/linux/vm_sockets.h"
28-
#include "../../../include/uapi/linux/vm_sockets_diag.h"
29-
3029
#include "timeout.h"
3130
#include "control.h"
3231

0 commit comments

Comments
 (0)