Skip to content

broken_config parsing wrong system.config.receive #626

@Xelynega

Description

@Xelynega

I'm running the 1.4.1 branch and am trying to create a device that passes the broken_config sequence test, but I've been running into issues and haven't been able to pass the test while others pass fine(extra_config, system_min_loglevel)

This is my understanding of what the sequencer tool is doing during the test(up to checking the response to the broken config):

  1. Sync state/config and check the state last_config matches the config timestamp
  2. Set min_loglevel to 100
  3. Wait for a system.config.apply log message, ignore log messages where timestamp < lastConfigUpdate
  4. Send the broken config
  5. Wait for a system.config.receive log message, ignore log messages where timestamp < lastConfigUpdate
  6. Check that the state has a stored status message with a warning/error(checkThatHasInterestingStatus(true))

The order of messages during the test from that my device is logging is:
TIME 1: <- config with testing.sequence_name of "reset_config" and min_loglevel of 200
TIME 2: -> state with last_config == TIME1
TIME 2: -> system.config.apply log of 300
TIME 3: <- config with testing.sequence_name of "reset_config", min_loglevel of 200, and system.extra_field of "reset_config"
TIME 4: -> state with last_config == TIME3
TIME 4: -> system.config.apply log of 300
TIME 5: <- config with testing.sequence_name of "reset_config", min_loglevel of 200, and system.extra_field of "reset_config"
TIME 6: -> state with last_config == TIME5
TIME 6: -> system.config.apply log of 300
TIME 7: <- config with testing.sequence_name of "broken_config" and min_loglevel of 200
TIME 8: -> state with last_config == TIME7
TIME 8: -> system.config.apply log of 300
TIME 9: <- config with testing.sequence_name of "broken_config" and min_loglevel of 100
TIME 10: -> state with last_config == TIME9
TIME 10: -> log event with system.config.apply log of 300, system.config.receive of 100, system.config.parse of 100
TIME 11: <- config received equal to b'{ broken because extra_field == break_json'
TIME 12: -> state with last_config == TIME9 and status message
TIME 12: -> log event with system.config.receive of 100, system.config.parse of 500

According to the verbose output of sequencer lastConfigUpdate gets set to TIME10 when system.config.receive from TIME10 is received by the sequencer, and TIME10 is the cutoff time for filtering out logs for the untilLogged call . What I think is happening is the system.config.receive message at TIME10 updates the "filter before" time, then since TIME10 >= TIME10, the call to untilLogged(SYSTEM_CONFIG_RECEIVE, SYSTEM_CONFIG_RECEIVE_LEVEL); after setExtraField("break_json") processes the system.config.receive message from TIME10 and calls checkThatHasInterestingStatus(true), which fails since the state hasn't been updates yet.

The example sequence log in validator/sequences/broken_config/sequencer.log shows that lastConfigUpdate was updated based on the system.config.receive message from T10(2023-03-07T16:40:01Z), the state with the error was sent at T12(2023-03-07T16:40:03Z), but the system.config.receive message that triggered the checkThatHasInterestingStatus call happened at T10:

2023-03-07T16:40:11Z DEBUG validation.feature.sequence stage finished waiting for log category system.config.receive level DEBUG was logged at 27s after 9s
2023-03-07T16:40:11Z TRACE validation.feature.sequence stage resume executing test at 27s
2023-03-07T16:40:11Z DEBUG validation.feature.sequence matching 2023-03-07T16:40:01Z DEBUG system.config.receive: success

Any help with this would be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions