Skip to content

Commit 79296be

Browse files
committed
test(qemu-acpi): drop hash pins the captured-CVM and differential tests cover
1 parent 0b6d697 commit 79296be

2 files changed

Lines changed: 0 additions & 79 deletions

File tree

‎dstack/crates/qemu-acpi/src/dsdt/gpe.rs‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,4 @@ mod tests {
8080
fn e01_matches_qemu() {
8181
super::super::fixture::assert_region(&super::e01(false), 8245, 8258);
8282
}
83-
84-
#[test]
85-
fn e01_scans_root_port_buses_when_pcnt_exists() {
86-
use sha2::{Digest, Sha256};
87-
88-
let e01 = super::e01(true);
89-
assert_eq!(e01.len() - super::e01(false).len(), 51);
90-
assert_eq!(
91-
hex::encode(Sha256::digest(e01)),
92-
"6e22ff760f3c9e6263713cd7590518d1fd5ca2cd2344e8856bb618d2bef6d470"
93-
);
94-
}
9583
}

‎dstack/crates/qemu-acpi/src/dsdt/notify.rs‎

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -446,22 +446,6 @@ mod tests {
446446
super::super::fixture::assert_region(&super::build(5, 0, true, None, true), 7834, 8245);
447447
}
448448

449-
#[test]
450-
fn eight_root_ports_include_qemus_hotplug_aml() {
451-
use sha2::{Digest, Sha256};
452-
453-
let hotplug_on = super::build(6, 8, true, None, true);
454-
let hotplug_off = super::build(6, 8, true, None, false);
455-
assert_eq!(hotplug_on.len() - hotplug_off.len(), 854);
456-
457-
let pcnt = super::pcnt(6, 8, None).unwrap();
458-
assert_eq!(pcnt.len(), 411);
459-
assert_eq!(
460-
hex::encode(Sha256::digest(pcnt)),
461-
"29f0fc0087802ef8886aa8eff10bbd78b471e50f8ce2d543861cd437a2806851"
462-
);
463-
}
464-
465449
#[test]
466450
fn root_port_bsel_mapping_follows_qemus_reverse_child_walk() {
467451
assert_eq!(
@@ -478,55 +462,4 @@ mod tests {
478462
]
479463
);
480464
}
481-
482-
#[test]
483-
fn eight_root_port_devices_match_independent_qemu_encoding() {
484-
use sha2::{Digest, Sha256};
485-
486-
let ports = super::root_ports(6, 8, None);
487-
let mut hotplug_off = Vec::new();
488-
let mut hotplug_on = Vec::new();
489-
for (devfn, bsel) in ports {
490-
hotplug_off.extend(super::pci_device(devfn, true, None, &[]));
491-
hotplug_on.extend(super::pci_device(devfn, true, Some(bsel), &[]));
492-
}
493-
assert_eq!(hotplug_off.len(), 240);
494-
assert_eq!(hotplug_on.len(), 1094);
495-
assert_eq!(
496-
hex::encode(Sha256::digest(hotplug_off)),
497-
"7a107a6f0cf575cff4f70489c1b61a8c1ef1ae86a89de182ab0f412cea7bf80d"
498-
);
499-
assert_eq!(
500-
hex::encode(Sha256::digest(hotplug_on)),
501-
"caec37e9162f026c9e36fe4952fb55f6aa7db09fc92e4e785914f84b05a705b3"
502-
);
503-
}
504-
505-
#[test]
506-
fn root_port_hotplug_terms_match_independent_qemu_encoding() {
507-
use sha2::{Digest, Sha256};
508-
509-
let base = super::root_port_child(None);
510-
for (bsel, expected) in [
511-
(
512-
0,
513-
"2ab2603633fbf9eee2f7b9104d9f2510a55884520f1f02ddc41276fc9dfee90f",
514-
),
515-
(
516-
2,
517-
"4b39e662fdf5334c777209850bb8984abb1dbda74f2f20bd807198e7683662ee",
518-
),
519-
] {
520-
let port = super::root_port_child(Some(bsel));
521-
assert_eq!(hex::encode(Sha256::digest(&port[base.len()..])), expected);
522-
}
523-
}
524-
525-
#[test]
526-
fn root_port_hotplug_aml_is_conditional() {
527-
let hotplug_off = super::build(6, 8, true, None, false);
528-
let no_ports = super::build(6, 0, true, None, false);
529-
assert_eq!(hotplug_off.len() - no_ports.len(), 8 * 30);
530-
assert!(super::pcnt(6, 0, None).is_none());
531-
}
532465
}

0 commit comments

Comments
 (0)