This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: cec-ctl: avoid confusing error message
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Mon Mar 18 09:18:13 2024 +0100

In the --stress-test-random-standby-wakeup-cycle test it attempted
to transmit <Standby> or <Image View On> for up to 50 times with a
0.2s wait in between each attempt. If all attempts fail, then log
the transmit error.

However, a 10 second wait is overkill here, retrying it 10 times
(2 seconds) is sufficient. And if the error is ENONET (i.e. the HPD
of the HDMI receiver is low), then don't log the error message.

This is a valid situation in this test if the HPD happened to be low
due to an earlier Standby and if it didn't see/honor the Image View
On that followed. So seeing a "Machine is not on the network" error
is confusing.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/cec-ctl/cec-ctl.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=e429366f9a04338cc63ddeb1127e7a34b60ee482
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 400e013c5ed1..1a5f874e939e 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1978,13 +1978,13 @@ static void 
stress_test_random_standby_wakeup_cycle(const struct node &node, uns
 
                cec_msg_init(&msg, wakeup_la, CEC_LOG_ADDR_TV);
                cec_msg_image_view_on(&msg);
-               for (int i = 0; i < 50; i++) {
+               for (int i = 0; i < 10; i++) {
                        ret = transmit_msg_retry(node, msg);
                        if (!ret)
                                break;
                        usleep(200000);
                }
-               if (ret)
+               if (ret != ENONET)
                        printf("%s\n", strerror(ret));
                else
                        printf("OK\n");
@@ -2071,13 +2071,13 @@ done:
                transmit_msg_retry(node, msg);
                cec_msg_init(&msg, from, CEC_LOG_ADDR_TV);
                cec_msg_standby(&msg);
-               for (int i = 0; i < 50; i++) {
+               for (int i = 0; i < 10; i++) {
                        ret = transmit_msg_retry(node, msg);
                        if (!ret)
                                break;
                        usleep(200000);
                }
-               if (ret)
+               if (ret != ENONET)
                        printf("%s\n", strerror(ret));
                else
                        printf("OK\n");

Reply via email to