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/rocm_smi_lib commit: 1c9ef44398]
이 커밋은 다음에 포함됨:
1 부모
01401b0caa
커밋
0759abca07
2 파일이 변경됨
+8
-4
검색과 일치하는 파일 없음
@@ -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;
|
||||
|
||||
@@ -249,7 +249,6 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
sRSMIGlvalues = &settings;
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
새 이슈에서 참조
사용자 차단