aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-03-21 10:30:33 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-03-21 10:30:33 +0100
commite4f587a68cf5e896ba1ff1f205281ba870c7d58e (patch)
tree436bb55e77fcb5eee62e4a1e99a8275616367096
parentd5aa09b5c9874df226bd3f1d271c4a17e645b5eb (diff)
cec-ctl: check for incorrect state transitions
When stress testing power cycling, check for incorrect state transitions (i.e. TO_ON when you are really going to standby) and report that with 'e' or 'E'. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-ctl/cec-ctl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 29e2b481..ec7dc5ec 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1087,10 +1087,10 @@ static bool wait_for_pwr_state(struct node &node, unsigned from, bool on)
printf("-");
break;
case CEC_OP_POWER_STATUS_TO_ON:
- printf("/");
+ printf("%c", on ? '/' : 'e');
break;
case CEC_OP_POWER_STATUS_TO_STANDBY:
- printf("\\");
+ printf("%c", on ? 'E' : '\\');
break;
default:
printf(" %d ", pwr);
@@ -1132,7 +1132,9 @@ static int init_power_cycle_test(struct node &node, unsigned repeats, unsigned m
"+ Reported On\n"
"- Reported In Standby\n"
"/ Reported Transitioning to On\n"
- "\\ Reported Transitioning to Standby\n\n");
+ "\\ Reported Transitioning to Standby\n"
+ "e Reported Transitioning to On when 'to Standby' was expected\n"
+ "E Reported Transitioning to Standby when 'to On' was expected\n\n");
struct cec_log_addrs laddrs = { };
doioctl(&node, CEC_ADAP_G_LOG_ADDRS, &laddrs);

Privacy Policy