[SWDEV-391036 + SWDEV-392933] Fixes for VoltRead and ComputePart.

Updates:
    * VoltRead - needed to properly send out RSMI_STATUS_NOT_SUPPORTED
      when device does not have voltage hwmon files
    * ComputePart. - test failure was likely caused due to EvtNotif
      causing conflicts (unknown exactly why). Test passes when
      moving it ahead of the event notifier. Both API calls may have
      a system resource issue, TBD.
    * rocm_smi_example - now indicates when an API call
      returns RSMI_STATUS_NOT_SUPPORTED or
      RSMI_STATUS_NOT_YET_IMPLEMENTED. Allows example to fully complete
      on systems which may not provide support for all API calls.

Change-Id: I520b8584e078d412414e8e5797c664220a7e823a
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
Charis Poag
2023-04-05 12:44:29 -05:00
والد 58c83eb379
کامیت 78a0812f7f
4فایلهای تغییر یافته به همراه120 افزوده شده و 50 حذف شده
@@ -100,6 +100,11 @@ void TestVoltRead::Run(void) {
rsmi_voltage_type_t type = RSMI_VOLT_TYPE_VDDGFX;
for (uint32_t i = 0; i < num_monitor_devs(); ++i) {
IF_VERB(STANDARD) {
if (i != 0) {
std::cout << "\n" << std::endl;
}
}
PrintDeviceHeader(i);
auto print_volt_metric = [&](rsmi_voltage_metric_t met,
@@ -111,12 +116,12 @@ void TestVoltRead::Run(void) {
IF_VERB(STANDARD) {
std::cout << "\t**" << label << ": " <<
"Not supported on this machine" << std::endl;
}
// Verify api support checking functionality is working
err = rsmi_dev_volt_metric_get(i, type, met, nullptr);
ASSERT_EQ(err, RSMI_STATUS_NOT_SUPPORTED);
return;
}
} else {
CHK_ERR_ASRT(err)
}
@@ -144,8 +149,8 @@ void TestVoltRead::Run(void) {
print_volt_metric(RSMI_VOLT_MIN_CRIT,
"Voltage critical min value");
print_volt_metric(RSMI_VOLT_AVERAGE, "Voltage critical max value");
print_volt_metric(RSMI_VOLT_LOWEST, "Historical minimum temperature");
print_volt_metric(RSMI_VOLT_HIGHEST, "Historical maximum temperature");
print_volt_metric(RSMI_VOLT_LOWEST, "Historical minimum voltage");
print_volt_metric(RSMI_VOLT_HIGHEST, "Historical maximum voltage");
}
}
}
+4 -4
مشاهده پرونده
@@ -270,10 +270,6 @@ TEST(rsmitstReadOnly, TestMutualExclusion) {
tst.Run();
RunCustomTestEpilog(&tst);
}
TEST(rsmitstReadWrite, TestEvtNotifReadWrite) {
TestEvtNotifReadWrite tst;
RunGenericTest(&tst);
}
TEST(rsmitstReadWrite, TestComputePartitionReadWrite) {
TestComputePartitionReadWrite tst;
RunGenericTest(&tst);
@@ -282,6 +278,10 @@ TEST(rsmitstReadWrite, TestNPSModeReadWrite) {
TestNPSModeReadWrite tst;
RunGenericTest(&tst);
}
TEST(rsmitstReadWrite, TestEvtNotifReadWrite) {
TestEvtNotifReadWrite tst;
RunGenericTest(&tst);
}
TEST(rsmitstReadOnly, Test) {
TestConcurrentInit tst;
SetFlags(&tst);