Skip to content

deviceid test fails for APAX #577

@doismellburning

Description

@doismellburning

Running the tests in deviceid.c with gcc -DTEST deviceid.c && ./a.out I get a test failure with the following stanza:

direwolf/src/deviceid.c

Lines 153 to 156 in 0a28e00

// null for Vendor.
deviceid_decode_dest ("APAX", device, sizeof(device));
dw_printf ("%s\n", device);
assert (strcmp(device, "AFilterX") == 0);

a.out: src/deviceid.c:156: main: Assertion `strcmp(device, "AFilterX") == 0' failed`

device appears to end up as "UNKNOWN vendor/modelAFilterX" instead of the expected "AFilterX"

Digging a little, this looks like an artifact of b26c5a4 where the error message was improved, but the test wasn't updated.

I think the best things to do here are probably:

  1. Fix deviceid_decode_dest to put a space between the error message and the model
  2. Fix the test's expected value
  3. Automatically run the test as part of the build GitHub Actions

I'll follow up with a PR for 1+2, but 3 might take me longer as I need to grapple with CMake...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions