mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
/tmp is mounted as tmpfs, and tmpfs does not provide O_DIRECT capabilities. Try using a ext4 file system. BUG=b:190435784 TEST=time ./ci/builder --vm # boot_test_vm_odirect passes Change-Id: I3f8245052ed06c703cc3aa320d300d5f21254e90 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3083206 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
38 lines
1.2 KiB
Bash
Executable file
38 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Synchronizes dependencies of crosvm into the virtual machine to allow test
|
|
# binaries to execute.
|
|
|
|
${0%/*}/wait_for_vm_with_timeout || exit 1
|
|
|
|
crosvm_root="/workspace/src/crosvm"
|
|
rust_toolchain=$(cat ${crosvm_root}/rust-toolchain)
|
|
target_dir=$(
|
|
cargo metadata --no-deps --format-version 1 |
|
|
jq -r ".target_directory"
|
|
)
|
|
vm_tmp_dir=/var/tmp
|
|
|
|
# List of shared objects used by crosvm that need to be synced.
|
|
shared_objects=(
|
|
/workspace/scratch/lib/*.so*
|
|
/root/.rustup/toolchains/${rust_toolchain}-*/lib/libstd-*.so
|
|
/root/.rustup/toolchains/${rust_toolchain}-*/lib/libtest-*.so
|
|
)
|
|
rsync -azPLq --rsync-path="sudo rsync" ${shared_objects[@]} vm:/usr/lib
|
|
|
|
# Files needed by binaries at runtime in the working directory.
|
|
if [ -z "${CARGO_BUILD_TARGET}" ]; then
|
|
runtime_files=(
|
|
"${target_dir}/debug/crosvm"
|
|
)
|
|
else
|
|
runtime_files=(
|
|
"${target_dir}/${CARGO_BUILD_TARGET}/debug/crosvm"
|
|
)
|
|
fi
|
|
|
|
rsync -azPLq --rsync-path="sudo rsync" ${runtime_files} vm:$vm_tmp_dir
|