The default bug view has changed. See this FAQ.

Fix a test exit status bug in runtests.pl when there is no timeout for tests.

RESOLVED FIXED in 4.8.3

Status

NSPR
NSPR
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
Created attachment 416274 [details] [diff] [review]
Proposed patch

Christophe,

One of the changes you made for bug 462178 in rev. 1.3 of
mozilla/nsprpub/pr/tests/runtests.pl is:

 sub ux_wait_timeout {
 # parameters:
 $lpid = shift;     # child process id
 $ltimeout = shift; # timeout

     if ($ltimeout == 0) {
         # No timeout: use blocking wait
         $ret = waitpid($lpid,0);
         # Exit and don't kill
         $lstatus = $? % 256;
         $ltimeout = -1;
     } else {
         while ($ltimeout > 0) {
             # Check status of child using non blocking wait
             $ret = waitpid($lpid, WNOHANG);
             if ($ret == 0) {
                 # Child still running
     #           print "Time left=$ltimeout\n";
                 sleep 1;
                 $ltimeout--;
             } else {
                 # Child has ended
-                $lstatus = $? % 256;
+                $lstatus = $?;
                 # Exit the wait loop and don't kill
                 $ltimeout = -1;
             }
         }
     }

We need the same change for the if ($ltimeout == 0) case.
Please review the attached patch.  Thanks!
Attachment #416274 - Flags: review?(christophe.ravel.bugs)

Comment 1

7 years ago
Comment on attachment 416274 [details] [diff] [review]
Proposed patch

r=christophe
Attachment #416274 - Flags: review?(christophe.ravel.bugs) → review+
(Assignee)

Comment 2

7 years ago
I checked in the patch on the NSPR trunk (NSPR 4.8.3).

Checking in runtests.pl;
/cvsroot/mozilla/nsprpub/pr/tests/runtests.pl,v  <--  runtests.pl
new revision: 1.7; previous revision: 1.6
done
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.8.3
You need to log in before you can comment on or make changes to this bug.