summaryrefslogtreecommitdiffstats
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix the core address calculationAmitay Isaacs2019-03-281-3/+3
| | | | | | | fake.dts was changed to have fixed addresses for core (to be able to test exact dn name match). Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* device.c: Fix pdbg_target_addressAlistair Popple2018-11-091-1/+9
| | | | | | | | | | | | | | | | Commit 936dbdcedb27 ("libpdbg: Rework target addressing") introduced a bug leading to the following assertion failing: pdbg: libpdbg/device.c:634: pdbg_target_address: Assertion `(pos + n) <= p->len' failed. When this function was reworked the index parameter was dropped as every caller set index == 0. Removal should have also resulted in the local pos variable being removed. Instead it was set as if index == 1 resulting in the above violation. Fix the bug and add a test to check pdbg_target_address(). Signed-off-by: Alistair Popple <alistair@popple.id.au>
* optcmd: Add OPTCMD_DEFINE_CMD_ONLY_FLAGSAlistair Popple2018-10-151-1/+26
| | | | | | | | Defines a new macro allowing commands that only taking flags and no positional arguments to be defined. Also adds a couple of test cases for the new macro. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
* tests: Add tests for libpdbg probe functionsAmitay Isaacs2018-09-071-0/+253
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* tests: Add tests for libpdbg target functionsAmitay Isaacs2018-09-071-0/+256
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* optcmd: Add testsAlistair Popple2018-06-251-0/+161
We don't really have infrastructure in place to easily add/build/run tests, but that shouldn't stop them being written. This adds some basic tests of the argument parsing logic. Signed-off-by: Alistair Popple <alistair@popple.id.au>
OpenPOWER on IntegriCloud