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

Fix dcp tests #435

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix dcp tests #435

wants to merge 6 commits into from

Commits on Jun 18, 2021

  1. Allow dcp to respond to identify all filter types

    IEC 61158-6-10:2019 4.3.1.2 specifies that an identify filter packet can
    contain 1 or more filter blocks and that any block type can be first.
    p-net determines that an identify packet is a filter, if the first block is
    a station name or alias filter block.
    
    This fixes pf_dcp_identify_req () so that p-net responds to single or
    multiple identify filter packets that start any supported filter type.
    atlowl committed Jun 18, 2021
    Configuration menu
    Copy the full SHA
    ca8f81f View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2021

  1. Adding gtest for identify by id

    Adding a gtest for the identify by device id. This does both a check if
    the device id is correct, and not correct.
    atlowl committed Jun 25, 2021
    Configuration menu
    Copy the full SHA
    2b595ad View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2021

  1. DCP identify return false if it hasn't handled a request

    The function pf_dcp_identify_req, would return 1 even if the request
    wasn't handled by it, this would lead to replies to invalid requests
    sent to the device. Fixing this so that it only returns 1 if the
    request being made passes the necessary checks.
    
    Fixed the invalid ident_req array in the gtests, filled with proper
    station name, and tests now check if the station name, dcp data length
    and dcp block length are correct for packets.
    atlowl committed Jul 25, 2021
    Configuration menu
    Copy the full SHA
    e45ef6a View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. Adding gtest for identify by id

    Adding a gtest for the identify by device id. This does both a check if
    the device id is correct, and not correct.
    atlowl committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    2c6b4f9 View commit details
    Browse the repository at this point in the history
  2. Count packet types sent in mock pnal_eth_send for dcp tests

    The DCP tests would count packets at the end to ensure that p-net did
    actually reply, this count however included LLDP packets since LLDP is
    initiated at the start of the test, and is not really able to be turned
    off.
    
    Also add a small delay between sending identity requests so that the
    stack has time to add the outgoing messages to the queue, otherwise the
    2nd message stomps the first.
    atlowl committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    5644cb5 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Fix failed test when using --gtest_repeat

    Using the feature --gtest_repeat would fail for the dcp test as the new
    test introduced would change a byte of the array to make sure that the
    device ID was not recognized. But when running the test again on repeat,
    the array would stay modified, and the test fail because the ID was
    incorrect.
    atlowl committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    20edb1f View commit details
    Browse the repository at this point in the history