Call saHpiSensorEventMasksSet on a sensor which
does not support the changing of the event enable
status.
* Expected return: SA_ERR_HPI_READ_ONLY
* Actual return: unknown error code
if (rdr.RdrType == SAHPI_SENSOR_RDR)
{
if
(rdr.RdrTypeUnion.SensorRec.EventCtrl !=
SAHPI_SEC_PER_EVENT)
{
retval = HPI_TEST_NA;
}
}
else // Non-Sensor RDR
{
retval = HPI_TEST_NA;
}
if (retval == HPI_TEST_UNKNOWN)
{
s_num =
rdr.RdrTypeUnion.SensorRec.Num;
//
// Call saHpiSensorEventMasksSet on a
sensor which does not
// support the changing of the event
enable status.
//
status = saHpiSensorEventMasksSet
(session,
resourceId,
s_num,
SAHPI_SENS_ADD_EVENTS_TO_MASKS,
AssertEventMask,
DeassertEventMask);
if (status != SA_ERR_HPI_READ_ONLY)
{
printf(" Function
\"saHpiSensorEventMasksSet\" works abnormally!
\n");
printf(" Succeeding in setting
event masks when sensor shouldn't allow!\n");
printf(" Return value: %s\n",
get_error_string(status));
retval = HPI_TEST_FAIL;
}
else
{
retval =
HPI_TEST_PASS_AND_EXIT;
}
}
Logged In: YES
user_id=1152287
still there in 1.9.5 build
IPMI plugin
OpenHPI 1.3.15
Langley platform
Logged In: YES
user_id=1152287
I think it should be fixed.
The test case has bug itself
Logged In: YES
user_id=1133239
saHpiSensorEventMasksSet was called for sensor with
SAHPI_SEC_PER_EVENT EventCtrl. Looked like compiler bug.
I've just restructured the test and now it works.