Scripts using perl can incorrectly succeed when the script fails to run

Bug #1060388 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Won't Fix
Low
Unassigned

Bug Description

For info, please see the following test result:

https://certification.canonical.com/hardware/201209-11838/submission/HbYXLo5pYwnHW15

The system in question was tested, and two graphics tests that use a perl one-liner returned incorrect results.

grapnics/compiz_check failed while graphics/VESA_drivers_not_in_use returned a PASS, even though the perl bits actually failed to work. Both tests returned the following perl error:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "en_US:en",
 LC_ALL = (unset),
 LC_PAPER = "en_IN.UTF-8",
 LC_ADDRESS = "en_IN.UTF-8",
 LC_MONETARY = "en_IN.UTF-8",
 LC_NUMERIC = "en_IN.UTF-8",
 LC_TELEPHONE = "en_IN.UTF-8",
 LC_IDENTIFICATION = "en_IN.UTF-8",
 LC_MEASUREMENT = "en_IN.UTF-8",
 LC_TIME = "en_IN.UTF-8",
 LC_NAME = "en_IN.UTF-8",
 LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Revision history for this message
Jeff Lane  (bladernr) wrote :

These tests run fine using a stock install, but I have no idea what packages are missing that would cause perl to fail this way.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I'm not sure what exactly is up here either, I do know that these are just warning produced by perl and they don't affect the result. If we wanted we could set -we instead of just -e so that even warnings cause a failure, but as long as the central purpose of the test is judged to be passed, do we really care of warnings are produced? I'm going to confirm this because it would be good to get rid of the perl and use something else :)

Changed in checkbox:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jeff Lane  (bladernr) wrote :

The actual command is:

command:
 perl -e '$a=`/usr/lib/nux/unity_support_test -c -p`;$a=~s/\e\[[\d;]*m//g;print $a;exit($? ? 1:0)'

Since unity_support_test is encapsulated in perl, if the perl returns a non-0 exit code, the test will appear to have failed, even thouh unity_support_test is a pass.

As for why it's failing, it has to do with this being a wipro system and them using the indian locale, I think...

Zygmunt Krynicki (zyga)
affects: checkbox → plainbox-provider-checkbox
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'm marking this as WONT FIX but please reopen if this is actively hampering anyone's work. My goal is to limit the number of open bugs to get a better idea as to what is really important.

Remember that you can always escalate bugs by contacting us in #checkbox on freenode (or #cert-infra in the internal IRC) or by responding in bugs directly.

Changed in plainbox-provider-checkbox:
status: Confirmed → Won't Fix
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.