bugGNU Mailutils - Bugs: bug #54807, testsuite: wordsplit.at assumes...

 
 

bug #54807: testsuite: wordsplit.at assumes /bin/sh is bash and fails when it's a standard Bourne shell

Submitter:  None
Submitted:  Mon 08 Oct 2018 10:43:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Oct 2018 11:56:19 AM UTC, comment #3: 

Thanks for drawing my attention to it. In fact, the test fails if /bin/sh is a non-POSIX shell, but you misinterpret the reason. What happens is that (1) wordsplit is unable to process nested command calls, and consequently, this test should always have failed. However, the testsuite is written so that in case of failure the remaining command invocations are passed to the shell, which make it pass if the underlying shell is POSIXly compliant.

The two bugs are now reported separately:

(1) https://savannah.gnu.org/bugs/?54829
(2) https://savannah.gnu.org/bugs/?54830

Please refer to the above bug reports for further information, including progress tracking and eventual solution.

Sergey Poznyakoff <gray>
Group administrator
Fri 12 Oct 2018 01:20:45 AM UTC, comment #2: 

The here-document part is okay, but wsp uses popen which uses standard shell, not bash.   Standard shell has backticks, but not $(..).   If you want to rely on features of more modern shells, don't call /bin/sh, that's just old Bourne shell.

Anonymous
Tue 09 Oct 2018 07:53:00 AM UTC, comment #1: 

This construct should be consumed my wsp, not by the shell. It appears in the properly quoted shell here-document construct and is supposed to be transferred verbatim to the program's standard input. If the shell is unable to handle valid here-documents, it should not be used in the first place. Mailutils testsuite makes no effort to accomodate non-standard or broken shell implementations.

Sergey Poznyakoff <gray>
Group administrator
Mon 08 Oct 2018 10:43:58 PM UTC, original submission:  

It needs to use an appropriate shell if it wants to use $( ) etc.

--- /dev/null   2018-10-03 16:50:45.000000000 -0700
+++ mailutils/libmailutils/tests/testsuite.dir/at-group
s/267/stderr    2018-10-03 16:51:15.227976569 -0700
@@ -0,0 +1 @@
+sh: syntax error at line 1: `(' unexpected
--- -   2018-10-03 16:51:15.241158886 -0700
+++ mailutils/libmailutils/tests/testsuite.dir/at-group
s/267/stdout    2018-10-03 16:51:15.236533875 -0700
@@ -1,6 +1,2 @@
-NF: 4
-0: output
-1: foo
-2: bar
-3: baz
+NF: 0

267. wordsplit.at:541: 267. nested commands (wordsplit.at:541): FAILED (wordsplit.at:543)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gray (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-09 gray StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code