summary refs log tree commit diff
path: root/tests/plugins.rs
diff options
context:
space:
mode:
authorStephen Barber <smbarber@chromium.org>2018-02-09 15:16:01 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-08 00:37:50 -0800
commita10b2d20a8667a4c730aacc1f4c8d18a6756eaab (patch)
treec6db02d574746f0a18ec2ee1a868dd795c85e795 /tests/plugins.rs
parent8da6543e74d5e037f08ed4cc49f89ad63963c3dc (diff)
downloadcrosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar.gz
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar.bz2
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar.lz
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar.xz
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.tar.zst
crosvm-a10b2d20a8667a4c730aacc1f4c8d18a6756eaab.zip
plugin: add crosvm_net_get_config
BUG=none
TEST=sudo cargo test --features plugin

Change-Id: Ib38fad250295d73529dff0451345b4274a261073
Reviewed-on: https://chromium-review.googlesource.com/911943
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'tests/plugins.rs')
-rw-r--r--tests/plugins.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/plugins.rs b/tests/plugins.rs
index d036e97..e858c9a 100644
--- a/tests/plugins.rs
+++ b/tests/plugins.rs
@@ -83,6 +83,12 @@ fn run_plugin(bin_path: &Path, with_sandbox: bool) {
     cmd.args(&["run",
                 "-c",
                 "1",
+                "--host_ip",
+                "100.115.92.5",
+                "--netmask",
+                "255.255.255.252",
+                "--mac",
+                "de:21:e8:47:6b:6a",
                 "--seccomp-policy-dir",
                 "tests",
                 "--plugin"])
@@ -241,6 +247,11 @@ fn test_vcpu_pause() {
 }
 
 #[test]
+fn test_net_config() {
+    test_plugin(include_str!("plugin_net_config.c"));
+}
+
+#[test]
 fn test_debugregs() {
     let mini_plugin = MiniPlugin {
         assembly_src: "org 0x1000