Vsock end-to-end integration test
Add VsockTest host-side test that runs a vsock server in Android and
spawns a VM with a client that connects to it. The client sends a
message to the server. The host-side driver validates that the message
received by the server matches the message given to the client via
kernel command-line arguments.
Bug: 168589743
Test: atest VirtualizationHostTestCases
Change-Id: Id6d1f1c5ff10066a73606ee5b14387ba4474a3f8
diff --git a/tests/hostside/Android.bp b/tests/hostside/Android.bp
index 0c894ac..3f04a78 100644
--- a/tests/hostside/Android.bp
+++ b/tests/hostside/Android.bp
@@ -28,6 +28,9 @@
":virt_hostside_tests_initramfs-arm64",
":virt_hostside_tests_initramfs-x86_64",
],
+ required: [
+ "virt_hostside_tests_vsock_server",
+ ],
}
// Give kernel images unique file names.
@@ -56,9 +59,11 @@
out: ["initramfs.lz4"],
srcs: [
":virt_hostside_tests_guest_init",
+ ":virt_hostside_tests_vsock_client",
],
cmd: "$(location scripts/place_files.sh) $(in) -- " +
"$(genDir)/root/init " +
+ "$(genDir)/root/bin/vsock_client " +
"&& $(location mkbootfs) $(genDir)/root | $(location lz4) -fq - $(out)",
}