Browse Source

[3422] Corrected failing DHCPv4 server tests.

Marcin Siodelski 11 years ago
parent
commit
d69b393355

+ 5 - 5
src/bin/dhcp4/tests/dhcp4_reconfigure_test.sh

@@ -86,7 +86,7 @@ fi
 
 # Check if it is still running. It could have terminated (e.g. as a result
 # of configuration failure).
-get_pids
+get_pids ${BIN}
 if [ ${_GET_PIDS_NUM} -ne 1 ]; then
     printf "ERROR: expected one Kea process to be started. Found %d processes\
  started.\n" ${_GET_PIDS_NUM}
@@ -107,7 +107,7 @@ fi
 create_config "${CONFIG_INVALID}"
 
 # Try to reconfigure by sending SIGHUP
-send_signal 1
+send_signal 1 ${BIN}
 
 # The configuration should fail and the error message should be there.
 wait_for_message 10 "DHCP4_CONFIG_LOAD_FAIL" 1
@@ -126,7 +126,7 @@ elif [ ${_GET_RECONFIG_ERRORS} -ne 1 ]; then
 fi
 
 # Make sure the server is still operational.
-get_pids
+get_pids ${BIN}
 if [ ${_GET_PIDS_NUM} -ne 1 ]; then
     printf "ERROR: Kea process was killed when attempting reconfiguration.\n"
     clean_exit 1
@@ -136,7 +136,7 @@ fi
 create_config "${CONFIG}"
 
 # Reconfigure the server with SIGHUP.
-send_signal 1
+send_signal 1 ${BIN}
 
 # There should be two occurrences of the DHCP4_CONFIG_COMPLETE messages.
 # Wait for it up to 10s.
@@ -153,7 +153,7 @@ else
 fi
 
 # Make sure the server is still operational.
-get_pids
+get_pids ${BIN}
 if [ ${_GET_PIDS_NUM} -ne 1 ]; then
     printf "ERROR: Kea process was killed when attempting reconfiguration.\n"
     clean_exit 1

+ 3 - 3
src/bin/dhcp4/tests/dhcp4_shutdown_test.sh

@@ -72,7 +72,7 @@ fi
 
 # Check if it is still running. It could have terminated (e.g. as a result
 # of configuration failure).
-get_pids
+get_pids ${BIN}
 if [ ${_GET_PIDS_NUM} -ne 1 ]; then
     printf "ERROR: expected one Kea process to be started. Found %d processes\
  started.\n" ${_GET_PIDS_NUM}
@@ -90,7 +90,7 @@ else
 fi
 
 # Send signal to Kea (SIGTERM, SIGINT etc.)
-send_signal ${SIG_NUM}
+send_signal ${SIG_NUM} ${BIN}
 
 # Wait up to 10s for the server's graceful shutdown. The graceful shut down
 # should be recorded in the log file with the appropriate message.
@@ -101,7 +101,7 @@ if [ ${_WAIT_FOR_MESSAGE} -eq 0 ]; then
 fi
 
 # Server should have shut down.
-get_pids
+get_pids ${BIN}
 if [ ${_GET_PIDS_NUM} -ne 0 ]; then
     printf "ERROR: Kea did not shut down after receiving signal.\n"\
  ${_GET_PIDS_NUM}