bugmake - Bugs: bug #62173, Fix test features/archives.

 
 

bug #62173: Fix test features/archives.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 12 Mar 2022 11:11:39 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4 Operating System:  None
Fixed Release:  4.4 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 28 Apr 2022 12:11:58 AM UTC, comment #4: 

Paul, a typo was introduced, which causes multiple tests to fail.
Please have a look at sv62173_fix_typo.diff.

Dmitry Goncharov <dgoncharov>
Sun 24 Apr 2022 06:20:30 PM UTC, comment #3: 

Fixed.  Thanks!

Paul D. Smith <psmith>
Group administrator
Sun 13 Mar 2022 02:49:55 PM UTC, comment #2: 

The patch contains the following changes

-my $arflags = 'rv';
+my $arflags = '-rv';
+if ($^O eq 'aix') {
+    $arflags = "-Xany -rv";
+}


That reason for the first part of the patch, specifically

-my $arflags = 'rv';
+my $arflags = '-rv'

is the following

The test has the following piece of code


$_ = `$ar U$arflags libxx.a a1.o $redir`;
if ($? == 0) {
    $arflags = 'Urv';
    $arvar = "$arvar ARFLAGS=$arflags";
}


This piece of code causes $arvar contain $arflags.
This happens only when ar supports -U. This is relatively new version of gnu ar.
Other systems (not only aix) won't have ar support -U and $arvar on those systems does not contain $arflags. The default value of ARFLAGS builtin in make was change from 'rv' to -rv' in 0e020bbc24d89592e9ea15f9e8b887a71692eedf. This makes the test fail on any system where ar does not support -U.

The other part of the patch, specifically

+if ($^O eq 'aix') {
+    $arflags = "-Xany -rv";
+}

is indeed aix specific. I originally proposed to use an env var OBJECT_MODE and keep arflags intact on aix (see sv 59096). But that robs the user of the ability to override the value.
However, i'd call this change trivial.



> I have quite a few of similar issues with the test suite on MS-Windows, but I never thought I should make changes non-trivial to the test suite to make those pseudo-failures pass.  Instead, I eyeball the test diffs to determine whether the issue is real or not.


i once had to make a change which affected windows (sv 60774). Once i was able to build make, i wanted to check that the test suite passes. It did not. i am not familiar with windows. i'd definitely appreciate if the test suite passed. Similarly, if you ever have to make a change on sun or aix, etc, you'll appreciate if the test suite passes.

Dmitry Goncharov <dgoncharov>
Sun 13 Mar 2022 05:58:03 AM UTC, comment #1: 

It's eventually up to Paul, but I feel slightly uneasy with such fixes for the benefit of a system we barely support and that is not a free OS.  E.g., I have quite a few of similar issues with the test suite on MS-Windows, but I never thought I should make changes non-trivial to the test suite to make those pseudo-failures pass.  Instead, I eyeball the test diffs to determine whether the issue is real or not.

In any case, the changes should be commented to explain the problem which led to the solution, as we cannot rely on everyone to be aware of the AIX quirks.

Eli Zaretskii <eliz>
Group Member
Sat 12 Mar 2022 11:11:39 PM UTC, original submission:  

features/archives tests fail on aix, because make passes ARFLAGS='-Xany -rv', the test expects ARFLAGS='rv'.


Clearing work...
Making work dirs...

features/archives ....................................... FAILED (5/12 passed)

7 Tests in 1 Category Failed (See .diff* files in work dir for details) :-(

$ cat work/features/archives.diff
archives.diff     archives.diff.10  archives.diff.4   archives.diff.6
archives.diff.1   archives.diff.2   archives.diff.5
$ cat work/features/archives.diff
*** work/features/archives.base Sat Mar 12 12:12:52 2022
--- work/features/archives.log  Sat Mar 12 12:12:52 2022
***************
*** 1,3 ****
! ar rv libxx.a a1.o
  ar: creating an archive file libxx.a
  a - a1.o
--- 1,3 ----
! ar -Xany -rv libxx.a a1.o
  ar: creating an archive file libxx.a
  a - a1.o


Similary features/archives tests fail on sun, because make passes ARFLAGS='-rv, the tests expect ARFLAGS='rv'.



features/archives ....................................... FAILED (5/12 passed)

7 Tests in 1 Category Failed (See .diff* files in work dir for details) :-(

$ cat work/features/archives.diff
*** work/features/archives.base Sat Mar 12 12:18:35 2022
--- work/features/archives.log  Sat Mar 12 12:18:35 2022
***************
*** 1,4 ****
! ar rv libxx.a a1.o
  ar: creating libxx.a
  ar: writing libxx.a
  a - a1.o
--- 1,4 ----
! ar -rv libxx.a a1.o
  ar: creating libxx.a
  ar: writing libxx.a


Dmitry Goncharov <dgoncharov>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53152:  sv62173_fix_typo.diff added by dgoncharov (515B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by eliz (Posted a comment)
  • -email is unavailable- added by dgoncharov (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
    2022-04-28 dgoncharov Attached File- Added sv62173_fix_typo.diff, #53152
    2022-04-24 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2022-03-12 dgoncharov Attached File- Added test_features_archive_fix.diff, #52982

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code