aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Fjeldtvedt <jaffe1@gmail.com>2016-08-11 15:40:04 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2016-08-12 13:30:05 +0200
commit6547e0880083f18302c7e4d436a1d4f3620318c2 (patch)
treeff20e33a412c2d92fdb1ceda8a3affcb875cfc92
parent33958de6f7832b79bfd189244a300418cb5de842 (diff)
cec-compliance: add new test result for refused messages
This adds a new return value, REFUSED, for when a message is replied to with Feature Abort [Refused]. When this is the case, the test is marked as OK (Refused), which should be interpreted as "the feature is supported, but cannot be activated/used at this time." Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-compliance/cec-compliance.cpp1
-rw-r--r--utils/cec-compliance/cec-compliance.h8
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp28
-rw-r--r--utils/cec-compliance/cec-test-power.cpp6
-rw-r--r--utils/cec-compliance/cec-test.cpp102
5 files changed, 140 insertions, 5 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index c893a30b..5d31caff 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -1221,6 +1221,7 @@ int main(int argc, char **argv)
" OK (Not Supported) Not supported and not mandatory for the device.\n"
" OK (Presumed) Presumably supported. Manually check to confirm.\n"
" OK (Unexpected) Supported correctly but is not expected to be supported for this device.\n"
+ " OK (Refused) Supported by the device, but was refused.\n"
" FAIL Failed and was expected to be supported by this device.\n\n");
node.has_cec20 = laddrs.cec_version >= CEC_OP_CEC_VERSION_2_0;
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 1eeb912d..2a053c0c 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -180,6 +180,7 @@ struct remote_subtest {
#define FAIL_CRITICAL 3
#define NOTSUPPORTED 4
#define NOTAPPLICABLE 5
+#define REFUSED 6
#define CEC_LOG_ADDR_MASK_ALL 0xffff
@@ -307,6 +308,11 @@ static inline bool unrecognized_op(const struct cec_msg *msg)
return false;
}
+static inline bool refused(const struct cec_msg *msg)
+{
+ return cec_msg_status_is_abort(msg) && abort_reason(msg) == CEC_OP_ABORT_REFUSED;
+}
+
static inline bool timed_out(const struct cec_msg *msg)
{
return msg->rx_status & CEC_RX_STATUS_TIMEOUT;
@@ -366,7 +372,7 @@ static inline bool transmit_timeout(struct node *node, struct cec_msg *msg,
reason = "Unknown";
break;
}
- warn("Opcode %x was replied to with Feature Abort [%s]\n",
+ info("Opcode %x was replied to with Feature Abort [%s]\n",
msg->msg[2], reason);
return true;
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 509fe894..c60495d8 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -199,6 +199,8 @@ static int arc_initiate_tx(struct node *node, unsigned me, unsigned la, bool int
}
else if (cec_msg_opcode(&msg) == CEC_MSG_REPORT_ARC_TERMINATED)
announce("Device supports ARC but is not ready to initiate.");
+ else if (refused(&msg))
+ return REFUSED;
else if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -226,6 +228,8 @@ static int arc_terminate_tx(struct node *node, unsigned me, unsigned la, bool in
fail_on_test(unrecognized_op(&msg));
if (cec_msg_status_is_abort(&msg)) {
warn("Received Feature Abort for Terminate ARC (but the message was recognized).");
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -298,6 +302,8 @@ static int arc_terminate_rx(struct node *node, unsigned me, unsigned la, bool in
fail_on_test(unrecognized_op(&msg));
if (cec_msg_status_is_abort(&msg)) {
warn("Received Feature Abort for Request ARC Termination (but the message was recognized).");
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -332,6 +338,8 @@ static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bo
fail_on_test(timed_out(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
node->remote[la].has_sad = true;
@@ -357,7 +365,7 @@ static int sac_sad_format_check(struct node *node, unsigned me, unsigned la, boo
cec_msg_request_short_audio_descriptor(&msg, true, 1, &audio_format_id, &audio_format_code);
fail_on_test(!transmit_timeout(node, &msg));
fail_on_test(timed_out(&msg));
- fail_on_test(unrecognized_op(&msg));
+ fail_on_test(unrecognized_op(&msg) || refused(&msg));
if (cec_msg_status_is_abort(&msg) &&
abort_reason(&msg) == CEC_OP_ABORT_INVALID_OP)
@@ -429,6 +437,8 @@ static int sac_set_system_audio_mode_direct(struct node *node, unsigned me, unsi
unrecognized_op(&msg) && is_tv(la, node->remote[la].prim_type));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
node->remote[la].has_set_sys_audio_mode = true;
return PRESUMED_OK;
@@ -461,6 +471,8 @@ static int sac_system_audio_mode_status(struct node *node, unsigned me, unsigned
if (unrecognized_op(&msg) && !node->remote[la].has_set_sys_audio_mode)
return NOTSUPPORTED;
fail_on_test(unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -496,6 +508,8 @@ static int sac_system_audio_mode_req_on(struct node *node, unsigned me, unsigned
cec_has_audiosystem(1 << la) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
node->remote[la].has_sys_audio_mode_req = true;
@@ -523,6 +537,8 @@ static int sac_give_system_audio_mode_status(struct node *node, unsigned me, uns
if (unrecognized_op(&msg) && !node->remote[la].has_sys_audio_mode_req)
return NOTSUPPORTED;
fail_on_test(unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
cec_ops_system_audio_mode_status(&msg, &system_audio_status);
@@ -545,6 +561,8 @@ static int sac_give_audio_status(struct node *node, unsigned me, unsigned la, bo
cec_has_audiosystem(1 << la) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -596,6 +614,8 @@ static int sac_util_send_user_control_press(struct node *node, unsigned me, unsi
if (unrecognized_op(&msg) && !node->remote[la].has_sys_audio_mode_req)
return NOTSUPPORTED;
fail_on_test(unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
if (got_response) {
@@ -664,6 +684,8 @@ static int sac_user_control_release(struct node *node, unsigned me, unsigned la,
if (unrecognized_op(&msg) && !node->remote[la].has_sys_audio_mode_req)
return NOTSUPPORTED;
fail_on_test(unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -686,6 +708,8 @@ static int sac_system_audio_mode_req_off(struct node *node, unsigned me, unsigne
cec_has_audiosystem(1 << la) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
cec_ops_set_system_audio_mode(&msg, &status);
@@ -765,6 +789,8 @@ static int audio_rate_ctl_set_audio_rate(struct node *node, unsigned me, unsigne
!node->remote[la].has_aud_rate && !unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
diff --git a/utils/cec-compliance/cec-test-power.cpp b/utils/cec-compliance/cec-test-power.cpp
index 06ad1532..5145ecda 100644
--- a/utils/cec-compliance/cec-test-power.cpp
+++ b/utils/cec-compliance/cec-test-power.cpp
@@ -79,6 +79,8 @@ static int power_status_probe(struct node *node, unsigned me, unsigned la, bool
fail_on_test(!transmit_timeout(node, &msg));
fail_on_test(timed_out(&msg));
fail_on_test(unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -108,6 +110,8 @@ static int one_touch_play_image_view_on(struct node *node, unsigned me, unsigned
cec_msg_image_view_on(&msg);
fail_on_test(!transmit_timeout(node, &msg));
fail_on_test(is_tv(la, node->remote[la].prim_type) && unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
fail_on_test(interactive && !question("Did the TV turn on?"));
@@ -129,6 +133,8 @@ static int one_touch_play_text_view_on(struct node *node, unsigned me, unsigned
cec_msg_text_view_on(&msg);
fail_on_test(!transmit_timeout(node, &msg));
fail_on_test(is_tv(la, node->remote[la].prim_type) && unrecognized_op(&msg));
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
fail_on_test(interactive && !question("Did the TV turn on?"));
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 7596c678..e38be245 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -84,6 +84,9 @@ static int system_info_version(struct node *node, unsigned me, unsigned la, bool
fail_on_test(timed_out(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
+
/* This needs to be kept in sync with newer CEC versions */
fail_on_test(msg.msg[2] < CEC_OP_CEC_VERSION_1_3A ||
msg.msg[2] > CEC_OP_CEC_VERSION_2_0);
@@ -110,6 +113,10 @@ static int system_info_get_menu_lang(struct node *node, unsigned me, unsigned la
warn("TV did not respond to Get Menu Language.\n");
return NOTSUPPORTED;
}
+ if (refused(&msg))
+ return REFUSED;
+ if (cec_msg_status_is_abort(&msg))
+ return PRESUMED_OK;
cec_ops_set_menu_language(&msg, language);
language[3] = 0;
@@ -125,6 +132,8 @@ static int system_info_set_menu_lang(struct node *node, unsigned me, unsigned la
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -142,6 +151,8 @@ static int system_info_give_features(struct node *node, unsigned me, unsigned la
return NOTSUPPORTED;
fail_on_test_v2(node->remote[la].cec_version, true);
}
+ if (refused(&msg))
+ return REFUSED;
if (node->remote[la].cec_version < CEC_OP_CEC_VERSION_2_0)
info("Device has CEC Version < 2.0 but supports Give Features.\n");
@@ -236,6 +247,10 @@ static int vendor_specific_commands_id(struct node *node, unsigned me, unsigned
fail_on_test(!transmit(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
+ if (cec_msg_status_is_abort(&msg))
+ return PRESUMED_OK;
return 0;
}
@@ -260,6 +275,8 @@ static int device_osd_transfer_set(struct node *node, unsigned me, unsigned la,
warn("TV feature aborted Set OSD Name\n");
return NOTSUPPORTED;
}
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -277,6 +294,10 @@ static int device_osd_transfer_give(struct node *node, unsigned me, unsigned la,
fail_on_test(!is_tv(la, node->remote[la].prim_type) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
+ if (cec_msg_status_is_abort(&msg))
+ return PRESUMED_OK;
return 0;
}
@@ -311,6 +332,8 @@ static int osd_string_set_default(struct node *node, unsigned me, unsigned la, b
(node->remote[la].dev_features & CEC_OP_FEAT_DEV_HAS_SET_OSD_STRING));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ else if (refused(&msg))
+ return REFUSED;
else {
warn("The device is in an unsuitable state or cannot display the complete message.\n");
unsuitable = true;
@@ -403,6 +426,8 @@ static int routing_control_inactive_source(struct node *node, unsigned me, unsig
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
fail_on_test(interactive && !question("Did the TV switch away from or stop showing this source?"));
if (interactive)
@@ -501,6 +526,8 @@ static int rc_passthrough_user_ctrl_pressed(struct node *node, unsigned me, unsi
unrecognized_op(&msg) && !(cec_is_unregistered(1 << la)));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -516,6 +543,8 @@ static int rc_passthrough_user_ctrl_released(struct node *node, unsigned me, uns
cec_msg_status_is_abort(&msg) && !(la & CEC_LOG_ADDR_MASK_UNREGISTERED));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
node->remote[la].has_remote_control_passthrough = true;
return PRESUMED_OK;
@@ -542,6 +571,10 @@ static int dev_menu_ctl_request(struct node *node, unsigned me, unsigned la, boo
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
+ if (cec_msg_status_is_abort(&msg))
+ return PRESUMED_OK;
if (node->remote[la].cec_version >= CEC_OP_CEC_VERSION_2_0)
warn("The Device Menu Control feature is deprecated in CEC 2.0");
@@ -557,6 +590,10 @@ static int dev_menu_ctl_status(struct node *node, unsigned me, unsigned la, bool
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
+ if (cec_msg_status_is_abort(&msg))
+ return PRESUMED_OK;
if (node->remote[la].cec_version >= CEC_OP_CEC_VERSION_2_0)
warn("The Device Menu Control feature is deprecated in CEC 2.0");
@@ -590,6 +627,8 @@ static int deck_ctl_give_status(struct node *node, unsigned me, unsigned la, boo
!node->remote[la].has_deck_ctl && !unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -605,6 +644,8 @@ static int deck_ctl_deck_status(struct node *node, unsigned me, unsigned la, boo
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -624,6 +665,8 @@ static int deck_ctl_deck_ctl(struct node *node, unsigned me, unsigned la, bool i
!node->remote[la].has_deck_ctl && !unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -643,6 +686,8 @@ static int deck_ctl_play(struct node *node, unsigned me, unsigned la, bool inter
!node->remote[la].has_deck_ctl && !unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -681,6 +726,8 @@ static int tuner_ctl_give_status(struct node *node, unsigned me, unsigned la, bo
fail_on_test(timed_out(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -699,6 +746,12 @@ static int tuner_ctl_sel_analog_service(struct node *node, unsigned me, unsigned
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (abort_reason(&msg) == CEC_OP_ABORT_INVALID_OP) {
+ info("Tuner supports %s, but cannot select that service.\n",
+ bcast_system2s(sys));
+ node->remote[la].bcast_sys = sys;
+ continue;
+ }
if (cec_msg_status_is_abort(&msg))
continue;
info("Tuner supports %s\n", bcast_system2s(sys));
@@ -706,7 +759,9 @@ static int tuner_ctl_sel_analog_service(struct node *node, unsigned me, unsigned
}
if (node->remote[la].bcast_sys == (__u8)~0)
- return fail("No analog broadcast format supported\n");
+ warn("No analog broadcast format supported\n");
+ else
+ return 0;
return PRESUMED_OK;
}
@@ -746,6 +801,12 @@ static int tuner_ctl_sel_digital_service(struct node *node, unsigned me, unsigne
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (abort_reason(&msg) == CEC_OP_ABORT_INVALID_OP) {
+ info("Tuner supports %s, but cannot select that service.\n",
+ dig_bcast_system2s(sys));
+ node->remote[la].dig_bcast_sys = sys;
+ continue;
+ }
if (cec_msg_status_is_abort(&msg))
continue;
info("Tuner supports %s\n", dig_bcast_system2s(sys));
@@ -753,7 +814,9 @@ static int tuner_ctl_sel_digital_service(struct node *node, unsigned me, unsigne
}
if (node->remote[la].dig_bcast_sys == (__u8)~0)
- return fail("No digital broadcast system supported\n");
+ warn("No digital broadcast system supported\n");
+ else
+ return 0;
return PRESUMED_OK;
}
@@ -777,6 +840,8 @@ static int tuner_ctl_tuner_dev_status(struct node *node, unsigned me, unsigned l
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -792,6 +857,8 @@ static int tuner_ctl_step_dec(struct node *node, unsigned me, unsigned la, bool
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -805,6 +872,8 @@ static int tuner_ctl_step_inc(struct node *node, unsigned me, unsigned la, bool
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -848,6 +917,8 @@ static int one_touch_rec_tv_screen(struct node *node, unsigned me, unsigned la,
!node->remote[la].has_rec_tv && !unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -871,6 +942,8 @@ static int one_touch_rec_on(struct node *node, unsigned me, unsigned la, bool in
fail_on_test(cec_has_record(1 << la) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -887,9 +960,10 @@ static int one_touch_rec_off(struct node *node, unsigned me, unsigned la, bool i
fail_on_test(cec_has_record(1 << la) && unrecognized_op(&msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
-
if (timed_out(&msg))
return PRESUMED_OK;
else
@@ -905,6 +979,8 @@ static int one_touch_rec_status(struct node *node, unsigned me, unsigned la, boo
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -943,6 +1019,8 @@ static int timer_prog_set_analog_timer(struct node *node, unsigned me, unsigned
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -970,6 +1048,8 @@ static int timer_prog_set_digital_timer(struct node *node, unsigned me, unsigned
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -992,6 +1072,8 @@ static int timer_prog_set_ext_timer(struct node *node, unsigned me, unsigned la,
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -1016,6 +1098,8 @@ static int timer_prog_clear_analog_timer(struct node *node, unsigned me, unsigne
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -1043,6 +1127,8 @@ static int timer_prog_clear_digital_timer(struct node *node, unsigned me, unsign
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -1065,6 +1151,8 @@ static int timer_prog_clear_ext_timer(struct node *node, unsigned me, unsigned l
}
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
if (cec_msg_status_is_abort(&msg))
return PRESUMED_OK;
@@ -1080,6 +1168,8 @@ static int timer_prog_set_prog_title(struct node *node, unsigned me, unsigned la
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -1096,6 +1186,8 @@ static int timer_prog_timer_status(struct node *node, unsigned me, unsigned la,
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -1109,6 +1201,8 @@ static int timer_prog_timer_clear_status(struct node *node, unsigned me, unsigne
fail_on_test(!transmit_timeout(node, &msg));
if (unrecognized_op(&msg))
return NOTSUPPORTED;
+ if (refused(&msg))
+ return REFUSED;
return PRESUMED_OK;
}
@@ -1343,6 +1437,8 @@ void testRemote(struct node *node, unsigned me, unsigned la, unsigned test_tags,
}
else if (ret == PRESUMED_OK)
printf("\t %s: OK (Presumed)\n", tests[i].subtests[j].name);
+ else if (ret == REFUSED)
+ printf("\t %s: OK (Refused)\n", tests[i].subtests[j].name);
else if (ret != NOTAPPLICABLE)
printf("\t %s: %s\n", tests[i].subtests[j].name, ok(ret));
if (ret == FAIL_CRITICAL)

Privacy Policy