mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-08 20:57:35 +00:00
gpu: Fix incorrect assertion in test virgl_end_to_end_once
The test trying to obtain capset info for 3 capsets, but we only had 2 capsets configured. The test previously passed because the virgl backend was incorectly returning the information for the aditional capset. Signed-off-by: Matej Hrica <mhrica@redhat.com>
This commit is contained in:
parent
6dcc71ef16
commit
0eae1f2274
@ -849,10 +849,12 @@ mod virgl_cov_tests {
|
||||
}
|
||||
assert!(call_b.read().is_err(), "no signal when no match");
|
||||
|
||||
let capsets = GpuCapset::VIRGL | GpuCapset::VIRGL2;
|
||||
|
||||
// Initialize virgl ONCE in this forked process; exercise adapter paths
|
||||
let cfg = GpuConfig::new(
|
||||
GpuMode::VirglRenderer,
|
||||
Some(GpuCapset::VIRGL | GpuCapset::VIRGL2),
|
||||
Some(capsets),
|
||||
GpuFlags::default(),
|
||||
).expect("GpuConfig");
|
||||
|
||||
@ -968,7 +970,7 @@ mod virgl_cov_tests {
|
||||
assert_matches!(gpu.flush_resource(0, dirty), Ok(GpuResponse::OkNoData));
|
||||
|
||||
// Test capset queries
|
||||
for index in [0, 1, 3] {
|
||||
for index in 0..capsets.num_capsets() {
|
||||
test_capset_operations(&gpu, index);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user