Skip to content

Commit

Permalink
backout of commit 6197787
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Oct 7, 2024
1 parent 9e0d852 commit df2db14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion phd-tests/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ doctest = false
[dependencies]
anyhow.workspace = true
byteorder.workspace = true
cpuid_utils = { workspace = true, features = [ "instance-spec" ] }
cpuid_utils.workspace = true
futures.workspace = true
itertools.workspace = true
http.workspace = true
Expand Down
16 changes: 14 additions & 2 deletions phd-tests/tests/src/cpuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use cpuid_utils::{CpuidIdent, CpuidMap, CpuidValues, CpuidVendor};
use cpuid_utils::{CpuidIdent, CpuidValues, CpuidVendor};
use phd_testcase::*;
use propolis_client::types::CpuidEntry;
use tracing::info;
Expand Down Expand Up @@ -134,7 +134,19 @@ async fn cpuid_boot_test(ctx: &Framework) {
// Try to boot a guest with the computed CPUID values. The modified brand
// string should show up in /proc/cpuinfo.
let mut cfg = ctx.vm_config_builder("cpuid_boot_test");
cfg.cpuid(CpuidMap(host_cpuid).into());
cfg.cpuid(
host_cpuid
.iter()
.map(|(leaf, value)| CpuidEntry {
leaf: leaf.leaf,
subleaf: leaf.subleaf,
eax: value.eax,
ebx: value.ebx,
ecx: value.ecx,
edx: value.edx,
})
.collect(),
);
let mut vm = ctx.spawn_vm(&cfg, None).await?;
vm.launch().await?;
vm.wait_to_boot().await?;
Expand Down

0 comments on commit df2db14

Please sign in to comment.