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

tests/pbkdf2: de-flanky-fy test #18932

Merged
merged 2 commits into from
Nov 18, 2022
Merged

Commits on Nov 18, 2022

  1. sys/hash/pbkdf2: Accept passwd as void * instead of uint8_t *

    Having to cast a password provided as `const char *` to
    `const uint8_t *` is a needless pain in the ass when using the API.
    Hence, fix it by accepting passwords and salts as `const void *`
    instead.
    maribu committed Nov 18, 2022
    Configuration menu
    Copy the full SHA
    e92a716 View commit details
    Browse the repository at this point in the history
  2. tests/pbkdf2: de-flanky-fy test

    Previously, the test vectors were encoded into the python test scripts,
    converted to base64, and send over to the device under test via stdio.
    The application sent back the output after converting it to base64
    first, which was read back in by the test script and decoded. Finally,
    the test script compared the result with the expected result.
    
    This made the test complex, slow and, flanky, as stdio on interfaces
    such as UART has a high bit error rate and some quirks (e.g. the EDBG
    UART bridge e.g. in the samr21-xpro dropping bytes when bursts of more
    than 64 bytes at a time are send).
    
    This basically rewrites the test to embed the test vectors in the
    firmware and do the comparison on the devices. This fixes test failures
    on the samr21-xpro, the nRF52840-DK and likely many others. Also, it
    is now fast.
    maribu committed Nov 18, 2022
    Configuration menu
    Copy the full SHA
    176cb9a View commit details
    Browse the repository at this point in the history