mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 02:44:58 +00:00
Handle slurp_file error specifically. Fix Daemon.t test plans.
This commit is contained in:
@@ -9,7 +9,7 @@ BEGIN {
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 22;
|
||||
use Test::More;
|
||||
use Time::HiRes qw(sleep);
|
||||
use File::Temp qw( tempfile );
|
||||
use Daemon;
|
||||
@@ -106,8 +106,8 @@ unlike(
|
||||
# ##########################################################################
|
||||
rm_tmp_files();
|
||||
SKIP: {
|
||||
skip 'No /proc', 1 unless -d '/proc';
|
||||
skip 'No fd in /proc', 1 unless -l "/proc/$PID/0" || -l "/proc/$PID/fd/0";
|
||||
skip 'No /proc', 2 unless -d '/proc';
|
||||
skip 'No fd in /proc', 2 unless -l "/proc/$PID/0" || -l "/proc/$PID/fd/0";
|
||||
|
||||
system("$cmd 5 --daemonize --pid $pid_file --log $log_file");
|
||||
PerconaTest::wait_for_files($pid_file);
|
||||
@@ -253,11 +253,11 @@ ok(
|
||||
'Dies if PID file already exists for non-daemon'
|
||||
);
|
||||
|
||||
`rm -rf /tmp/d2.pid`;
|
||||
diag(`rm -rf /tmp/d2.pid >/dev/null`);
|
||||
}
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
rm_tmp_files();
|
||||
exit;
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user