From patchwork Wed Mar 7 18:19:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald van Dijk X-Patchwork-Id: 10264661 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D3B66055B for ; Wed, 7 Mar 2018 18:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A27729423 for ; Wed, 7 Mar 2018 18:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ED5229472; Wed, 7 Mar 2018 18:19:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 429B029423 for ; Wed, 7 Mar 2018 18:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754302AbeCGSS6 (ORCPT ); Wed, 7 Mar 2018 13:18:58 -0500 Received: from home.gigawatt.nl ([83.163.3.213]:58534 "EHLO home.gigawatt.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754248AbeCGSS6 (ORCPT ); Wed, 7 Mar 2018 13:18:58 -0500 Received: from [IPv6:2001:980:4809:1:e045:1301:c405:78bf] (unknown [IPv6:2001:980:4809:1:e045:1301:c405:78bf]) by home.gigawatt.nl (Postfix) with ESMTPSA id 816315402947; Wed, 7 Mar 2018 18:18:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 home.gigawatt.nl 816315402947 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigawatt.nl; s=default; t=1520446735; bh=es/XPC93C9Mz07Jutip7TCyioLwdY7guXlE8bFuI83c=; l=6538; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=CZ8tDiUPYKBcpPdRN4chQ8aNVrkN6XuZHUoAY2qaDiB/6nNDliksBhbC88eAFzEvo 1qDOZfZlwg842tEiN0O2HbdE6y+rLnSF1q43A5UoFBhtrXrHAJdRcx+mvwNP0gHRyJ 0yr0vy/xYW/bxZPvn/5eHCS8yXOC8LxDMoV/xh/o= Subject: Re: dash tested against ash testsuite: 17 failures To: Herbert Xu Cc: Martijn Dekker , dash@vger.kernel.org References: <2d33238c-55c6-1aed-f16b-46be410ca993@gigawatt.nl> <20180306084549.GA30473@gondor.apana.org.au> <69dc1195-54fe-8bf8-8ecf-13c3dfbe4568@gigawatt.nl> <20180307061833.GA2342@gondor.apana.org.au> <20180307065139.GA3143@gondor.apana.org.au> From: Harald van Dijk Message-ID: Date: Wed, 7 Mar 2018 19:19:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 In-Reply-To: <20180307065139.GA3143@gondor.apana.org.au> Content-Language: en-US Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 3/7/18 7:51 AM, Herbert Xu wrote: > On Wed, Mar 07, 2018 at 07:49:16AM +0100, Harald van Dijk wrote: >> >> This was wrong in the original patch, but I'm not seeing it in the updated >> patch that you replied to. When parsing a heredoc where part of delimiter is >> quoted, syntax==SQSYNTAX. Since the calls to pgetc_eatbnl() are conditional >> on syntax!=SQSYNTAX, there shouldn't be a problem. It would be a different >> story if the delimiter could be an unquoted backslash, but thankfully that >> is not possible. > > Good point. In that case please resend it with the pgetc2 change > and it should be good to go. Here you go. The problem with dash -c 'alias x= x' and dash -c 'alias bs=\\ bs ' looks like it just needs one extra line, so also attached as a separate patch. Cheers, Harald van Dijk diff --git a/src/parser.c b/src/parser.c index 382658e..7dac168 100644 --- a/src/parser.c +++ b/src/parser.c @@ -154,6 +154,7 @@ list(int nlflag) n1 = NULL; for (;;) { + checkkwd = CHKKWD | CHKALIAS; switch (peektoken()) { case TNL: if (!(nlflag & 1))