Skip to content
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

Regression in enum resolving in pyrflx #1104

Closed
jklmnn opened this issue Jul 11, 2022 · 0 comments · Fixed by #1105
Closed

Regression in enum resolving in pyrflx #1104

jklmnn opened this issue Jul 11, 2022 · 0 comments · Fixed by #1105
Assignees
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)

Comments

@jklmnn
Copy link
Member

jklmnn commented Jul 11, 2022

When trying to run the validation tool on SPDM I hit the following error:

------------------------------ RecordFlux Bug ------------------------------
RecordFlux 0.6.0-pre
RecordFlux-parser 0.11.0
z3-solver 4.9.1.0
pydotplus 2.0.2
attrs 21.4.0
pydantic 1.9.1
icontract 2.6.1
ruamel.yaml 0.17.21

Optimized: False

Command: /tmp/tmp.NEqskQfbh4/venv/bin/rflx --no-verification --max-errors=1 validate -o build/validate_static_response_feature_challenge_auth.log -v tests/data/spdm/Response/valid_feature_challenge_auth build/specs/CHALLENGE_AUTH=True,KEY_EXCHANGE=True,RESPOND_IF_READY=True/spdm.rflx SPDM::Response

Traceback (most recent call last):
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/cli.py", line 202, in main
    args.func(args)
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/cli.py", line 359, in validate
    Validator(
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/validator.py", line 99, in validate
    validation_result = self._validate_message(
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/validator.py", line 283, in _validate_message
    parsed_message.parse(original_message)
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/pyrflx/typevalue.py", line 882, in parse
    ) = set_field_with_size(current_field_name, current_field_size)
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/pyrflx/typevalue.py", line 853, in set_field_with_size
    self._set_parsed_value(
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/pyrflx/typevalue.py", line 1012, in _set_parsed_value
    self._set_checked(field_name, value, message_size)
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/pyrflx/typevalue.py", line 985, in _set_checked
    check_outgoing_condition_satisfied()
  File "/tmp/tmp.NEqskQfbh4/venv/lib/python3.9/site-packages/rflx/pyrflx/typevalue.py", line 929, in check_outgoing_condition_satisfied
    assert (
AssertionError: unresolved field conditions in Response.Challenge_Auth_Response_Nonce_Data: 2 /= SPDM::Meas_Unsupported
and 1 /= SPDM::No_Measurement, 2 = SPDM::Meas_Unsupported
or 1 = SPDM::No_Measurement

----------------------------------------------------------------------------

I bisected the git and could trace the bug back to d049f5f.

@jklmnn jklmnn added bug pyrflx Related to pyrflx package (Legacy Python API) labels Jul 11, 2022
@jklmnn jklmnn added this to To do in RecordFlux 0.6 via automation Jul 11, 2022
@treiher treiher self-assigned this Jul 11, 2022
@treiher treiher moved this from To do to Implementation in RecordFlux 0.6 Jul 11, 2022
@treiher treiher moved this from Implementation to Review in RecordFlux 0.6 Jul 11, 2022
RecordFlux 0.6 automation moved this from Review to Done Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants