FTBFS: tests fail on s390x due to incorrect regexp on /proc/cpuinfo

Bug #1997475 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git (Debian)
Fix Released
Unknown
git (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Bug Description

git commit 29fb2ec384a867ca577335a12f4b45c184e7b642, present in 2.38.0 and later, introduced a function that gets the number of cores from /proc/cpuinfo. It essentially does this:

    do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\s*:/, <>)); } if -r '/proc/cpuinfo';

On s390x, the ^processor lines are like this:

processor 0: version = FF, identification = 148F67, machine = 2964

In other arches (I checked amd64, armhf and arm64), they are like this instead:

processor : 0

As a result, that function is returning 0 on s390x, and that value is used for the number of jobs the script should execute. Since it's zero, it exits without doing anything, and that breaks the test and the build[3] on s390x.

1. https://github.com/git/git/commit/29fb2ec384a867ca577335a12f4b45c184e7b642
2. https://github.com/git/git/commit/29fb2ec384a867ca577335a12f4b45c184e7b642#diff-e7042d714d4be11a06d153e6f2daeb3c3a9766b972522baab8ba113b962086cfR574
3. https://launchpadlibrarian.net/635348769/buildlog_ubuntu-lunar-s390x.git_1%3A2.38.1-1ubuntu1_BUILDING.txt.gz

Tags: ftbfs

Related branches

Changed in git (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
description: updated
Changed in git (Debian):
status: Unknown → New
Changed in git (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package git - 1:2.38.1-1ubuntu2

---------------
git (1:2.38.1-1ubuntu2) lunar; urgency=medium

  * d/p/fix-cpuinfo-regexp.patch: fix cpuinfo regexp to accomodate the
    way s390x shows it (LP: #1997475)

 -- Andreas Hasenack <email address hidden> Tue, 22 Nov 2022 14:25:40 -0300

Changed in git (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.