Commit 0662aa42 authored by Robert Ricci's avatar Robert Ricci

New defs file variable: DISABLE_EVENT_SCHED . If set to '1', prevents

tbswapin from starting an event scheduler for the experiment.

For use with the testsuite in 'full' mode.
parent 509c7b38
......@@ -840,6 +840,7 @@ fi
#
......@@ -1174,7 +1175,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1178: checking for a BSD compatible install" >&5
echo "configure:1179: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1479,6 +1480,7 @@ s%@TIMESTAMPS@%$TIMESTAMPS%g
s%@UNIFIED_BOSS_AND_OPS@%$UNIFIED_BOSS_AND_OPS%g
s%@DISABLE_NSE@%$DISABLE_NSE%g
s%@DISABLE_NAMED_SETUP@%$DISABLE_NAMED_SETUP%g
s%@DISABLE_EVENT_SCHED@%$DISABLE_EVENT_SCHED%g
s%@LEDA@%$LEDA%g
s%@ASSIGN@%$ASSIGN%g
s%@SSH_ARGS@%$SSH_ARGS%g
......
......@@ -42,6 +42,7 @@ AC_SUBST(TIMESTAMPS)
AC_SUBST(UNIFIED_BOSS_AND_OPS)
AC_SUBST(DISABLE_NSE)
AC_SUBST(DISABLE_NAMED_SETUP)
AC_SUBST(DISABLE_EVENT_SCHED)
#
# Defaults for for above variables.
......
......@@ -21,8 +21,9 @@ use English;
#
# Configure variables
#
my $TBROOT = "@prefix@";
my $TESTMODE = @TESTMODE@;
my $TBROOT = "@prefix@";
my $TESTMODE = @TESTMODE@;
my $DISABLE_EVENTS = "@DISABLE_EVENT_SCHED@";
# Untaint the path
$ENV{'PATH'} = "/usr/bin:$TBROOT/libexec:$TBROOT/libexec/ns2ir" .
......@@ -60,9 +61,11 @@ sub cleanup {
waitpid($os_setup_pid,0);
}
print "Stopping event system\n";
if (system("eventsys_control stop $pid $eid")) {
print STDERR "*** Failed to stop the event system.\n";
if (!$DISABLE_EVENTS) {
print "Stopping event system\n";
if (system("eventsys_control stop $pid $eid")) {
print STDERR "*** Failed to stop the event system.\n";
}
}
if ($cleanvlans) {
......@@ -244,14 +247,16 @@ TBDebugTimeStamp("os_setup finished");
# rebooted (os_setup is done). This only takes a moment (puts itself
# in the background), so its not enough of a delay to worry about.
#
print "Starting the event system.\n";
TBDebugTimeStamp("eventsys_control started");
if (system("eventsys_control start $pid $eid")) {
print STDERR "*** Failed to start the event system.\n";
cleanup;
exit(1);
if (!$DISABLE_EVENTS) {
print "Starting the event system.\n";
TBDebugTimeStamp("eventsys_control started");
if (system("eventsys_control start $pid $eid")) {
print STDERR "*** Failed to start the event system.\n";
cleanup;
exit(1);
}
TBDebugTimeStamp("eventsys_control finished");
}
TBDebugTimeStamp("eventsys_control finished");
# Accounting info.
TBSetExpSwapTime($pid, $eid);
......
......@@ -26,8 +26,9 @@ sub usage()
#
# Configure variables
#
my $TBROOT = "@prefix@";
my $TESTMODE = @TESTMODE@;
my $TBROOT = "@prefix@";
my $TESTMODE = @TESTMODE@;
my $DISABLE_EVNETS = "@DISABLE_EVENT_SCHED@";
# Untaint the path
$ENV{'PATH'} = "/usr/bin:$TBROOT/libexec:$TBROOT/libexec/ns2ir" .
......@@ -99,10 +100,12 @@ if (! SetExpState($pid, $eid, EXPTSTATE_SWAPPING)) {
}
if (! $TESTMODE) {
print "Stopping the event system.\n";
if (system("eventsys_control stop $pid $eid")) {
print STDERR "*** Failed to stop the event system.\n";
$errors = 1;
if (! $DISABLE_EVENTS) {
print "Stopping the event system.\n";
if (system("eventsys_control stop $pid $eid")) {
print STDERR "*** Failed to stop the event system.\n";
$errors = 1;
}
}
TBDebugTimeStamp("snmpit started");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment