Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Hajnoczi and committed by
David S. Miller
43985468 a706a042

+4 -5
+1 -1
tools/testing/vsock/Makefile
··· 3 3 test: vsock_diag_test 4 4 vsock_diag_test: vsock_diag_test.o timeout.o control.o 5 5 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 7 7 .PHONY: all test clean 8 8 clean: 9 9 ${RM} *.o *.d vsock_diag_test
+1 -1
tools/testing/vsock/README
··· 10 10 The following prerequisite steps are not automated and must be performed prior 11 11 to running tests: 12 12 13 - 1. Build the kernel and these tests. 13 + 1. Build the kernel, make headers_install, and build these tests. 14 14 2. Install the kernel and tests on the host. 15 15 3. Install the kernel and tests inside the guest. 16 16 4. Boot the guest and ensure that the AF_VSOCK transport is enabled.
+2 -3
tools/testing/vsock/vsock_diag_test.c
··· 21 21 #include <linux/list.h> 22 22 #include <linux/net.h> 23 23 #include <linux/netlink.h> 24 + #include <linux/vm_sockets.h> 24 25 #include <linux/sock_diag.h> 26 + #include <linux/vm_sockets_diag.h> 25 27 #include <netinet/tcp.h> 26 - 27 - #include "../../../include/uapi/linux/vm_sockets.h" 28 - #include "../../../include/uapi/linux/vm_sockets_diag.h" 29 28 30 29 #include "timeout.h" 31 30 #include "control.h"