Add checking for no-longer-existing process in test

When getting process information for a process, it's possible
that between the time the process ID was discovered and when
we attempt to collect data for that process, that the process
ended. This change is meant to handle that in the test case.

* Also, fix compile warning by removing unused variable.

Change-Id: I62f9a84a63548c856f0661fef15b7d248a330c05


[ROCm/amdsmi commit: 1c9ef44398]
Цей коміт міститься в:
Chris Freehill
2020-04-09 15:55:02 -05:00
джерело d592203ff5
коміт 922aa1b5dc
2 змінених файлів з 8 додано та 4 видалено
+8 -3
Переглянути файл
@@ -166,9 +166,14 @@ void TestProcInfoRead::Run(void) {
for (uint32_t j = 0; j < num_proc_found; j++) {
err = rsmi_compute_process_gpus_get(procs[j].process_id, dev_inds,
&amt_allocd);
CHK_ERR_ASRT(err)
ASSERT_LE(amt_allocd, num_devices);
if (err == RSMI_STATUS_NOT_FOUND) {
std::cout << "\t**Process " << procs[j].process_id <<
" is no longer present.";
continue;
} else {
CHK_ERR_ASRT(err);
ASSERT_LE(amt_allocd, num_devices);
}
std::cout << "\t**Process " << procs[j].process_id <<
" is using devices with indices: ";
uint32_t i;
-1
Переглянути файл
@@ -249,7 +249,6 @@ int main(int argc, char** argv) {
return 1;
}
int ret = 0;
sRSMIGlvalues = &settings;
return RUN_ALL_TESTS();
}