Skip to content

test: cmd: add binop tests and enable on sandbox

Maxin B. John u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2configs: sandbox: Enable binop commandconfigs/sandbox64_defconfig configs/sandbox_defconfig+2 -06 replies
2/2test: cmd: add tests for the binop commandtest/cmd/Makefile test/cmd/binop.c+193 -03 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchSimon Glass
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] test: cmd: add binop tests and enable on sandbox

binop has no tests today. Add some tests to catch regressions.

Each operation (xor, or, and) is tested with hex strings, environment variables or memory as sources. Results go to an environment variable, memory or the console. The tests also cover zero padding, console wrapping, bad input, plus the heap overrun.

CMD_BINOP is enabled for sandbox/sandbox64, so both 32-bit/64-bit builds run the tests.

The tests are a follow-up to the separate "cmd: binop: validate inputs and fix heap overrun" patch.

Tested with:
./test/py/test.py --bd sandbox --build -k ut_cmd_cmd_test_binop ./test/py/test.py --bd sandbox64 --build -k ut_cmd_cmd_test_binop

Maxin B. John (2):
configs: sandbox: Enable binop command
test: cmd: add tests for the binop command

 configs/sandbox64_defconfig |   1 +
 configs/sandbox_defconfig   |   1 +
 test/cmd/Makefile           |   1 +
 test/cmd/binop.c            | 192 ++++++++++++++++++++++++++++++++++++
 4 files changed, 195 insertions(+)
 create mode 100644 test/cmd/binop.c
Signature · 1 line
2.47.3