When Test::Reporter sends a report from a file that a different perl had previously written, then the object that gets posted to metabase contains the field 'osvers' of the running perl instead of the one of the perl that wrote the report.
I have patched Test::Reporter with this change:
--- /home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.30.1/1e0c/lib/site_perl/5.30.1/Test/Reporter.pm~1.62 2015-04-06 16:02:27.000000000 +0000
+++ /home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.30.1/1e0c/lib/site_perl/5.30.1/Test/Reporter.pm 2022-03-15 03:22:29.294638925 +0000
@@ -3,7 +3,7 @@
use warnings;
package Test::Reporter;
-our $VERSION = '1.62';
+our $VERSION = '1.620001';
use Cwd;
use Config;
@@ -368,10 +368,11 @@
$self->{_from} = $content;
} elsif ($header eq "Subject") {
$self->{_subject} = $content;
- my ($grade, $distribution, $archname) = (split /\s/, $content)[0..2];
+ my ($grade, $distribution, $archname, $osvers) = (split /\s/, $content)[0..3];
$self->{_grade} = lc $grade;
$self->{_distribution} = $distribution;
$self->{_perl_version}{_archname} = $archname;
+ $self->{_perl_version}{_osvers} = $osvers;
$self->{_subject_lock} = 1;
} elsif ($header eq "X-Test-Reporter-Distfile") {
$self->{_distfile} = $content;
As a verification that it works, witness these two queries to the API:
A report before the patch: curl -X GET --header 'Accept: text/html' 'http://api.cpantesters.org/v3/report/6aaa81be-a40e-11ec-8b43-57cb0b534052'
In the output you find osvers=5.4.0-100-generic in the report and "osversion":"5.3.0-2-amd64" as object attribute. These two things should be the same, but here the second one comes from the perl that delivered the report to the API.
A report after my patch: curl -X GET --header 'Accept: text/html' 'http://api.cpantesters.org/v3/report/b08fa7c6-a40f-11ec-bf89-e2e80b534052'
In this output you find osvers=4.15.0-169-generic in the report and "osversion":"4.15.0-169-generic" as object attribute. Here the two strings are identical, osvers does not "leak" from the delivering perl to the delivered report.
I hope you like it,
When Test::Reporter sends a report from a file that a different perl had previously written, then the object that gets posted to metabase contains the field 'osvers' of the running perl instead of the one of the perl that wrote the report.
I have patched Test::Reporter with this change:
As a verification that it works, witness these two queries to the API:
A report before the patch:
curl -X GET --header 'Accept: text/html' 'http://api.cpantesters.org/v3/report/6aaa81be-a40e-11ec-8b43-57cb0b534052'In the output you find
osvers=5.4.0-100-genericin the report and"osversion":"5.3.0-2-amd64"as object attribute. These two things should be the same, but here the second one comes from the perl that delivered the report to the API.A report after my patch:
curl -X GET --header 'Accept: text/html' 'http://api.cpantesters.org/v3/report/b08fa7c6-a40f-11ec-bf89-e2e80b534052'In this output you find
osvers=4.15.0-169-genericin the report and"osversion":"4.15.0-169-generic"as object attribute. Here the two strings are identical, osvers does not "leak" from the delivering perl to the delivered report.I hope you like it,