Re: Building on RH 8.0 using UML

[email protected] (Mike Stok)
Newsgroups perl.daily-build
Message-ID <[email protected]>
On Mon, 24 Mar 2003, Robert Spier wrote:

> > > > I tried a test run of 5.8.x on it and all combinations failed  on 
> > > > op/alarm.t.
> > > This is not too surprising.  UML has to do some weird things with
> > > timers to function.  Can you isolate which test is failing?
> > Yes, one of the runs said:
> >  Tests start here:
> > PERLIO = stdio  # Failed at op/alarm.t line 31
> > #      got ''
> > # expected 'ALARM!
> > # '
> > # Failed at op/alarm.t line 32
> 
> What happens if you run op/alarm.t manually?
> 
> ./perl -Ilib t/op/alarm.t

[mike@rh8-uml perl-5.8.x]$ ./perl -Ilib t/op/alarm.t
1..4
not ok 1 - alarm w/$SIG{ALRM} vs inf loop
# Failed at t/op/alarm.t line 31
#      got ''
# expected 'ALARM!
# '
not ok 2 -    right time
# Failed at t/op/alarm.t line 32
ok 3 - alarm w/$SIG{ALRM} vs system()
ok 4 -    right time (waited 3 secs for 3-sec alarm)

 
> The test is doing a busy wait, 1 while (time - $start_time < 6), and I
> guess it's not actually waiting.

It is actually waiting, I added a few debugging prints and it says

my $start_time = time;
print "start at $start_time\n";
eval {
    local $SIG{ALRM} = sub { die "ALARM!\n" };
    alarm 3;

    # perlfunc recommends against using sleep in combination with alarm.
    1 while (time - $start_time < 6);
};
print "out of eval at ", scalar(time), "\n";
alarm 0;
my $diff = time - $start_time;
print "diff is $diff\n";

(good enough for a rough indicator...) and I get 

start at 1048601190
out of eval at 1048601196
diff is 6

So it looks like the alarm isn't killing the eval before the while 
terminates.

I'll try running the smoke test on my "real" RH 8 now that the UML one has 
stopped...

Mike 

-- 
[email protected]                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       | GPG PGP Key      1024D/059913DA 
[email protected]                  | Fingerprint      0570 71CD 6790 7C28 3D60
http://www.exegenix.com/           |                  75D2 9EC4 C1C0 0599 13DA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.