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
Fix errors in sequence deserialization #387
Commits on May 30, 2022
-
seq: Add tests for sequences deserialization
failures (36): seq::fixed_name::fixed_size::field_after_list::overlapped seq::fixed_name::fixed_size::field_before_list::overlapped seq::fixed_name::fixed_size::two_lists::overlapped seq::fixed_name::fixed_size::unknown_items::overlapped seq::fixed_name::variable_size::field_after_list::overlapped seq::fixed_name::variable_size::field_before_list::overlapped seq::fixed_name::variable_size::two_lists::overlapped seq::fixed_name::variable_size::unknown_items::overlapped seq::variable_name::fixed_size::field_after_list::after seq::variable_name::fixed_size::field_after_list::before seq::variable_name::fixed_size::field_after_list::overlapped seq::variable_name::fixed_size::field_before_list::after seq::variable_name::fixed_size::field_before_list::before seq::variable_name::fixed_size::field_before_list::overlapped seq::variable_name::fixed_size::two_lists::choice_and_fixed::fixed_after seq::variable_name::fixed_size::two_lists::choice_and_fixed::fixed_before seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::fixed_size::two_lists::fixed_and_choice::fixed_after seq::variable_name::fixed_size::two_lists::fixed_and_choice::fixed_before seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_before seq::variable_name::variable_size::field_after_list::after seq::variable_name::variable_size::field_after_list::before seq::variable_name::variable_size::field_after_list::overlapped seq::variable_name::variable_size::field_before_list::after seq::variable_name::variable_size::field_before_list::before seq::variable_name::variable_size::field_before_list::overlapped seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_before seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_before
Commits on Jun 2, 2022
-
seq: Allow to have an ordinary elements together with a
$value
fieldExample of a struct, that should be a valid definition: enum Choice { one, two, three } struct Root { #[serde(rename = "$value")] item: [Choice; 3], node: (), } and this struct should be able to deserialized from <root> <one/> <two/> <three/> <node/> </root> The following tests were fixed (10): seq::variable_name::fixed_size::field_after_list::after seq::variable_name::fixed_size::field_after_list::before seq::variable_name::fixed_size::field_before_list::after seq::variable_name::fixed_size::field_before_list::before seq::variable_name::fixed_size::two_lists::choice_and_fixed::fixed_after seq::variable_name::fixed_size::two_lists::choice_and_fixed::fixed_before seq::variable_name::fixed_size::two_lists::fixed_and_choice::fixed_after seq::variable_name::fixed_size::two_lists::fixed_and_choice::fixed_before seq::variable_name::variable_size::field_after_list::before seq::variable_name::variable_size::field_before_list::before failures (26): seq::fixed_name::fixed_size::field_after_list::overlapped seq::fixed_name::fixed_size::field_before_list::overlapped seq::fixed_name::fixed_size::two_lists::overlapped seq::fixed_name::fixed_size::unknown_items::overlapped seq::fixed_name::variable_size::field_after_list::overlapped seq::fixed_name::variable_size::field_before_list::overlapped seq::fixed_name::variable_size::two_lists::overlapped seq::fixed_name::variable_size::unknown_items::overlapped seq::variable_name::fixed_size::field_after_list::overlapped seq::variable_name::fixed_size::field_before_list::overlapped seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_before seq::variable_name::variable_size::field_after_list::after seq::variable_name::variable_size::field_after_list::overlapped seq::variable_name::variable_size::field_before_list::after seq::variable_name::variable_size::field_before_list::overlapped seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_before seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_before Co-authored-by: Daniel Alley <dalley@redhat.com>
Commits on Jun 5, 2022
-
seq: Split sequence accessors for top-level access and in-map access
The following tests were fixed (6): seq::variable_name::variable_size::field_after_list::after seq::variable_name::variable_size::field_before_list::after seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::fixed_before failures (20): seq::fixed_name::fixed_size::field_after_list::overlapped seq::fixed_name::fixed_size::field_before_list::overlapped seq::fixed_name::fixed_size::two_lists::overlapped seq::fixed_name::fixed_size::unknown_items::overlapped seq::fixed_name::variable_size::field_after_list::overlapped seq::fixed_name::variable_size::field_before_list::overlapped seq::fixed_name::variable_size::two_lists::overlapped seq::fixed_name::variable_size::unknown_items::overlapped seq::variable_name::fixed_size::field_after_list::overlapped seq::variable_name::fixed_size::field_before_list::overlapped seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::fixed_size::two_lists::fixed_and_choice::overlapped_fixed_before seq::variable_name::variable_size::field_after_list::overlapped seq::variable_name::variable_size::field_before_list::overlapped seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_after seq::variable_name::variable_size::two_lists::choice_and_fixed::overlapped_fixed_before seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_after seq::variable_name::variable_size::two_lists::fixed_and_choice::overlapped_fixed_before Co-authored-by: Daniel Alley <dalley@redhat.com>
-
seq: Move
has_value_field
intoMapAccess
, because it is not used ……outside it This fixes a data race with nested maps in sequence fields. Also, top-level sequences always have `has_value_field == false`, so no need to check it Co-authored-by: Daniel Alley <dalley@redhat.com>
-
seq: Allow overlapping between list items and other items
Example of such XML: <item/> <another-item/> <item/> <item/> Here we need to skip `<another-item/>` in order to collect all `<item/>`s. So ability to skip events and replay them later was added This fixes all remaining tests Co-authored-by: Daniel Alley <dalley@redhat.com>
-
seq: Allow to limit number of skipped events to prevent huge memory c…
…onsumption Co-authored-by: Daniel Alley <dalley@redhat.com>