Skip to content

Commit

Permalink
Merge pull request #342 from 00xc/clippy
Browse files Browse the repository at this point in the history
svsm: remove `default-test` feature & fix leftover nightly clippy warning
  • Loading branch information
joergroedel authored May 14, 2024
2 parents df355b6 + 85e5a86 commit 1724fb1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FEATURES ?= "default"
SVSM_ARGS = --features ${FEATURES}

FEATURES_TEST ?= "default-test"
SVSM_ARGS_TEST = --no-default-features --features ${FEATURES_TEST}
SVSM_ARGS_TEST = --no-default-features
ifdef FEATURES_TEST
SVSM_ARGS_TEST += --features ${FEATURES_TEST}
endif

ifdef RELEASE
TARGET_PATH=release
Expand Down
1 change: 0 additions & 1 deletion kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test.workspace = true

[features]
default = ["mstpm"]
default-test = []
enable-gdb = ["dep:gdbstub", "dep:gdbstub_arch"]
mstpm = ["dep:libmstpm"]

Expand Down
4 changes: 1 addition & 3 deletions kernel/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ fn main() {
println!("cargo:rustc-link-arg-bin=svsm=--no-relax");
println!("cargo:rustc-link-arg-bin=svsm=-Tkernel/src/svsm.lds");
println!("cargo:rustc-link-arg-bin=svsm=-no-pie");
if std::env::var("CARGO_FEATURE_MSTPM").is_ok()
&& std::env::var("CARGO_FEATURE_DEFAULT_TEST").is_err()
{
if std::env::var("CARGO_FEATURE_MSTPM").is_ok() && std::env::var("CARGO_CFG_TEST").is_err() {
println!("cargo:rustc-link-arg-bin=svsm=-Llibmstpm");
println!("cargo:rustc-link-arg-bin=svsm=-lmstpm");
}
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/debug/gdbstub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub mod svsm_gdbstub {
Self {}
}

fn read(&mut self) -> Result<u8, &'static str> {
fn read(&self) -> Result<u8, &'static str> {
unsafe { Ok(GDB_SERIAL.get_byte()) }
}
}
Expand Down

0 comments on commit 1724fb1

Please sign in to comment.