diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-11-02 17:44:50 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-11-02 17:44:50 +0000 |
commit | 82444cfbcadfc2c2276b74535b6b448a9dfd06a7 (patch) | |
tree | 6aafaf59a1d116da46b08e236edbf9d89085c2e9 /regress/usr.sbin/relayd/Relayd.pm | |
parent | 9e04ae7d19c9da22299605cca4445d8c782121bd (diff) |
Ktrace the relayd during the test if the KTRACE environment variable
is set.
Diffstat (limited to 'regress/usr.sbin/relayd/Relayd.pm')
-rw-r--r-- | regress/usr.sbin/relayd/Relayd.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/regress/usr.sbin/relayd/Relayd.pm b/regress/usr.sbin/relayd/Relayd.pm index 405cf40cadc..a0dae1a935b 100644 --- a/regress/usr.sbin/relayd/Relayd.pm +++ b/regress/usr.sbin/relayd/Relayd.pm @@ -1,6 +1,6 @@ -# $OpenBSD: Relayd.pm,v 1.2 2011/09/02 10:45:36 bluhm Exp $ +# $OpenBSD: Relayd.pm,v 1.3 2012/11/02 17:44:49 bluhm Exp $ -# Copyright (c) 2010,2011 Alexander Bluhm <bluhm@openbsd.org> +# Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -100,8 +100,10 @@ sub child { my $self = shift; print STDERR $self->{up}, "\n"; my @sudo = $ENV{SUDO} || (); + my @ktrace = $ENV{KTRACE} ? qw(ktrace -i) : (); my $relayd = $ENV{RELAYD} || "relayd"; - my @cmd = (@sudo, $relayd, '-dvv', '-f', $self->{conffile}); + my @cmd = (@sudo, @ktrace, $relayd, '-dvv', '-f', $self->{conffile}); + print STDERR "execute: @cmd\n"; exec @cmd; die "Exec @cmd failed: $!"; } |