bugGNU roff - Bugs: bug #61079, [groff] check of reg...59202.sh...

 
 

bug #61079: [groff] check of reg...59202.sh returns one

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Wed 25 Aug 2021 02:39:27 AM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Test Status:  Invalid
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 01 Sep 2021 02:22:46 AM UTC, comment #5: 


comment #4:

>   My "make check" returned FAIL again.
>
>   I checked it three times with and without -j and all caused
> FAIL.
>
>   As it looked like a race condition I checked three times with
> "sleep 5" between the commands and equally often with "sleep 1" with a
> PASS result in all cases.
>
>   The sequence of the commands is necessary for a right result,
> so the shell must be told to do so.
>
>   The script uses:
>
> echo | "$groff" >&-
> ! test -e core
>
>   As the first line returns false,
> adding " || \" to that line should insure that it will be executed first
> and finished before next line is executed.


Multiprocessing is explicit in shell scripts, not done opportunistically.

Separate commands or pipelines are not run simultaneously in a shell script unless (1) at least one is backgrounded and (2) an execution core is available to do so.
 

>   If the command in the first line would return true,
> then the next line is superfluous.


This is unfortunately not true; groff can fail and even core dump  while still exiting with status 0.  See bug #60782.

But even if it were true, because this test script does not run "set -e", it executes the test command regardless of the exit status of groff in the previous line.

I think you're proceeding from some bad assumptions here, and therefore I do not have confidence in your analysis.

You could change the last line to:


test -e core && sleep 10000


and run "make check" without "-j" to force the test harness to stop as soon as a problem is observed.  In fact, you might put the above line before the groff command, too, to make sure the test is not tripping on a core file left by a different execution altogether.

G. Branden Robinson <gbranden>
Group administrator
Wed 01 Sep 2021 01:07:16 AM UTC, comment #4: 

  My "make check" returned FAIL again.

  I checked it three times with and without -j and all caused
FAIL.

  As it looked like a race condition I checked three times with
"sleep 5" between the commands and equally often with "sleep 1" with a
PASS result in all cases.

  The sequence of the commands is necessary for a right result,
so the shell must be told to do so.

  The script uses:

echo | "$groff" >&-
! test -e core

  As the first line returns false,
adding " || \" to that line should insure that it will be executed first
and finished before next line is executed.

  If the command in the first line would return true,
then the next line is superfluous.

Bjarni Ingi Gislason <bjarniig>
Fri 27 Aug 2021 01:04:02 AM UTC, comment #3: 


comment #2:

>   I repeated the "make check" and there was no FAIL.
>
>   So this report is one of the mysteries that I create.


Okay.  Closing.  Thanks for following up.

G. Branden Robinson <gbranden>
Group administrator
Fri 27 Aug 2021 12:57:52 AM UTC, comment #2: 

  I repeated the "make check" and there was no FAIL.

  So this report is one of the mysteries that I create.

Bjarni Ingi Gislason <bjarniig>
Wed 25 Aug 2021 02:58:46 AM UTC, comment #1: 


original submission:

> Subject: [groff] check of reg...59202.sh returns one
>
>   The check run in the Makefile returns one,
> but on the command line zero.
>
>   The return value of "groff" is 1,
> but that of the next line is normaly zero.
>


How does this constitute a defect in the test?

G. Branden Robinson <gbranden>
Group administrator
Wed 25 Aug 2021 02:39:27 AM UTC, original submission:  

Subject: [groff] check of reg...59202.sh returns one

  The check run in the Makefile returns one,
but on the command line zero.

  The return value of "groff" is 1,
but that of the next line is normaly zero.

Bjarni Ingi Gislason <bjarniig>

 

(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 gbranden (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-03-05 gbranden CategoryNone General
    2021-08-27 gbranden StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2021-08-25 gbranden StatusNone Need Info
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code