Skip to content

Commit

Permalink
Tests with Proc::ProcessTable module needs size attribute
Browse files Browse the repository at this point in the history
Do needed check for size attribute at tests startup.

Fixes some tests failure on OpenBSD:

t/60leaks.t ............................. Can't access `size' field in class Proc::ProcessTable::Process at t/60leaks.t line 39.
t/60leaks.t ............................. Dubious, test returned 25 (wstat 6400, 0x1900)

t/rt86153-reconnect-fail-memory.t ....... Can't access `size' field in class Proc::ProcessTable::Process at t/rt86153-reconnect-fail-memory.t line 33.
t/rt86153-reconnect-fail-memory.t ....... Dubious, test returned 25 (wstat 6400, 0x1900)

See: perl5-dbi#120
  • Loading branch information
pali authored and bigio committed Jan 9, 2019
1 parent c73c965 commit e5a86e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/60leaks.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ if ($@) {
eval { require Storable };
$have_storable = $@ ? 0 : 1;

my $have_pt_size = grep { $_ eq 'size' } Proc::ProcessTable->new('cache_ttys' => $have_storable)->fields;
if (!$have_pt_size) {
plan skip_all => "module Proc::ProcessTable does not support size attribute on current platform\n";
}

my ($dbh, $sth);
$dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
{ RaiseError => 1, PrintError => 1, AutoCommit => 0 });
Expand Down
5 changes: 5 additions & 0 deletions t/rt86153-reconnect-fail-memory.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ if ($@) {
eval { require Storable };
$have_storable = $@ ? 0 : 1;

my $have_pt_size = grep { $_ eq 'size' } Proc::ProcessTable->new('cache_ttys' => $have_storable)->fields;
if (!$have_pt_size) {
plan skip_all => "module Proc::ProcessTable does not support size attribute on current platform\n";
}

plan tests => 3;

sub size {
Expand Down

0 comments on commit e5a86e3

Please sign in to comment.