bugGNU roff - Bugs: bug #62484, [tests]: use one directory name...

 
 

bug #62484: [tests]: use one directory name instead of "./ ../ ../.." in a for loop

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Tue 17 May 2022 09:35:58 PM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Test Status:  Rejected
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Jun 2022 11:53:16 AM UTC, comment #2: 

Stripping "[PATCH]" tag from rejected patch request.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 May 2022 10:56:44 AM UTC, comment #1: 

I'm rejecting this for the reasons I offered in bug #62478.  However I have some further comments.

original submission:

>   Use the make-variable "abs_top_builddir" or "abs_top_srcdir" instead of "rootbuild" in a loop.


...well, which did you choose, and why?  Did you test your patch with both in-tree and out-of-tree builds?

>   When running the test files outside of make, these  variables must be defined with the "export" shell command.


I disagree with this.  We should be making the tests less sensitive to environment variable settings, not more.

It's possible that simply using "$top_srcdir" (for shipped artifacts) and "$top_builddir" (for generated ones) will suffice, and eliminate the need for the loops.  I didn't learn about these variables until my heavy revisions of "doc/doc.am" in recent months.  That would indeed be an improvement, though I hasten to add given some of your past bug reports that I don't think it would make the test suite measurably more performant.  The real value would be in reduction of complexity and code size for human readers of the test scripts.

As a matter of fact, maybe we don't need to be using $abs_top_builddir to locate executables in the first place.  I think I copy-and-pasted that from one of Bertrand's test scripts and I've reproduced it by rote ever since.  Maybe we can favor $top_builddir.

If you, or someone else, would like to take a stab at either of these, please file a new bug reflecting the narrower scope.

G. Branden Robinson <gbranden>
Group administrator
Tue 17 May 2022 09:35:58 PM UTC, original submission:  

From 5f92fa16c6189102dc3e3711e2a41d44da2ba1d6 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Tue, 17 May 2022 21:21:59 +0000
Subject: [PATCH] .../tests/: use one directory name instead of "./ ../ ../.."
 in a for-loop

contrib/mm/tests/remove-stale-bib-entry-data.sh

src/preproc/refer/tests/report-correct-line-numbers.sh

src/roff/groff/tests/fp_should_not_traverse_directories.sh

tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh

tmac/tests/pdfpic_falls-back-to-PSPIC.sh

  Use the make-variable "abs_top_builddir" or "abs_top_srcdir" instead
of "rootbuild" in a loop.

  When running the test files outside of make, these  variables must
be defined with the "export" shell command.

  Partial fix of bug # 62478.

From 5f92fa16c6189102dc3e3711e2a41d44da2ba1d6 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Tue, 17 May 2022 21:21:59 +0000
Subject: [PATCH] .../tests/: use one directory name instead of "./ ../ ../.."
 in a for-loop

contrib/mm/tests/remove-stale-bib-entry-data.sh

src/preproc/refer/tests/report-correct-line-numbers.sh

src/roff/groff/tests/fp_should_not_traverse_directories.sh

tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh

tmac/tests/pdfpic_falls-back-to-PSPIC.sh

  Use the make-variable "abs_top_builddir" or "abs_top_srcdir" instead
of "rootbuild" in a loop.

  When running the test files outside of make, these  variables must
be defined with the "export" shell command.

  Partial fix of bug # 62478.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 .../mm/tests/remove-stale-bib-entry-data.sh    | 15 ++++++---------
 .../refer/tests/report-correct-line-numbers.sh | 15 ++++++---------
 .../fp_should_not_traverse_directories.sh      | 15 ++++++---------
 ...pic_does-not-choke-on-bad-pdfinfo-output.sh | 18 ++++++++----------
 tmac/tests/pdfpic_falls-back-to-PSPIC.sh       | 15 ++++++---------
 5 files changed, 32 insertions(+), 46 deletions(-)

  The patch is in the attachment.

Bjarni Ingi Gislason <bjarniig>

 

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

Attach Files:
   
   
Comment:
   

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-30 gbranden Summary.../tests/: use one directory name instead of &quot;./ ../ ../..&quot; in a for-loop [tests]: use one directory name instead of "./ ../ ../.." in a for loop
    2022-06-15 gbranden Summary[PATCH] .../tests/: use one directory name instead of &quot;./ ../ ../..&quot; in a for-loop .../tests/: use one directory name instead of "./ ../ ../.." in a for-loop
    2022-05-19 gbranden StatusNone Rejected
        Assigned toNone gbranden
        Open/ClosedOpen Closed
    2022-05-17 bjarniig Attached File- Added 0001-.-tests-use-one-directory-name-instead-of-.-.-.-.-in-a.txt, #53221

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code