Skip to content

Commit

Permalink
fix unsupported tests
Browse files Browse the repository at this point in the history
  • Loading branch information
semiviral committed Aug 2, 2022
1 parent 0ddbf91 commit 2c2bb31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 46 deletions.
23 changes: 1 addition & 22 deletions src/tests/ryzen_matisse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,28 +908,6 @@ fn extended_topology_info() {
assert_eq!(t.shift_right_for_next_apic_id(), 0x7);
}

#[test]
fn extended_topology_info_v2() {
let cpuid = CpuId::with_cpuid_fn(cpuid_reader);
let mut e = cpuid
.get_extended_topology_info_v2()
.expect("Leaf is supported");

let t = e.next().expect("Have level 0");
assert_eq!(t.processors(), 2);
assert_eq!(t.level_number(), 0);
assert_eq!(t.level_type(), TopologyType::SMT);
assert_eq!(t.x2apic_id(), 0x0);
assert_eq!(t.shift_right_for_next_apic_id(), 0x1);

let t = e.next().expect("Have level 1");
assert_eq!(t.processors(), 12);
assert_eq!(t.level_number(), 1);
assert_eq!(t.level_type(), TopologyType::Core);
assert_eq!(t.x2apic_id(), 0x0);
assert_eq!(t.shift_right_for_next_apic_id(), 0x7);
}

#[test]
fn extended_state_info() {
let cpuid = CpuId::with_cpuid_fn(cpuid_reader);
Expand Down Expand Up @@ -1247,4 +1225,5 @@ fn remaining_unsupported_leafs() {
assert!(cpuid.get_processor_frequency_info().is_none());
assert!(cpuid.get_deterministic_address_translation_info().is_none());
assert!(cpuid.get_soc_vendor_info().is_none());
assert!(cpuid.get_extended_topology_info_v2().is_none());
}
25 changes: 1 addition & 24 deletions src/tests/xeon_gold_6252.rs
Original file line number Diff line number Diff line change
Expand Up @@ -868,30 +868,6 @@ fn extended_topology_info() {
assert_eq!(t.x2apic_id(), 199); // different from doc, unpinned execution
}

#[test]
fn extended_topology_info_v2() {
use crate::TopologyType;

let cpuid = CpuId::with_cpuid_fn(cpuid_reader);
let mut e = cpuid
.get_extended_topology_info_v2()
.expect("Leaf is supported");

let t = e.next().expect("Have level 0");
assert_eq!(t.x2apic_id(), 199); // different from doc, unpinned execution
assert_eq!(t.level_number(), 0);
assert_eq!(t.level_type(), TopologyType::SMT);
assert_eq!(t.shift_right_for_next_apic_id(), 0x1);
assert_eq!(t.processors(), 2);

let t = e.next().expect("Have level 1");
assert_eq!(t.level_number(), 1);
assert_eq!(t.level_type(), TopologyType::Core);
assert_eq!(t.shift_right_for_next_apic_id(), 0x6);
assert_eq!(t.processors(), 48);
assert_eq!(t.x2apic_id(), 199); // different from doc, unpinned execution
}

#[test]
fn extended_state_info() {
let cpuid = CpuId::with_cpuid_fn(cpuid_reader);
Expand Down Expand Up @@ -1221,4 +1197,5 @@ fn remaining_unsupported_leafs() {

assert!(cpuid.get_deterministic_address_translation_info().is_none());
assert!(cpuid.get_soc_vendor_info().is_none());
assert!(cpuid.get_extended_topology_info_v2().is_none());
}

0 comments on commit 2c2bb31

Please sign in to comment.