-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[SVE2] Octet strings escaped C style in Yaml cause test failure #21961
Comments
The "hex:" is supported in YAML:
Python TH only uses strings on the command line arguments. It assumes that all arguments can be put directly on the command line as-is. If we do add |
| Current YAML test generator never intended the values from the YAML to be parsed by other tools and then put on the command line Well, current YAML is intended to be a common format for tests. I believe this is fine if other tools than the current generator are using them. I also suspect that those test cases are only runs manually currently (aka they do not work in CI). And that instead of having to runs each step by hand there is a sort of script that parses them and converts them to python command (pure guess). In any cases this is not a big deal to convert from C-style to hex: but in general I agree that having a defined common format that across our tool would makes life easier... |
@vivien-apple the test cases are run fully automated. Changing to hex: notation or overriding them in test_parameters with hex: values fixes the problem. So for now switching to hex: notation in all yaml would be a good start. |
That said, the C-style escape works in CI (where the YAML is converted to C++ code in chip-tool which is then run), right? That's because the conversion to C++ ensures that non-ASCII characters in YAML strings are properly escaped when creating C strings. @bluebin14 what is the context in which this fails and how is the YAML being processed there? |
@bzbarsky-apple The simplest context is running the test using Test harness UI interface with default parameters e.g. 20202021/3840 without overriding anything and it fails as seen in the screenshot of this issue above due to binary (non ascii) characters passed on command line to chip-tool |
@bluebin14 Is there an issue tracking the test harness doing the wrong thing here? It really needs to not do that... |
@woody-apple This issue has not been solved we need to reopen this issue It was tested with new image https://github.com/CHIP-Specifications/chip-test-plans/issues/2188 |
Problem
Several Yaml's e.g. Test_TC_CADMIN_1_3.yaml declare octet strings escaped C style. This causes tast failure in all cases because raw binary data containing random control characters etc. is being passed on to chip-tool. Example:
The error in this case is:
- Test Step Error: Error occurred during execution of test case TC_CADMIN_1_3. No closing quotation
Proposed Solution
Use "hex:b96170aa..." syntax for expressing octet strings containing binary data in yaml.
The text was updated successfully, but these errors were encountered: