History log of /openbmc/u-boot/test/command_ut.c (Results 1 – 25 of 27)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v00.04.15, v00.04.14, v00.04.13, v00.04.12, v00.04.11, v00.04.10, v00.04.09, v00.04.08, v00.04.07, v00.04.06, v00.04.05, v00.04.04, v00.04.03, v00.04.02, v00.04.01, v00.04.00, v2021.04, v00.03.03, v2021.01, v2020.10, v2020.07, v00.02.13, v2020.04, v2020.01, v2019.10, v00.02.05, v00.02.04, v00.02.03, v00.02.02, v00.02.01, v2019.07, v00.02.00, v2019.04, v2018.07
# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

show more ...


Revision tags: v2018.03, v2018.01, v2017.11
# 00caae6d 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few place

env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


Revision tags: v2016.07, openbmc-20160624-1
# f1f9d4fa 20-Jun-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER

There is no more define of CONFIG_SYS_HUSH_PARSER. Rename some
remaining references and drop the backward compatible Kconfig ent

hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER

There is no more define of CONFIG_SYS_HUSH_PARSER. Rename some
remaining references and drop the backward compatible Kconfig entry.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# 6905f4d3 21-Jan-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# cc156f3f 15-Jan-2016 Stephen Warren <swarren@nvidia.com>

test/py: test the shell if command

Migrate all most tests from command_ut.c into the Python test system.
This allows the tests to be run against any U-Boot binary that supports
the if command (i.e.

test/py: test the shell if command

Migrate all most tests from command_ut.c into the Python test system.
This allows the tests to be run against any U-Boot binary that supports
the if command (i.e. where hush is enabled) without requiring that
binary to be permanently bloated with the code from command_ut.

Some tests in command_ut.c can only be executed from C code, since they
test internal (more unit-level) features of various U-Boot APIs. The
migrated tests can all operate directly from the U-Boot console.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 8b86c609 15-Jan-2016 Stephen Warren <swarren@nvidia.com>

test/py: add test of basic shell functionality

This tests whether the following features of the U-Boot shell:
- Execution of a directly entered command.
- Compound commands (; delimiter).
- Quoting

test/py: add test of basic shell functionality

This tests whether the following features of the U-Boot shell:
- Execution of a directly entered command.
- Compound commands (; delimiter).
- Quoting of arguments containing spaces.
- Executing commands from environment variables.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 5ab097ab 15-Jan-2016 Stephen Warren <swarren@wwwdotorg.org>

test/py: add test of setenv/printenv/echo

This tests basic environment variable functionality.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stephen Warren <swarren@nvidia.co

test/py: add test of setenv/printenv/echo

This tests basic environment variable functionality.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


Revision tags: v2016.01-rc1, v2015.10, v2015.10-rc5, v2015.10-rc4, v2015.10-rc3, v2015.10-rc2, v2015.10-rc1, v2015.07, v2015.07-rc3, v2015.07-rc2, v2015.07-rc1, v2015.04, v2015.04-rc5, v2015.04-rc4, v2015.04-rc3, v2015.04-rc2, v2015.04-rc1, v2015.01, v2015.01-rc4, v2015.01-rc3, v2015.01-rc2, v2015.01-rc1
# 2302b3ab 29-Oct-2014 Rabin Vincent <rabin@rab.in>

hush: make run_command() return an error on parsing failure

run_command() returns success even if the command had a syntax error;
correct this behaviour.

Signed-off-by: Rabin Vincent <rabin@rab.in>

hush: make run_command() return an error on parsing failure

run_command() returns success even if the command had a syntax error;
correct this behaviour.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)

show more ...


# 484408fb 29-Oct-2014 Rabin Vincent <rabin@rab.in>

hush: return consistent codes from run_command()

Attempting to run:
- an empty string
- a string with just spaces

returns different error codes, 1 for the empty string and 0
for the string with j

hush: return consistent codes from run_command()

Attempting to run:
- an empty string
- a string with just spaces

returns different error codes, 1 for the empty string and 0
for the string with just spaces. Make both of them return
0 for consistency.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)

show more ...


Revision tags: v2014.10
# 87b6398b 07-Oct-2014 Simon Glass <sjg@chromium.org>

cli: hush: Adjust 'run' command to run each line of the env var

The run command treats each argument an an environment variable. It gets the
value of each variable and executes it as a command. If a

cli: hush: Adjust 'run' command to run each line of the env var

The run command treats each argument an an environment variable. It gets the
value of each variable and executes it as a command. If an environment
variable contains a newline and the hush cli is used, it is supposed to
execute each line one after the other.

Normally a newline signals to hush to exit - this is used in normal command
line entry - after a command is entered we want to return to allow the user
to enter the next one. But environment variables obviously need to execute
to completion.

Add a special case for the execution of environment variables which
continues when a newline is seen, and add a few tests to check this
behaviour.

Note: it's not impossible that this may cause regressions in other areas.
I can't think of a case but with any change of behaviour with limited test
coverage there is always a risk. From what I can tell this behaviour has
been around since at least U-Boot 2011.03, although this pre-dates sandbox
and I have not tested it on real hardware.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


Revision tags: v2014.10-rc3, v2014.10-rc2, v2014.10-rc1
# dab5e346 16-Jul-2014 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>

Conflicts:
boards.cfg


Revision tags: v2014.07, v2014.07-rc4
# ed1d98d8 25-Jun-2014 Albert ARIBAUD <albert.u.boot@aribaud.net>

Merge branch 'u-boot/master' into 'u-boot-arm/master'


# ba9b42c8 24-Jun-2014 Tom Rini <trini@ti.com>

Merge branch 'sandbox' of git://git.denx.de/u-boot-x86


# 4d907025 12-Jun-2014 Stephen Warren <swarren@nvidia.com>

sandbox: restore ability to access host fs through standard commands

Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to ha

sandbox: restore ability to access host fs through standard commands

Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.

However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
on the host.

In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.

The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

show more ...


Revision tags: v2014.07-rc3
# 93ce7561 30-May-2014 Simon Glass <sjg@chromium.org>

Add final result tests for run_command_list()

run_command_list() is supposed to return a return code of 0 for success
and 1 for failure. Add a few simple tests that confirm this. These tests
work bo

Add final result tests for run_command_list()

run_command_list() is supposed to return a return code of 0 for success
and 1 for failure. Add a few simple tests that confirm this. These tests
work both with the built-in parser and hush.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


Revision tags: v2014.07-rc2, v2014.07-rc1, v2014.04
# 1cad23c5 04-Apr-2014 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot-arm into master

Conflicts:
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg

Signed-off-by: Stefano Babic

Merge branch 'master' of git://git.denx.de/u-boot-arm into master

Conflicts:
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg

Signed-off-by: Stefano Babic <sbabic@denx.de>

show more ...


Revision tags: v2014.04-rc3, v2014.04-rc2
# cfd13e8d 01-Mar-2014 Stephen Warren <swarren@wwwdotorg.org>

unit-test: make "test -e" test independent of $CWD

The unit-test for hush's "test -e" currently relies upon being run in
the U-Boot build directory, because it tests for the existence of a file
that

unit-test: make "test -e" test independent of $CWD

The unit-test for hush's "test -e" currently relies upon being run in
the U-Boot build directory, because it tests for the existence of a file
that exists in that directory.

Fix this by explicitly creating the file we use for the existence test,
and deleting it afterwards so that multiple successive unit-test
invocations succeed. This required adding an os.c function to erase
files.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

show more ...


# fe9ca3d3 01-Mar-2014 Stephen Warren <swarren@wwwdotorg.org>

hush: fix some quoted variable expansion issues

The following shell command fails:

if test -z "$x"; then echo "zero"; else echo "non-zero"; fi

(assuming $x does not exist, it prints "non-zero" rat

hush: fix some quoted variable expansion issues

The following shell command fails:

if test -z "$x"; then echo "zero"; else echo "non-zero"; fi

(assuming $x does not exist, it prints "non-zero" rather than "zero").

... since "$x" expands to nothing, and the argument is completely
dropped, causing too few to be passed to -z, causing cmd_test() to
error out early.

This is because when variable expansions are processed by make_string(),
the expanded results are concatenated back into a new string. However,
no quoting is applied when doing so, so any empty variables simply don't
generate any parameter when the combined string is parsed again.

Fix this by explicitly replacing quoting any argument that was originally
quoted when re-generating a string from the already-parsed argument list.

This also fixes loss of whitespace in commands such as:

setenv space " "
setenv var " 1${space}${space} 2 "
echo ">>${var}<<"

Reported-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

show more ...


# eebd1b58 27-Feb-2014 Stephen Warren <swarren@wwwdotorg.org>

unit-test: clean up evironment after Hush tests

Delete the temporary variables that are used to save unit-test results
from the environment after running the test. This prevents polluting
the enviro

unit-test: clean up evironment after Hush tests

Delete the temporary variables that are used to save unit-test results
from the environment after running the test. This prevents polluting
the environment, or growing it too much.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 1ad6364e 05-Mar-2014 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot-arm


# 3e113502 20-Feb-2014 Albert ARIBAUD <albert.u.boot@aribaud.net>

Merge branch 'u-boot/master' into 'u-boot-arm/master'

Conflicts:
Makefile
drivers/net/npe/Makefile

These two conflicts arise from commit 0b2d3f20
("ARM: NET: Remove the IXP NPE ethernet driver")

Merge branch 'u-boot/master' into 'u-boot-arm/master'

Conflicts:
Makefile
drivers/net/npe/Makefile

These two conflicts arise from commit 0b2d3f20
("ARM: NET: Remove the IXP NPE ethernet driver") and are
resolved by deleting the drivers/net/npe/Makefile file
and removing the CONFIG_IXP4XX_NPE line from Makefile.

show more ...


Revision tags: v2014.04-rc1
# f2afe701 03-Feb-2014 Stephen Warren <swarren@nvidia.com>

unit-test: add lots of tests for the Hush 'test' command

I recently re-wrote cmd_test() to add new features. Add a bunch of unit-
tests to make sure I didn't break anything.

Suggested-by: Simon Gla

unit-test: add lots of tests for the Hush 'test' command

I recently re-wrote cmd_test() to add new features. Add a bunch of unit-
tests to make sure I didn't break anything.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>

show more ...


# 67486728 03-Feb-2014 Stephen Warren <swarren@nvidia.com>

unit-test: fix 'env default' invocation

"env default -f" doesn't work any more; replace it with
"env default -f -a". This avoids the following when running the ut
command:

do_ut_cmd: Testing comman

unit-test: fix 'env default' invocation

"env default -f" doesn't work any more; replace it with
"env default -f -a". This avoids the following when running the ut
command:

do_ut_cmd: Testing commands
env - environment handling commands

Usage:
env default [-f] -a - [forcibly] reset default environment
...

Signed-off-by: Stephen Warren <swarren@nvidia.com>

show more ...


Revision tags: v2014.01, v2014.01-rc3, v2014.01-rc2, v2014.01-rc1, v2013.10, v2013.10-rc4, v2013.10-rc3, v2013.10-rc2, v2013.10-rc1
# 326ea986 31-Jul-2013 Stefano Babic <sbabic@denx.de>

Merge git://git.denx.de/u-boot-arm

Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <s

Merge git://git.denx.de/u-boot-arm

Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <sbabic@denx.de>

show more ...


# 8b485ba1 25-Jul-2013 Albert ARIBAUD <albert.u.boot@aribaud.net>

Merge branch 'u-boot/master' into u-boot-arm/master


12