tests: sensor: check for -ENOSYS

if function is not implemented, check for ENOSYS instead of ENOTSUP.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-03-25 06:49:32 -04:00 committed by Maureen Helm
parent 3aab352361
commit 6071aa5d3c

View File

@ -245,20 +245,20 @@ void test_sensor_handle_triggers(void)
trigger_elements[i].trig.chan,
trigger_elements[i].attr,
&trigger_elements[i].data),
-ENOTSUP, "fail to set attributes");
-ENOSYS, "fail to set attributes");
/* read-back attributes for no trig dev*/
zassert_equal(sensor_attr_get(dev_no_trig,
trigger_elements[i].trig.chan,
trigger_elements[i].attr,
&data),
-ENOTSUP, "fail to get attributes");
-ENOSYS, "fail to get attributes");
/* setting a sensor's trigger and handler for no trig dev */
zassert_equal(sensor_trigger_set(dev_no_trig,
&trigger_elements[i].trig,
trigger_handler),
-ENOTSUP, "fail to set trigger");
-ENOSYS, "fail to set trigger");
}
}