-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chip-tool: subscribe command exits immediately, it needs timed run option #18800
Comments
"timeout" is how long the caller of the command will wait before killing it off if it has not complete. The "subscribe" command, in non-interactive mode, completes immediately. This has nothing to do with the timeout argument. Is the actual request here for the "subscribe" command to not complete immediately? What would it do in automation exactly? When would it complete? |
@bzbarsky-apple yes the request is for the subscribe command to not complete immediately but instead wait for a specified duration and exit. Without that the subscribe command is meaningless in non interactive mode. Since the timeout argument already exists and means "wait for at most x duration before exiting", indeed a different argument would be more appropriate that means "wait for at least x duration before exiting". Note that chip-tool in TE8 already had the option of "do not exit" although you could not specify a run duration. |
I believe @vivien-apple purposefully removed the "do not exit" bit when interactive mode was implemented.... It really did not work well. That said, adding a "wait N seconds after the subscription is established before exiting" option for subscriptions might not be too difficult.... |
Also before interactive mode, the subscription keeps chip tool process until SIGTERM, using the following command: Can we restore this non-interactive chip tool feature? |
This is impediment for us to get results from preSVE testing in timely matter. Blocks automation of significant amount of test cases. Please increase the priority for a resolution of this. |
@jnsgsr Can you please describe how you would automate your test cases if And can you not achieve the same effect by writing data to the stdin of The reason this functionality was removed is that it was fundamentally pretty broken. If we're going to try to restore it, we need to understand how it would get used in practice, so we are sure it supports those uses, as well as whether those use cases are in fact unaddressed by interactive mode. |
@bzbarsky-apple We have several tests automated that are currently disabled because of this issue (some with high criticality) and it is blocking automation for many test cases where we have to test if an accessory sends events. |
stdin input handling could indeed use some tweaks, commands randomly either do not show up (all of them should be clearly echoed) or show up on every line even though issued exactly once.
|
So if my understanding is correct, you are interested in gatherings events received by It is possible to do something like ?
There is a little issue with the trace-decoder-program and status report at the moment (those are not decoded, I'm going to fix that)... (update: I have opened #19307 for it) |
This approach can get very awkward when e.g. doing subscriptions from multiple controllers (let's say 5) then stopping controller 3 after 10 seconds etc. With timed run you have 5 lines and one script. With interactive mode... still counting.There is nothing wrong in having an interactive mode but maybe its usage should not be forced. |
SDK Review: Removing |
SDK Review: @bluebin14 can you confirm to see if, or if not there are any known issues blocking SVE, or testing at this point? |
@woody-apple there are no known issues blocking SVE, the non-interactive mode timed run option for subscription test cases is a feature request for better automation capability outside the test harness. The test harness can have its own solution for those cases using interactive mode (not tested though). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Problem
chip-too subscribe command exits immediately, making it problematic to use in automated tests of all existing test plans that relate to subscription. Having an interactive mode does not solve the issue of automation.
Proposed Solution
Add option to run the tool for the duration specified. E.g. to run it for 30 seconds:
./chip-tool booleanstate subscribe state-value 1 10 30 12344321 1
The text was updated successfully, but these errors were encountered: