Skip to content

Commit 6d602bf

Browse files
authored
Merge branch 'main' into seccomp-cleanup
2 parents 73993d8 + 0bee970 commit 6d602bf

File tree

6 files changed

+23
-36
lines changed

6 files changed

+23
-36
lines changed

Cargo.lock

Lines changed: 1 addition & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jailer/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ bench = false
1414
[dependencies]
1515
libc = "0.2.168"
1616
log-instrument = { path = "../log-instrument", optional = true }
17-
nix = { version = "0.29.0", default-features = false, features = ["dir"] }
1817
regex = { version = "1.11.1", default-features = false, features = ["std"] }
1918
thiserror = "2.0.6"
2019
vmm-sys-util = "0.12.1"

src/utils/Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ license = "Apache-2.0"
99
bench = false
1010

1111
[dependencies]
12-
derive_more = { version = "1.0.0", default-features = false, features = ["from"] }
1312
displaydoc = "0.2.5"
1413
libc = "0.2.168"
1514
log-instrument = { path = "../log-instrument", optional = true }
16-
serde = { version = "1.0.215", features = ["derive"] }
1715
thiserror = "2.0.6"
18-
vm-memory = { version = "0.16.1", features = ["backend-mmap", "backend-bitmap"] }
19-
vmm-sys-util = "0.12.1"
20-
21-
[dev-dependencies]
22-
serde_json = "1.0.133"
2316

2417
[features]
2518
tracing = ["log-instrument"]

src/vmm/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ gdbstub = { version = "0.7.3", optional = true }
2424
gdbstub_arch = { version = "0.3.1", optional = true }
2525
kvm-bindings = { version = "0.10.0", features = ["fam-wrappers", "serde"] }
2626
kvm-ioctls = "0.19.1"
27-
lazy_static = "1.5.0"
2827
libc = "0.2.168"
2928
linux-loader = "0.13.0"
3029
log = { version = "0.4.22", features = ["std", "serde"] }

tests/host_tools/cargo_build.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,27 @@
1414
DEFAULT_TARGET_DIR = f"{DEFAULT_TARGET}/release/"
1515

1616

17+
def nightly_toolchain() -> str:
18+
"""Receives the name of the installed nightly toolchain"""
19+
return utils.check_output("rustup toolchain list | grep nightly").stdout.strip()
20+
21+
1722
def cargo(
1823
subcommand,
1924
cargo_args: str = "",
2025
subcommand_args: str = "",
2126
*,
2227
env: dict = None,
2328
cwd: str = None,
29+
nightly: bool = False,
2430
):
2531
"""Executes the specified cargo subcommand"""
32+
toolchain = f"+{nightly_toolchain()}" if nightly else ""
2633
env = env or {}
2734
env_string = " ".join(f'{key}="{str(value)}"' for key, value in env.items())
28-
cmd = f"{env_string} cargo {subcommand} {cargo_args} -- {subcommand_args}"
35+
cmd = (
36+
f"{env_string} cargo {toolchain} {subcommand} {cargo_args} -- {subcommand_args}"
37+
)
2938
return utils.check_output(cmd, cwd=cwd)
3039

3140

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
"""Enforces controls over dependencies."""
4+
5+
from host_tools.cargo_build import cargo
6+
7+
8+
def test_unused_dependencies():
9+
"""
10+
Test that there are no unused dependencies.
11+
"""
12+
cargo("udeps", "--all", nightly=True)

0 commit comments

Comments
 (0)