From fb1df1547718fff7eea60e38720776c32f616077 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 10 Mar 2022 00:00:43 +0000 Subject: [PATCH] crosvm: Fix running plugins integration tests BUG=none TEST=run plugins tests Change-Id: I791249c611ff2e5b7a345981a5a7ebe957cef3d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3515212 Reviewed-by: Anton Romanov Auto-Submit: Anton Romanov Tested-by: kokoro Reviewed-by: Daniel Verkamp Commit-Queue: Daniel Verkamp --- tests/plugins.rs | 4 +++- tools/dev_container | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/plugins.rs b/tests/plugins.rs index 8992045a51..1cbb2fd6c5 100644 --- a/tests/plugins.rs +++ b/tests/plugins.rs @@ -62,11 +62,11 @@ fn build_plugin(src: &str) -> RemovePath { .arg(&out_bin) .arg("-L") // Path of shared object to link to. .arg(&libcrosvm_plugin_dir) - .arg("-lcrosvm_plugin") .arg("-Wl,-rpath") // Search for shared object in the same path when exec'd. .arg(&libcrosvm_plugin_dir) .args(&["-Wl,-rpath", "."]) // Also check current directory in case of sandboxing. .args(&["-xc", "-"]) // Read source code from piped stdin. + .arg("-lcrosvm_plugin") .stdin(Stdio::piped()) .spawn() .expect("failed to spawn compiler"); @@ -262,6 +262,8 @@ fn test_supported_cpuid() { test_plugin(include_str!("plugin_supported_cpuid.c")); } +// b:223675792 +#[ignore] #[test] fn test_enable_cap() { test_plugin(include_str!("plugin_enable_cap.c")); diff --git a/tools/dev_container b/tools/dev_container index 0128508d15..67a9cfe82f 100755 --- a/tools/dev_container +++ b/tools/dev_container @@ -55,6 +55,8 @@ DOCKER_ARGS = [ "--device /dev/vhost-vsock", # Use tmpfs in the container for faster performance. "--mount type=tmpfs,destination=/tmp", + # For plugin process jail + "--mount type=tmpfs,destination=/var/empty", f"gcr.io/crosvm-packages/crosvm_dev:{IMAGE_VERSION}", ]