U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maxin B. John" <maxin.john@gmail.com>
To: u-boot@lists.u-boot-project.org
Subject: [PATCH 0/2] test: cmd: add binop tests and enable on sandbox
Date: Thu, 29 Oct 2026 19:34:37 +0200	[thread overview]
Message-ID: <20261029173443.1495866-1-maxin.john@gmail.com> (raw)

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


             reply	other threads:[~2026-10-29 17:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 17:34 Maxin B. John [this message]
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-30 15:58     ` Maxin John
2026-10-30 16:39       ` Tom Rini
2026-10-30 18:25         ` Maxin John
2026-10-30 18:34           ` Tom Rini
2026-10-29 17:34 ` [PATCH 2/2] test: cmd: add tests for the " Maxin B. John

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029173443.1495866-1-maxin.john@gmail.com \
    --to=maxin.john@gmail.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox