w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
363 stars 40 forks source link

Potential problem with cddl utility #614

Closed jugglinmike closed 9 months ago

jugglinmike commented 10 months ago

When I run scripts/test.sh in a Debian VM (via libvert) or a macOS system, the script installs the Rust "cddl" crate at version 0.9.3. Contrary to the utility's documentation, the installed binary does not respond to command-line arguments or standard input. However it is invoked, it exits with a zero status code and prints nothing to standard out and standard error.

$ file ~/.cargo/bin/cddl
/home/vagrant/.cargo/bin/cddl: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2cb5ffebd6a34fa4efbb556be82d9761efa49aa5, for GNU/Linux 3.2.0, with debug_info, not stripped
$ ~/.cargo/bin/cddl; echo $?
0
$ ~/.cargo/bin/cddl help; echo $?
0
$ echo hello? | ~/.cargo/bin/cddl; echo $?
0

This behavior appears to also occur in GitHub Actions. That environment did not report any issue with the invalid CDDL included a pull request of mine. I've reviewed a handful of historic logs for that GitHub Workflow. Although GitHub's data retention policy limits the amount of data available (at the time of writing, the oldest available is an invocation on 2023-09-13), I have not yet found a case of the binary exiting with a non-zero status or printing anything to standard out or standard error.

@sadym-chromium I believe the error you reported is accurate, but I can't reproduce it. My best guess is that you have an older version of the cddl crate (since that would satisfy the Crate's installation guard in the test script), but I've been unable to install older versions to observe their behavior. What do you think?

jugglinmike commented 9 months ago

I believe that @sadym-chromium is using a different tool to consume the CDDL, so I no longer have any guesses about who may have recently used the Rust crate in this project.

whimboo commented 9 months ago

The related issue for cddl is https://github.com/anweiss/cddl/issues/213.

Until this has been fixed we really should force version 0.9.1 to be installed. Thanks for noticing that @jugglinmike!! Lets hope that we do not need any newer feature that is not available in that version of the tool. I opened https://github.com/anweiss/cddl/pull/214 to get this fixed.