The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 65 ++
2 files changed, 66 insertions(+)
create mode 100644 test/hush
Verifies shell variables are replaced by their values.
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 167 +++
test/py/tests/test_ut.py | 8 +-
3 files changed, 175 insertions(+), 1 deletion(-)
create mode
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
ce40f44eb336 ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 184 -
1 file changed, 184 deletions(
As asked in commit 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover
octal/hex values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
Various cleaning.
* Modified python test to accept failure output when the test are designed to
fail.
* Bumped upstream busybox hush commits until 24h March 2022.
Francis Laniel (24):
test: Add framework to test hush behavior
test: hush: Test hush if/else
test/py: hush_if_test: Remove t
Hi.
I am really sorry for the delay in answer.
Sadly, I am not able to send a v5 for the moment.
Indeed, I am still struggling with the same bug since a lot of time...
It happens in the Azure pipeline but also locally with test.py.
I am sure the bug is related to memory management as the
Le vendredi 17 juin 2022, 16:02:35 CEST Tom Rini a écrit :
> On Fri, Jun 17, 2022 at 12:31:56AM +0200, Francis Laniel wrote:
> > Error messages like "unknown command" will make the CI fails.
> > So, for the moment, we comment these tests.
> >
> > Signed-off-
Hi.
Le lundi 20 juin 2022, 19:33:24 CEST Tom Rini a écrit :
> On Mon, Jun 20, 2022 at 04:08:32PM +, Holger Brunck wrote:
> > > > > On Fri, Jun 17, 2022 at 12:31:58AM +0200, Francis Laniel wrote:
> > > > > > These boards used set_local_var() to store some
Hi.
Le lundi 20 juin 2022, 21:11:00 CEST Tom Rini a écrit :
> On Fri, Jun 17, 2022 at 12:31:55AM +0200, Francis Laniel wrote:
> > This commit adds the following hush busybox upstream commits:
> > 21afddefd258 ("hush: fix "error: invalid preprocessing directive ##"&
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
Signed-off-by: Francis Laniel
---
test/cmd/setexpr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c
index 0dc94f7e61..71c751d766 100644
--- a/test/cmd/setexpr.c
+++ b/test/cmd/setexpr.c
@@ -308,7 +308,7 @@ static int setexpr_test_str
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Modifies the command run for hush 2021 when using string comparison operator.
Indeed, '<' and '>' must be escaped to be used as these operators.
Signed-off-by: Francis Laniel
---
test/hush/if.c | 45 +
1 file changed, 45 insertions(+)
diff
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 21 +
common/Makefile | 3
Error messages like "unknown command" will make the CI fails.
So, for the moment, we comment these tests.
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/test/hush/dollar.c b/test/hus
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/common/cli_hush_up
to environment ones.
Signed-off-by: Francis Laniel
---
board/keymile/common/common.c | 8
board/keymile/common/ivm.c| 9 +
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 3999f48719..72939af36e 100644
Enables variables expansion for hush 2021, both for local and environment
variables.
So the following commands:
foo=bar
echo $foo
setenv bar foo
echo $bar
leads to "bar" and "foo" being printed on console output.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
co
IGINT while waiting for interactive
input")
987be932ed3c ("*: slap on a few ALIGN_PTR where appropriate")
Signed-off-by: Francis Laniel
---
common/cli_hush_upstream.c | 157 +++--
1 file changed, 117 insertions(+), 40 deletions(-)
diff --git a/comm
From: Tom Rini
On Fri, Apr 01, 2022 at 01:26:53AM +0200, Francis Laniel wrote:
> Hi.
>
> First I hope you are fine and the same for your relatives.
> I would also like to apologize for the delay between v2 and v3.
>
> During 2021 summer, Sean Anderson wrote a contribution
If one defines HUSH_2021_PARSER, it is then possible to use 2021 parser with:
=> parser get
old
=> parser set 2021
2021> parser get
2021
Signed-off-by: Francis Laniel
---
cmd/parser.c | 14 -
common/cli.c | 38
Modifies return code got from while loop as hush 2021 always returns 0 from
while loop.
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test/hush/loop.c
index 519c78ef7e
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b
This flag is used to indicate we are using the hush parser.
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index a7e3d84b68..ef967f4f9e 100644
This command can be used to print the current parser with 'parser print'.
It can also be used to set the current parser with 'parser set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/parser.c | 113
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
loper to think about its code, as
in a lot of case, we want to compare integers (using '-lt' or '-gt') rather than
strings.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion
Enables using, in code, hush 2021 as parser for run_command function family.
It also enables the command run to be used by CLI user of hush 2021.
Signed-off-by: Francis Laniel
---
common/cli.c | 60 --
common/cli_hush_upstream.c | 2 +-
2 files
-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_2021.c | 286 +
common/cli_hush_upstream.c | 494 -
2 files changed, 779 insertions(+), 1 deletion(-)
create mode 100644 common/cli_hush_2021.c
diff --git a/common
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 64 ++
2 files changed, 65 insertions(+)
create mode 100644 test/hush
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
Verifies shell variables are replaced by their values.
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 167 +
2 files changed, 168 insertions(+)
create mode 100644 test/hush/dollar.c
diff --git a/test/hush/Makefile
ce40f44eb336 ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 184 -
1 file changed, 184 deletions(
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
As asked in 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover octal/hex
values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
We need to defined a dummy version of this function when compiling with
NO_SDL=1.
Otherwise, we would face compilation error.
Fixes: 250e735c692b ("video: sandbox: Avoid duplicate display windows")
Signed-off-by: Francis Laniel
---
arch/sandbox/include/asm/sdl.h | 5 +
1 file
fact it calls cli_init() and cli_loop() each
time the parser is set, so your reviews would be welcomed.
* Other commits focus on enabling features we need (e.g. if).
Changes since v2:
* Added a small fix to compile sandbox with NO_SDL=1.
* Added a command to change parser at runtime.
* Added 2021 parser f
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
As asked in 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover octal/hex
values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 64 ++
2 files changed, 65 insertions(+)
create mode 100644 test/hush
We need to defined a dummy version of this function when compiling with
NO_SDL=1.
Otherwise, we would face compilation error.
Fixes: 250e735c692b ("video: sandbox: Avoid duplicate display windows")
Signed-off-by: Francis Laniel
---
arch/sandbox/include/asm/sdl.h | 5 +
1 file
Enables variables expansion for hush 2021, both for local and environment
variables.
So the following commands:
foo=bar
echo $foo
setenv bar foo
echo $bar
leads to "bar" and "foo" being printed on console output.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
co
-by: Francis Laniel
Signed-off-by: Harald Seiler
---
common/cli_hush_2021.c | 292 +++
common/cli_hush_upstream.c | 474 -
2 files changed, 765 insertions(+), 1 deletion(-)
create mode 100644 common/cli_hush_2021.c
diff --git a/common
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
If one defines HUSH_2021_PARSER, it is then possible to use 2021 parser with:
=> parser print
old
=> parser set 2021
2021> parser get
2021
Signed-off-by: Francis Laniel
---
cmd/parser.c | 14 -
common/cli.c | 38
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/common/cli_hush_up
Modifies return code got from while loop as hush 2021 always returns 0 from
while loop.
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 34 ++
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/test/hush/loop.c b/test/hush/loop.c
index 519c78ef7e
This command can be used to print the current parser with 'parser print'.
It can also be used to set the current parser with 'parser set'.
For the moment, only one value is valid for set: old.
Signed-off-by: Francis Laniel
---
cmd/Makefile | 2 +
cmd/parser.c | 113
This flag is used to indicate we are using the hush parser.
Signed-off-by: Francis Laniel
---
common/cli.c | 2 ++
include/asm-generic/global_data.h | 4
2 files changed, 6 insertions(+)
diff --git a/common/cli.c b/common/cli.c
index a7e3d84b68..ef967f4f9e 100644
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/list.c | 69
For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Signed-off-by: Francis Laniel
---
cmd/Kconfig | 21 +
common/Makefile | 3
ce v2:
* Added a small fix to compile sandbox with NO_SDL=1.
* Added a command to change parser at runtime.
* Added 2021 parser function to all run_command*().
* Adapted
Francis Laniel (23):
video: sandbox: Add dummy function for sandbox_sdl_remove_display().
test: Add framework to test hush
loper to think about its code, as
in a lot of case, we want to compare integers (using '-lt' or '-gt') rather than
strings.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion
Modifies the command run for hush 2021 when using string comparison operator.
Indeed, '<' and '>' must be escaped to be used as these operators.
Signed-off-by: Francis Laniel
---
test/hush/if.c | 45 +
1 file changed, 45 insertions(+)
diff
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 79
Enables using, in code, hush 2021 as parser for run_command function family.
It also enables the command run to be used by CLI user of hush 2021.
Signed-off-by: Francis Laniel
---
common/cli.c | 60 --
common/cli_hush_upstream.c | 2 +-
2 files
Verifies shell variables are replaced by their values.
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 175 +
2 files changed, 176 insertions(+)
create mode 100644 test/hush/dollar.c
diff --git a/test/hush/Makefile
ce40f44eb336 ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 184 -
1 file changed, 184 deletions(
Hi.
(Sorry for the very late reply)
Le lundi 7 février 2022, 21:22:20 CET Simon Glass a écrit :
> Hi Francis,
>
> On Sun, 6 Feb 2022 at 11:23, Francis Laniel
>
> wrote:
> > Le mercredi 12 janvier 2022, 21:03:37 CET Simon Glass a écrit :
> > > Hi Francis,
&g
Modifies return code got from while loop as hush 2021 always returns 0 from
while loop.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/loop.c | 20
1 file changed, 20 insertions(+)
diff --git a/test/hush/loop.c b/test/hush/loop.c
index 519c78ef7e
Enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_upstream.c b
Modifies the command run for hush 2021 when using string comparison operator.
Indeed, '<' and '>' must be escaped to be used as these operators.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/if.c | 43 +++
1 file chang
Adds support for "if then else" construct both for command line interface and
through run_command().
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/common/cli_hush_up
loper to think about its code, as
in a lot of case, we want to compare integers (using '-lt' or '-gt') rather than
strings.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/dollar.c | 51
Modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/list.c | 48
Enables using, in code, run_command() while using hush 2021 as parser.
It also enables the command run to be used by CLI user of hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli_hush_upstream.c | 66
Enables variables expansion for hush 2021, both for local and environment
variables.
So the following commands:
foo=bar
echo $foo
setenv bar foo
echo $bar
leads to "bar" and "foo" being printed on console output.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
co
If one defines HUSH_2021_PARSER, cli_loop() will jump on hush 2021 parser code.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
common/cli.c | 14 +++---
include/cli_hush.h | 8
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/cli.c b
To use hush 2021 as U-Boot shell, one should tick "Use hush 2021 parser" under
"Hush flavor to use" choice.
Since this is a choice, you cannot use at the same time old and new flavor of
hush.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
cmd/Kconfig
-by: Francis Laniel
Signed-off-by: Harald Seiler
Reviewed-by: Simon Glass
---
common/cli_hush_2021.c | 292 +++
common/cli_hush_upstream.c | 470 -
2 files changed, 761 insertions(+), 1 deletion(-)
create mode 100644 common/cli_hush_2021
For the moment, the choice contains only entry: HUSH_OLD_PARSER which is the
default.
The goal is to prepare the field to add a new hush parser which guarantees
actual behavior is still correct.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
cmd/Kconfig | 14
The added tests verifies correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/loop.c | 64 ++
2 files changed, 65 insertions(+)
create mode 100644 test/hush
Verifies shell variables are replaced by their values.
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/dollar.c | 175 +
2 files changed, 176 insertions(+)
create mode 100644 test/hush/dollar.c
diff --git a/test/hush/Makefile
Verifies behavior of commands separated by ';', '&&' and '||'.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/list.c | 79 ++
2 files changed, 80 insertions(+)
create mode 100644 test/hus
As asked in 9c6bf1715f6a ("test/py: hush_if_test: Add tests to cover octal/hex
values"), this commit translates test_hush_if_test.py to a C test.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/hush/Makefile | 1 +
test/hush/if.c
ce40f44eb336 ("test: hush: Test hush if/else") translated this test to a C test,
so this python file is no more needed.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
---
test/py/tests/test_hush_if_test.py | 184 -
1 file changed, 184 deletions(
Introduce a new subcommand to ut: ut hush.
For the moment, this command does nothing, future commits will add tests which
will be run on command call.
Note that CONFIG_HUSH_PARSER must be defined to compile this new subcommand.
Signed-off-by: Francis Laniel
Reviewed-by: Simon Glass
cli_hush_upstream.c.
* Addressed reviews regarding variable expansion unit test.
Francis Laniel (21):
test: Add framework to test hush behavior
test: hush: Test hush if/else
test/py: hush_if_test: Remove the test file
test: hush: Test hush variable expansion
test: hush: Test hush comma
Le mercredi 12 janvier 2022, 21:03:40 CET Simon Glass a écrit :
> Hi Francis,
>
> On Fri, 31 Dec 2021 at 09:14, Francis Laniel
>
> wrote:
> > In Busybox hush, '<' and '>' are used as redirection operators.
> > For example, cat foo > bar will write content o
Le mercredi 12 janvier 2022, 21:03:37 CET Simon Glass a écrit :
> Hi Francis,
>
> On Fri, 31 Dec 2021 at 09:14, Francis Laniel
>
> wrote:
> > This commit modifies the expected result for hush 2021.
> > Indeed, there were bugs in actual U-Boot hush which were fi
Hi.
First, sorry for the delayed answer and thank you a lot for all your reviews!
Le samedi 8 janvier 2022, 15:53:49 CET Simon Glass a écrit :
> Hi Francis,
>
> On Fri, 31 Dec 2021 at 09:14, Francis Laniel
>
> wrote:
> > This commit ensures shell variables are rep
This commit modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/list.c | 48
The added tests ensure correct behavior of for, while and until loops.
Signed-off-by: Francis Laniel
---
test/hush/Makefile | 1 +
test/hush/loop.c | 64 ++
2 files changed, 65 insertions(+)
create mode 100644 test/hush/loop.c
diff --git a/test
Commit 9087ab2cc4 ("test/py: hush_if_test: Remove the test file.") translated
this test to a C test, so this python file is no more needed.
Signed-off-by: Francis Laniel
---
test/py/tests/test_hush_if_test.py | 184 -
1 file changed, 184 deletions(-)
d
This commit modifies return code got from while loop as hush 2021 always returns
0 from while loop.
Signed-off-by: Francis Laniel
---
test/hush/loop.c | 20
1 file changed, 20 insertions(+)
diff --git a/test/hush/loop.c b/test/hush/loop.c
index 519c78ef7e..56aae719dc
This commit enables the use of for, while and until loops for command line as
well as with run_command().
Signed-off-by: Francis Laniel
---
common/cli_hush_2021_upstream.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/common/cli_hush_2021_upstream.c b
This commit adds support for "if then else" construct both for command line
interface and through run_command().
Signed-off-by: Francis Laniel
---
common/cli_hush_2021_upstream.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/common/cli_hush_2021_up
This commit modifies the command run for hush 2021 when using string comparison
operator.
Indeed, '<' and '>' must be escaped to be used as string comparison operator.
Signed-off-by: Francis Laniel
---
test/hush/if.c | 43 +++
1 file chang
If one defines HUSH_2021_PARSER, cli_loop() will jump on hush 2021 parser code.
Signed-off-by: Francis Laniel
---
common/cli.c | 14 +++---
include/cli_hush.h | 8
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/cli.c b/common/cli.c
index
loper to think about its code, as
in a lot of case, we want to compare integers (using '-lt' or '-gt') rather than
strings.
Signed-off-by: Francis Laniel
---
common/cli_hush_2021_upstream.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/common/cl
This commit modifies the expected result for hush 2021.
Indeed, there were bugs in actual U-Boot hush which were fixed in upstream
Busybox.
As hush 2021 is based on upstream Busybox, these bugs no longer exist.
Signed-off-by: Francis Laniel
---
test/hush/dollar.c | 51
This commit then enables using, in code, run_command() while using hush 2021 as
parser.
It also enables the command run to be used by CLI user of hush 2021.
Signed-off-by: Francis Laniel
---
common/cli.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git
run_command() is called internally by the command run and it can also be called
directly from U-Boot code, e.g. to do unit tests.
This commit adds this path to go to hush 2021.
Signed-off-by: Francis Laniel
---
common/cli_hush_2021_upstream.c | 66 +++--
1 file
The following commit enables variables expansion for hush 2021, both for local
and environment variables.
So the following commands:
foo=bar
echo $foo
setenv bar foo
echo $bar
leads to "bar" and "foo" being printed on console output.
Signed-off-by: Francis Laniel
---
co
201 - 300 of 324 matches
Mail list logo