dash tested against ash testsuite: 17 failures

2016-10-01 Thread Denys Vlasenko
ash-signals/savetrap.tests While trying to port some fixes from dash, one of them broke some signal handling testcases. I guess some of things we test for are not tested by dash developers. I ran entire ash testsuite against dash, deleted failing things which dash does not support (some

Bug? "fstat64(f, ) < 0 && S_ISREG(sb.st_mode)"

2016-10-25 Thread Denys Vlasenko
/* Take care of noclobber mode. */ if (Cflag) { fname = redir->nfile.expfname; if (stat64(fname, ) < 0) { if ((f = open64(fname, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)

Re: [BUG] Interactive (d)ash exits on assigning to readonly from 'command eval'

2016-10-28 Thread Denys Vlasenko
This will probably be mangled by gmail, but here is the proposed fix: Date: Fri, 28 Oct 2016 15:43:50 +0200 Subject: [PATCH] ash: fix interactive "command eval STRING" exiting on errors. This bug is also present in current dash Signed-off-by: Denys Vlasenko <vda.li...@googlemail.co

Re: [BUG] Interactive (d)ash exits on assigning to readonly from 'command eval'

2016-10-30 Thread Denys Vlasenko
On Sat, Oct 29, 2016 at 8:22 PM, Harald van Dijk <har...@gigawatt.nl> wrote: > On 28/10/16 15:55, Denys Vlasenko wrote: >> >> This will probably be mangled by gmail, but here is the proposed fix: > > > This looks about the right approach, but it causes problems

dash bug: double-quoted "\" breaks glob protection for next char

2018-02-13 Thread Denys Vlasenko
$ >'\' $ >'\' $ dash -c 'echo "\*"' \ \ The cause: uses "\\*" pattern instead of "\\\*". The fix: /* backslash */ case CBACK: c = pgetc2(); if (c == PEOF) {

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-02-21 Thread Denys Vlasenko
ijk wrote: >>>>> On 13/02/2018 14:53, Denys Vlasenko wrote: >>>>>> $ >'\' >>>>>> $ >'\' >>>>>> $ dash -c 'echo "\*"' >>>>>> \ \ >>>>> >>>>>

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-02-28 Thread Denys Vlasenko
On Sat, Feb 24, 2018 at 5:52 PM, Herbert Xu wrote: > On Sat, Feb 24, 2018 at 10:47:07AM +0100, Harald van Dijk wrote: >> >> It seems like the new control character doesn't get escaped in one place >> where it should be, and gets lost because of that: >> >> Unpatched:

"parser: Fix backquote support in here-document EOF mark" incomplete

2018-04-01 Thread Denys Vlasenko
Hi Herbert, Regarding: commit c166b718b496da63c4df7a0972df2fc6cd38256b Author: Herbert Xu Date: Thu Mar 15 18:27:30 2018 +0800 parser: Fix backquote support in here-document EOF mark I discovered that bash, on encountering `` in eof mark, also treats eof

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-04-02 Thread Denys Vlasenko
On Sat, Mar 10, 2018 at 3:04 AM, Harald van Dijk wrote: > On 3/8/18 1:40 AM, Harald van Dijk wrote: >> >> If the syntax stack is to be stored on the actual stack, then real >> recursion could be used instead, as attached. > > > Even though it won't be accepted in dash, I

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-04-02 Thread Denys Vlasenko
On Mon, Apr 2, 2018 at 7:08 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Mon, Apr 02, 2018 at 03:48:46PM +0200, Denys Vlasenko wrote: >> >> Another probably buggy case: >> >> cat <> -\t-\\-\"-\'-\`-\--\z-\*-\?- >> `echo '-\t-\\-\"

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-03-04 Thread Denys Vlasenko
On Fri, Mar 2, 2018 at 7:03 PM, Harald van Dijk <har...@gigawatt.nl> wrote: > On 02/03/2018 18:00, Denys Vlasenko wrote: >> >> On Wed, Feb 14, 2018 at 9:03 PM, Harald van Dijk <har...@gigawatt.nl> >> wrote: >>> >>>

Re: dash bug: double-quoted "\" breaks glob protection for next char

2018-03-02 Thread Denys Vlasenko
On Wed, Feb 14, 2018 at 9:03 PM, Harald van Dijk wrote: > Currently: > > $ dash -c 'foo=a; echo "<${foo#[a\]]}>"' > <> > > This is what I expect, and also what bash, ksh and posh do. > > With your patch: > > $ dash -c 'foo=a; echo "<${foo#[a\]]}>"' > I was looking into this

[PATCH] Remove unused expandmeta() flag parameter

2020-04-29 Thread Denys Vlasenko
Signed-off-by: Denys Vlasenko --- src/expand.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/expand.c b/src/expand.c index 4a5d75a..985cd70 100644 --- a/src/expand.c +++ b/src/expand.c @@ -118,7 +118,7 @@ STATIC char *evalvar(char *, int); static size_t

Re: [PATCH] jobs: Block signals during tcsetpgrp

2021-01-06 Thread Denys Vlasenko
On Wed, Jan 6, 2021 at 10:17 PM Harald van Dijk wrote: > On 06/01/2021 04:45, Herbert Xu wrote: > > This patch implements the blocking of SIGTTOU (and everything else) > > while we call tcsetpgrp. > > > > Reported-by: Steffen Nurpmeso > > Signed-off-by: Herbert Xu > > > > diff --git

ungetc is not cleared on error?

2020-12-19 Thread Denys Vlasenko
Current git: $ ;l dash: 1: Syntax error: ";" unexpected $ s COPYINGChangeLog.OMakefile.am aclocal.m4 autom4te.cache config.h config.log configure dash dollar_altvalue1.tests missing stamp-h1 ChangeLog MakefileMakefile.in autogen.sh compile config.h.in

Fwd: Busybox ash buffering-related issue in error handling

2020-10-30 Thread Denys Vlasenko
This bug happens in dash too (I assume it's "pungets" counter not being reset on errors): -- Forwarded message - From: Sergey Zakharchenko Date: Thu, Oct 29, 2020 at 8:00 AM Subject: Busybox ash buffering-related issue in error handling To: Denys Vlasenko

set -i, -s do not make sense, bash does not accept them

2021-01-06 Thread Denys Vlasenko
Hello, dash accepts "set -i" and "set -s", and their +OPT forms. The -s/+s does not seem to do anything except affecting the value of $-. The -i/+i does have some effects. In interactive shell, "set +i" makes prompt disappear. In non-interactive shell, "set -i" makes it possible to ^C break the

set -I is not required by standard, and does not match bash

2021-01-04 Thread Denys Vlasenko
Hello, In dash, set -I is a short-option alias to set -o ignoreeof. However, bash does not have such alias, it has an undocumented set -I which switches off "invisible variables" (I don't know what that is). Standards do not mention any -I option. I propose, in the interests of keeping things