Runtime tests: the device form of the profile test reads the same two README tables
The previous commit taught the committed-profile form of the profile test to exempt the README's "Enabled, not stated" features. The device form, under --cfg m2v_gpu or m2v_cpu_icd, kept its own copy of the check, which read only the "Not enabled" table. On the RTX 3090 (m3-max-64890), the Radeon 780M (m3-max-64892) and the Iris Xe (m3-max-64891) it still failed on maintenance5, which those devices report and which creation withholds there or never states. Both forms now call one check, all_recorded.
This commit is contained in:
1 parent
a98c0e8586
commit
1fb65bf3ef
1 file changed
+14
-17
@@ -408,16 +408,14 @@ fn the_profile_reads_no_feature_creation_withholds_unrecorded() {
|
||||
judge(&read, &reported);
|
||||
}
|
||||
|
||||
/// Each feature `read` names is recorded in the README's `Not enabled` table or its `Enabled, not
|
||||
/// stated` one, and each feature `Not enabled` records is not a feature creation enables, and is
|
||||
/// in `read` wherever some device reports it.
|
||||
fn judge(read: &BTreeMap<VkFeature, Vec<String>>, reported: &BTreeSet<VkFeature>) {
|
||||
let recorded = recorded();
|
||||
/// Each feature `read` names is in the README's `Not enabled` table or its `Enabled, not stated`
|
||||
/// one: a feature creation enables only where its own rule says, and never states, is withheld
|
||||
/// wherever that rule does not hold.
|
||||
fn all_recorded(read: &BTreeMap<VkFeature, Vec<String>>) {
|
||||
for (feature, devices) in read {
|
||||
println!("feature-enables: {feature:?} changes the profile on {devices:?}");
|
||||
}
|
||||
// A feature creation enables only where its own rule says, and never states, is withheld
|
||||
// wherever that rule does not hold.
|
||||
let recorded = recorded();
|
||||
let unstated: BTreeSet<VkFeature> = unstated("feature")
|
||||
.iter()
|
||||
.filter_map(|member| vocabulary(member))
|
||||
@@ -431,6 +429,14 @@ fn judge(read: &BTreeMap<VkFeature, Vec<String>>, reported: &BTreeSet<VkFeature>
|
||||
"read by the translator's profile, withheld by creation and in neither the README's `Not \
|
||||
enabled` table nor its `Enabled, not stated` one: {unrecorded:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// Each feature `read` names is recorded in the README's `Not enabled` table or its `Enabled, not
|
||||
/// stated` one, and each feature `Not enabled` records is not a feature creation enables, and is
|
||||
/// in `read` wherever some device reports it.
|
||||
fn judge(read: &BTreeMap<VkFeature, Vec<String>>, reported: &BTreeSet<VkFeature>) {
|
||||
let recorded = recorded();
|
||||
all_recorded(read);
|
||||
let creation = creation_features();
|
||||
let enabled: Vec<&VkFeature> = recorded.intersection(&creation).collect();
|
||||
assert!(
|
||||
@@ -489,14 +495,5 @@ fn the_profile_reads_no_feature_the_device_reports_that_creation_withholds_unrec
|
||||
}
|
||||
drop(runtime);
|
||||
assert!(checked > 0, "the loader lists no device of this cfg's kind");
|
||||
let recorded = recorded();
|
||||
let unrecorded: Vec<&VkFeature> = read.keys().filter(|f| !recorded.contains(f)).collect();
|
||||
for (feature, devices) in &read {
|
||||
println!("feature-enables: {feature:?} changes the profile on {devices:?}");
|
||||
}
|
||||
assert!(
|
||||
unrecorded.is_empty(),
|
||||
"read by the translator's profile, withheld by creation and not in the README's `Not \
|
||||
enabled` table: {unrecorded:?}"
|
||||
);
|
||||
all_recorded(&read);
|
||||
}
|
||||
Reference in new issue
Block a user