<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-misc, branch stty</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=stty</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=stty'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2015-11-04T18:30:24+00:00</updated>
<entry>
<title>ash: add support for bash 'function' keyword</title>
<updated>2015-11-04T18:30:24+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-11-03T09:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=95ebcf79ff6f8ad21ceacb7bac665fb86c078d84'/>
<id>urn:sha1:95ebcf79ff6f8ad21ceacb7bac665fb86c078d84</id>
<content type='text'>
Where the POSIX shell allows functions to be defined as:

   name () compound-command [ redirections ]

bash adds the alternative syntax:

   function name [()] compound-command [ redirections ]

Implement this in ash's bash compatibility mode.  Most compound
commands work (for/while/until/if/case/[[]]/{}); one exception is:

   function f (echo "no way!")

The other two variants work:

   f() (echo "ok")
   function f() (echo "also ok")

function                                             old     new   delta
parse_command                                       1555    1744    +189
tokname_array                                        232     240      +8
.rodata                                           155612  155566     -46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 197/-46)           Total: 151 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush-misc/func_args1.tests: remove "UNFIXED BUG", it does not fail</title>
<updated>2015-11-04T13:50:19+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2015-11-04T13:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bc9bee01f35d6c716c087e82dae5f439de90914b'/>
<id>urn:sha1:bc9bee01f35d6c716c087e82dae5f439de90914b</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: copy function tests from hush testsuite</title>
<updated>2015-11-04T13:48:16+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-11-03T09:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=85405c80a28509f2f36c0d4fda8693aac7652d9b'/>
<id>urn:sha1:85405c80a28509f2f36c0d4fda8693aac7652d9b</id>
<content type='text'>
Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: add tests for failures of the exec and command builtins</title>
<updated>2015-10-30T21:19:06+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-10-30T19:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e939856c8724e357b3a7ba878563bfc957605504'/>
<id>urn:sha1:e939856c8724e357b3a7ba878563bfc957605504</id>
<content type='text'>
The exec builtin should return an exit status of 127 if the command
can't be found.  It doesn't:  it returns 2.

If the command builtin is used to source a script that runs a second
script that doesn't exist ash should issue an error.  Instead it seg
faults.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: only allow local variables in functions</title>
<updated>2015-10-29T19:33:44+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-10-29T16:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ef2386b80abfb22ccb697ddbdd4047aacc395c50'/>
<id>urn:sha1:ef2386b80abfb22ccb697ddbdd4047aacc395c50</id>
<content type='text'>
Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: respect -p flag when command builtin is run with -v/-V</title>
<updated>2015-10-29T19:05:32+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-08-03T12:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3f221113a50196e536bfb059712915bd8bde10d1'/>
<id>urn:sha1:3f221113a50196e536bfb059712915bd8bde10d1</id>
<content type='text'>
The command builtin should only check the default path, not $PATH,
when the -p flag is used along with -v/-V.

Based on commits 65ae84b (by Harald van Dijk) and 29ee27d (by Herbert
Xu) from git://git.kernel.org/pub/scm/utils/dash/dash.git).

function                                             old     new   delta
commandcmd                                            72      87     +15
describe_command                                     437     450     +13
typecmd                                               84      86      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 30/0)               Total: 30 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: allow newline after variable name in for loop</title>
<updated>2015-10-29T18:30:55+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-08-03T12:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ab80e01cd9865571875b5dde7d2f88dea3331969'/>
<id>urn:sha1:ab80e01cd9865571875b5dde7d2f88dea3331969</id>
<content type='text'>
Newline is a valid delimiter between the variable name and `in`
keyword in for loops.

Based on commit 22e8fb4 from git://git.kernel.org/pub/scm/utils/dash/dash.git
by Herbert Xu.

function                                             old     new   delta
parse_command                                       1568    1563      -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5)               Total: -5 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>fix file mode</title>
<updated>2015-07-13T01:52:32+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2015-07-13T01:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f54a487bb4d36a4318c5ec539f8265fdff2cac90'/>
<id>urn:sha1:f54a487bb4d36a4318c5ec539f8265fdff2cac90</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: remove parsebackquote flag</title>
<updated>2015-07-13T01:50:27+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@frippery.org</email>
</author>
<published>2015-07-01T15:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0e056f7e9efcebbbb85444221e141b37d3ab79e6'/>
<id>urn:sha1:0e056f7e9efcebbbb85444221e141b37d3ab79e6</id>
<content type='text'>
Commit 503a0b8 from git://git.kernel.org/pub/scm/utils/dash/dash.git
by Herbert Xu says:

  &gt;The parsebackquote flag is only used in a test where it always has the
  &gt;value zero.  So we can remove it altogether.

The first statement is incorrect:  parsebackquote is non-zero when
backquotes (as opposed to $(...)) are used for command substitution.
It is possible for the test to be executed with parsebackquote != 0 in
that case.

The test is question checks whether quotes have been closed, raising
the error "unterminated quoted string" if they haven't.  There seems
to be no good reason to allow unclosed quotes within backquotes.  Bash,
hush and dash (after commit 503a0b8) all treat the following as an error:

   XX=`"pwd`

whereas BusyBox ash doesn't.  It just ignores the unclosed quote and
executes pwd.

So, parsebackquote should be removed but not for the reason stated.

function                                             old     new   delta
parsebackquote                                         1       -      -1
readtoken1                                          3222    3182     -40
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-41)             Total: -41 bytes

Signed-off-by: Ron Yorston &lt;rmy@frippery.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: make "locak VAR" unset VAR (bash does that)</title>
<updated>2014-03-16T17:41:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2014-03-16T17:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=109ee5d33694a03cda3424b4846584250832ba8e'/>
<id>urn:sha1:109ee5d33694a03cda3424b4846584250832ba8e</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
