ACIL FM
Dark
Refresh
Current DIR:
/usr/share/doc/perl-Test-Simple/t/Test2/behavior
/
usr
share
doc
perl-Test-Simple
t
Test2
behavior
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
disable_ipc_a.t
203 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_b.t
219 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_c.t
256 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_d.t
458 B
chmod
View
DL
Edit
Rename
Delete
err_var.t
177 B
chmod
View
DL
Edit
Rename
Delete
Formatter.t
1.64 MB
chmod
View
DL
Edit
Rename
Delete
init_croak.t
589 B
chmod
View
DL
Edit
Rename
Delete
intercept.t
1.09 MB
chmod
View
DL
Edit
Rename
Delete
ipc_wait_timeout.t
2.3 MB
chmod
View
DL
Edit
Rename
Delete
nested_context_exception.t
2.09 MB
chmod
View
DL
Edit
Rename
Delete
no_load_api.t
1.52 MB
chmod
View
DL
Edit
Rename
Delete
run_subtest_inherit.t
2.21 MB
chmod
View
DL
Edit
Rename
Delete
special_names.t
1.28 MB
chmod
View
DL
Edit
Rename
Delete
subtest_bailout.t
1.15 MB
chmod
View
DL
Edit
Rename
Delete
Subtest_buffer_formatter.t
2.62 MB
chmod
View
DL
Edit
Rename
Delete
Subtest_callback.t
906 B
chmod
View
DL
Edit
Rename
Delete
Subtest_events.t
441 B
chmod
View
DL
Edit
Rename
Delete
Subtest_plan.t
355 B
chmod
View
DL
Edit
Rename
Delete
Subtest_todo.t
932 B
chmod
View
DL
Edit
Rename
Delete
Taint.t
356 B
chmod
View
DL
Edit
Rename
Delete
trace_signature.t
1.47 MB
chmod
View
DL
Edit
Rename
Delete
uuid.t
3.33 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/share/doc/perl-Test-Simple/t/Test2/behavior/ipc_wait_timeout.t
use strict; use warnings; # The things done in this test can trigger a buggy return value on some # platforms. This prevents that. The harness should catch actual failures. If # no harness is active then we will NOT sanitize the exit value, false fails # are better than false passes. END { $? = 0 if $ENV{HARNESS_ACTIVE} } # Some platforms throw a sigpipe in this test, we can ignore it. BEGIN { $SIG{PIPE} = 'IGNORE' } BEGIN { local ($@, $?, $!); eval { require threads } } use Test2::Tools::Tiny; use Test2::Util qw/CAN_THREAD CAN_REALLY_FORK/; use Test2::IPC; use Test2::API qw/test2_ipc_set_timeout test2_ipc_get_timeout/; my $plan = 2; $plan += 2 if CAN_REALLY_FORK; $plan += 2 if CAN_THREAD && threads->can('is_joinable'); plan $plan; is(test2_ipc_get_timeout(), 30, "got default timeout"); test2_ipc_set_timeout(10); is(test2_ipc_get_timeout(), 10, "hanged the timeout"); if (CAN_REALLY_FORK) { note "Testing process waiting"; my ($ppiper, $ppipew); pipe($ppiper, $ppipew) or die "Could not create pipe for fork"; my $proc = fork(); die "Could not fork!" unless defined $proc; unless ($proc) { local $SIG{ALRM} = sub { die "PROCESS TIMEOUT" }; alarm 15; my $ignore = <$ppiper>; exit 0; } my $exit; my $warnings = warnings { $exit = Test2::API::Instance::_ipc_wait(1); }; is($exit, 255, "Exited 255"); like($warnings->[0], qr/Timeout waiting on child processes/, "Warned about timeout"); print $ppipew "end\n"; close($ppiper); close($ppipew); } if (CAN_THREAD) { note "Testing thread waiting"; my ($tpiper, $tpipew); pipe($tpiper, $tpipew) or die "Could not create pipe for threads"; my $thread = threads->create( sub { local $SIG{ALRM} = sub { die "THREAD TIMEOUT" }; alarm 15; my $ignore = <$tpiper>; } ); if ($thread->can('is_joinable')) { my $exit; my $warnings = warnings { $exit = Test2::API::Instance::_ipc_wait(1); }; is($exit, 255, "Exited 255"); like($warnings->[0], qr/Timeout waiting on child thread/, "Warned about timeout"); } else { note "threads.pm is too old for a thread joining timeout :-("; } print $tpipew "end\n"; close($tpiper); close($tpipew); }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply