Commit graph

16 commits

Author SHA1 Message Date
Dennis Kempin
45b5c13047 Make common crates part of the crosvm workspace
This greatly simplifies and speeds up compilation
and clippy times.

This ChromeOS-side building these crates has been
updated to copy the source out of the source tree
so that they will compile as a separate workspace.

BUG=b:256020427
TEST=presubmit

Change-Id: I2e0f1f6724924d6bdd70ea28d7777df7966cf724
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3988324
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-10-31 21:33:33 +00:00
Zihan Chen
646b6ea8fa crosvm-fuzz: Migrate crosvm-fuzz to cargo fuzz
Fuzzer targets can be ran with
cargo +nightly fuzz run --fuzz-dir crosvm-fuzz --features
upstream-fuzz <target>

This should enable us to move fuzzing to anywhere including
ClusterFuzz while maintain compatibility with cros infra.

TEST=`cargo fuzz` won't crash in first 30s,
`USE="asan fuzzer" emerge-hatch crosvm` builds,
`/build/hatch/usr/libexec/fuzzers/crosvm_qcow_fuzzer` won't
crash in first 30s
FIXED=b:245007212
BUG=b:244631591

Change-Id: I4b262ee1a6a90247dea96347c55a3849af793bec
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3905095
Auto-Submit: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-10-03 16:12:15 +00:00
Dennis Kempin
1dab58a2cf Update all copyright headers to match new style
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.

This fulfills the request from legal and unifies our notices.

./tools/health-check has been updated to only accept this style.

BUG=b:246579983
TEST=./tools/health-check

Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 18:41:29 +00:00
Dennis Kempin
3ec91c4653 Add Cargo.lock files to version control again
We originally removed it because we had frequent merge conflicts
and all downstream projects were doing their own pinning already.
We also had CI issues because ChromeOS changes could trigger
Cargo.lock changes in crosvm back then.

The new Cargo.lock format should ease the merge conflicts and we
no longer have issues with external changes triggering changes
in our Cargo.lock. So let's bring it back in.

This will allow us to judge the impact of changing third party
dependencies and gives us a chance to implement a special
review process.

BUG=b:240435583
TEST=CQ

Change-Id: Ie53e5616cc98d7e50a84f3c0a91902dd539f2520
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3795655
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-08-15 19:38:44 +00:00
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Daniel Verkamp
cdf33f9660 cros-fuzz: upgrade to rand_core 0.6
This is the version used by rand 0.8.x (and the latest available version
as of this writing), so this allows us to upgrade crosvm-fuzz to rand
0.8 as well.

BUG=b:236978141
TEST=tools/dev_container tools/run_tests --target=host
TEST=USE='asan fuzzer' emerge-amd64-generic crosvm

Change-Id: I297f6c17114b2b8e8f12d5dd9d35b071b91d6780
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3722780
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-30 23:22:39 +00:00
Anton Romanov
bed40ad547 crosvm: migrate to Rust 2021 edition
BUG=none
TEST=cq

Change-Id: I0059c970879b78bfd40b6ce58b10debcf154b50f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508322
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-03-09 01:16:03 +00:00
Vikram Auradkar
ae5118f5c7 Enable windows tests for a few crates
Run tests for sys_util_core, poll_token_derive and balloon_control on
windows.

Using dotfiles to disable/serialize test runs of a subset of crates does
not work well with third party crates as it forces us to commit the dot
file to the crate.

The patch modifies and uses the script that runs linux tests.
This patch also allows us to
- build/test child crate even if parent crate has disabled build/test.
- avoid building crosvm if it is not explicitly specified.

RIP short lived .windows_build_test_skip. You allowed us to run noop
kokoro tests.

Test: py .\tools\impl\test_runner.py --arch x86_64
Bug: b:215610772
Change-Id: Icc6d04ffd7c0c33d4f60aeac16fc7d23881c387d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3459809
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-18 03:18:58 +00:00
Vikram Auradkar
0108238474 Upstream windows build/test script
The patch also adds files to skip building and testing crates on
windows. When we run
```
tools/windows/build_test.py --skip_file_name .windows_build_test_skip
```

the build/test succeeds without actually doing anything as build/test
for all crates is skipped by creating '.windows_build_test_skip'.

Bug: 213170957
Test: Ran script on downstream repo
Change-Id: Iebd2cea463ee722be4feaed88229e1fb5e9fd6c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3417918
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-01-28 00:55:08 +00:00
Daniel Verkamp
98813a4f0b Revert "Remove empty OWNERS files"
This reverts commit 34df9a13cb.

Reason for revert: dev-rust/p9 ebuild depends on common/p9/OWNERS

Original change's description:
> Remove empty OWNERS files
>
> These directories can just inherit the top-level crosvm OWNERS now.
>
> BUG=None
> TEST=None
>
> Change-Id: Iea439e92aac4a03fcf821e4ce715266161209809
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3370743
> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>

Bug: None
Change-Id: I1043a89e17588cd727614dfc39d69bcf06d82221
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3373453
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-01-07 23:35:49 +00:00
Daniel Verkamp
34df9a13cb Remove empty OWNERS files
These directories can just inherit the top-level crosvm OWNERS now.

BUG=None
TEST=None

Change-Id: Iea439e92aac4a03fcf821e4ce715266161209809
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3370743
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-01-07 15:52:04 +00:00
Chirantan Ekbote
2c16797f00 Remove chirantan from OWNERS
Change-Id: I5ef36b186ee964f33eab7371e2c8b25819354944
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3366171
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Commit-Queue: Dmitry Torokhov <dtor@chromium.org>
2022-01-06 21:32:18 +00:00
Dennis Kempin
dc629f5f05 Clippy fixes in common/* crates
Some automatic fixes by clippy, some manual nit fixes.

This enables clippy on all but the cros_async crate, which
is to be replaced with cros_async2 soon.

BUG=b:192425184
TEST=./tools/presubmit

Change-Id: I2b3a09b67ead64f2adb71dd4f94465b0d65a7c65
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3282678
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-15 23:08:55 +00:00
Andrew Walbran
bd9b1bc45b Add newlines to end of Cargo.toml files.
Omitting them causes issues with cargo2android.py.

TEST=cargo test

Change-Id: Ib7d62b4218527e436d6b3fc13142e05ed67d2d6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3097680
Auto-Submit: Andrew Walbran <qwandor@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Commit-Queue: Andrew Walbran <qwandor@google.com>
2021-08-17 20:20:41 +00:00
Dennis Kempin
6a584d6f99 Integrate p9 and cros-fuzz into crosvm build
Updates path and includes the libraries in the test runner.

BUG=b:193243281,b:191509642
TEST=./run_tests passes and executes the new tests

Change-Id: If38126fa6bdf2a0a3dca5a79c6e4d76857617fd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049671
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-08-03 02:25:02 +00:00
Dennis Kempin
a5b7caa506 Import cros-fuzz and p9 into crosvm/common
This CL contains a 1:1 copy of the code from the platform2 repo.
The follow-up CL will integrate them with the crosvm build.
History of these files is available at:
267497a7f7/cros-fuzz
267497a7f7/vm_tools/p9

This is a prerequisite for the externalization of crosvm.

BUG=b:191509642,b:193243281
TEST=None. This is dead code.

Change-Id: Ia25d9642f2de1febc83bcd48b4b81fcd805c7c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049670
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-08-03 02:25:01 +00:00