Package: mysql-5.6
Version: 5.6.28-1
Severity: wishlist

Hello,

I'm running autopkgtests on s390x, and they fail. There is a perl
module which is parsing /proc/cpuinfo. However, cpuinfo has quite
different output on s390x:

vendor_id       : IBM/S390
# processors    : 4
bogomips per cpu: 3033.00
features : esan3 zarch stfle msa ldisp eimm dfp etf3eh highgprs
cache0          : level=1 type=Data scope=Private size=128K
line_size=256 associativity=8
cache1          : level=1 type=Instruction scope=Private size=96K
line_size=256 associativity=6
cache2          : level=2 type=Data scope=Private size=2048K
line_size=256 associativity=8
cache3          : level=2 type=Instruction scope=Private size=2048K
line_size=256 associativity=8
cache4          : level=3 type=Unified scope=Shared size=65536K
line_size=256 associativity=16
cache5          : level=4 type=Unified scope=Shared size=491520K
line_size=256 associativity=30
processor 0: version = FF,  identification = 018F67,  machine = 2964
processor 1: version = FF,  identification = 018F67,  machine = 2964
processor 2: version = FF,  identification = 018F67,  machine = 2964
processor 3: version = FF,  identification = 018F67,  machine = 2964

Notice, how there are no redundant paragraphs of text per each cpu
core. And that there is simply a "comment" specifying how many there
are. Also it's "features", rather than "flags".

Imho, /proc/cpuinfo should not be parsed for such things, and e.g.
instead nproc should be called to find number of the CPUs. Anyway, i
have "fixed" these things up, hopefully in an unintrusive way. Would
you please consider applying the below patch?

-- 
Regards,

Dimitri.
Description: Fix cpu query on s390x to run autopkgtest.
Author: Dimitri John Ledkov <x...@ubuntu.com>

--- mysql-5.6-5.6.28.orig/mysql-test/lib/My/SysInfo.pm
+++ mysql-5.6-5.6.28/mysql-test/lib/My/SysInfo.pm
@@ -44,6 +44,7 @@ sub _cpuinfo {
     foreach my $cpuline ( split(/\n/, $cpu_chunk) ) {
       my ( $attribute, $value ) = split(/\s*:\s*/, $cpuline);
 
+      $attribute =~ s/\# processors/cpu_count/;
       $attribute =~ s/\s+/_/;
       $attribute = lc($attribute);
 
@@ -51,7 +52,7 @@ sub _cpuinfo {
 	$value = $value eq 'yes' ? 1 : 0;
       }
 
-      if ( $attribute eq 'flags' ) {
+      if ( $attribute eq 'flags' || $attribute eq 'features' ) {
 	@{ $cpuinfo->{flags} } = split / /, $value;
       } else {
 	$cpuinfo->{$attribute} = $value;

Reply via email to