All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] test: cmd: add binop tests and enable on sandbox
@ 2026-10-29 17:34 Maxin B. John
  2026-10-29 17:34 ` [PATCH 1/2] configs: sandbox: Enable binop command Maxin B. John
  2026-10-29 17:34 ` [PATCH 2/2] test: cmd: add tests for the " Maxin B. John
  0 siblings, 2 replies; 4+ messages in thread
From: Maxin B. John @ 2026-10-29 17:34 UTC (permalink / raw)
  To: u-boot

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

-- 
2.47.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-29 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 17:34 [PATCH 0/2] test: cmd: add binop tests and enable on sandbox Maxin B. John
2026-10-29 17:34 ` [PATCH 1/2] configs: sandbox: Enable binop command Maxin B. John
2026-10-29 23:26   ` Heinrich Schuchardt
2026-10-29 17:34 ` [PATCH 2/2] test: cmd: add tests for the " Maxin B. John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.