Skip Menu |

This queue is for tickets about the Slurm-Sshare CPAN distribution.

Report information
The Basics
Id: 112721
Status: resolved
Priority: 0/
Queue: Slurm-Sshare

People
Owner: payerle [...] physics.umd.edu
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.2.0
Fixed in: 1.2.2



Subject: System perl used in t/600_sbalance.t
See http://www.cpantesters.org/cpan/report/e5770622-e2a6-11e5-8efc-839bfcd2507e for a sample fail report. The @INC array in the failing test lists paths like /usr/local/lib/perl5/5.20/mach which indicates that FreeBSD's system perl is used here, but not the perl used to build and test the distribution. Probably $^X has to be used here (or a similar solution).
Thanks again for catching my bugs:) Should be fixed in 1.2.1 which just uploaded. Also fixes a hash order randomization bug. Will update ticket tomorrow as cannot see 1.2.1 yet. On Sat Mar 05 12:49:10 2016, SREZIC wrote: Show quoted text
> See http://www.cpantesters.org/cpan/report/e5770622-e2a6-11e5-8efc- > 839bfcd2507e for a sample fail report. The @INC array in the failing > test lists paths like /usr/local/lib/perl5/5.20/mach which indicates > that FreeBSD's system perl is used here, but not the perl used to > build and test the distribution. > > Probably $^X has to be used here (or a similar solution).
I still see the problem with 1.2.1. Maybe the $^X has to go into the first argument in the exec call, that is instead of eval { exec { $SBALANCE } $^X, $SBALANCE, @args; }; it should be eval { exec { $^X } $^X, $SBALANCE, @args; }; ? Also, I don't think the eval {} is doing anything here ... exec cannot throw an exception (except if using "use autodie"). On 2016-03-07 18:25:30, PAYERLE wrote: Show quoted text
> Thanks again for catching my bugs:) > > Should be fixed in 1.2.1 which just uploaded. Also fixes a hash order > randomization bug. > Will update ticket tomorrow as cannot see 1.2.1 yet. > On Sat Mar 05 12:49:10 2016, SREZIC wrote:
> > See http://www.cpantesters.org/cpan/report/e5770622-e2a6-11e5-8efc- > > 839bfcd2507e for a sample fail report. The @INC array in the failing > > test lists paths like /usr/local/lib/perl5/5.20/mach which indicates > > that FreeBSD's system perl is used here, but not the perl used to > > build and test the distribution. > > > > Probably $^X has to be used here (or a similar solution).
You are correct about the $^X, I have just uploaded a 1.2.2 to fix. The eval probably is not needed for test code like this, but added it for good form after banging my head for a while in a similar construct. Actually for the 050_pod.t test which I expected to be a no-brainer --- just wanted to verify that if you run in Taint mode passing any tainted data to the code aborts. Slurm::Sshare/Sacctmgr do a similar fork and exec in the child construct. exec can throw exceptions in Taint mode (e.g. tainted PATH), and if you wrap a higher level function in eval{} and the exec throws an exception, it gets caught in the higher level eval in the child process, and code actually runs twice. A lot of head banging trying to work that one out:) (I think I've actually learned more about Perl in handling edge cases of the testing code than in writing the main code:) On Tue Mar 08 01:30:50 2016, SREZIC wrote: Show quoted text
> I still see the problem with 1.2.1. Maybe the $^X has to go into the > first argument in the exec call, that is instead of > > eval { exec { $SBALANCE } $^X, $SBALANCE, @args; }; > > it should be > > eval { exec { $^X } $^X, $SBALANCE, @args; }; > > ? > > Also, I don't think the eval {} is doing anything here ... exec cannot > throw an exception (except if using "use autodie"). > > On 2016-03-07 18:25:30, PAYERLE wrote:
> > Thanks again for catching my bugs:) > > > > Should be fixed in 1.2.1 which just uploaded. Also fixes a hash > > order > > randomization bug. > > Will update ticket tomorrow as cannot see 1.2.1 yet. > > On Sat Mar 05 12:49:10 2016, SREZIC wrote:
> > > See http://www.cpantesters.org/cpan/report/e5770622-e2a6-11e5-8efc- > > > 839bfcd2507e for a sample fail report. The @INC array in the > > > failing > > > test lists paths like /usr/local/lib/perl5/5.20/mach which > > > indicates > > > that FreeBSD's system perl is used here, but not the perl used to > > > build and test the distribution. > > > > > > Probably $^X has to be used here (or a similar solution).
On Tue Mar 08 10:44:08 2016, PAYERLE wrote: Show quoted text
> You are correct about the $^X, I have just uploaded a 1.2.2 to fix. > > The eval probably is not needed for test code like this, but added it > for good form after banging my head for a while in a similar > construct. Actually for the 050_pod.t test which > I expected to be a no-brainer --- just wanted to verify that if you > run in Taint mode passing > any tainted data to the code aborts. Slurm::Sshare/Sacctmgr do a > similar fork and exec in > the child construct. exec can throw exceptions in Taint mode (e.g. > tainted PATH), and if you wrap a higher level function in eval{} and > the exec throws an exception, it gets caught in the higher level eval > in the child process, and code actually runs twice. A lot of head > banging trying to work that one out:) (I think I've actually learned > more about Perl in handling edge cases of the testing code than in > writing the main code:) > > > > On Tue Mar 08 01:30:50 2016, SREZIC wrote:
> > I still see the problem with 1.2.1. Maybe the $^X has to go into the > > first argument in the exec call, that is instead of > > > > eval { exec { $SBALANCE } $^X, $SBALANCE, @args; }; > > > > it should be > > > > eval { exec { $^X } $^X, $SBALANCE, @args; }; > > > > ? > > > > Also, I don't think the eval {} is doing anything here ... exec > > cannot > > throw an exception (except if using "use autodie"). > > > > On 2016-03-07 18:25:30, PAYERLE wrote:
> > > Thanks again for catching my bugs:) > > > > > > Should be fixed in 1.2.1 which just uploaded. Also fixes a hash > > > order > > > randomization bug. > > > Will update ticket tomorrow as cannot see 1.2.1 yet. > > > On Sat Mar 05 12:49:10 2016, SREZIC wrote:
> > > > See http://www.cpantesters.org/cpan/report/e5770622-e2a6-11e5- > > > > 8efc- > > > > 839bfcd2507e for a sample fail report. The @INC array in the > > > > failing > > > > test lists paths like /usr/local/lib/perl5/5.20/mach which > > > > indicates > > > > that FreeBSD's system perl is used here, but not the perl used to > > > > build and test the distribution. > > > > > > > > Probably $^X has to be used here (or a similar solution).