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/native/vsock/Android.bp b/tests/hostside/native/vsock/Android.bp
new file mode 100644
index 0000000..cbee98d
--- /dev/null
+++ b/tests/hostside/native/vsock/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_test {
+ name: "virt_hostside_tests_vsock_server",
+ srcs: ["server.cc"],
+ static_libs: [
+ "libbase",
+ "liblog",
+ ],
+ static_executable: true,
+ test_suites: ["device-tests"],
+}
+
+cc_binary {
+ name: "virt_hostside_tests_vsock_client",
+ srcs: ["client.cc"],
+ static_libs: [
+ "libbase",
+ "liblog",
+ ],
+ static_executable: true,
+ installable: false,
+}