diff options
Diffstat (limited to 'testing/fulltests/default/T114agentxagentxtrap_simple')
-rw-r--r-- | testing/fulltests/default/T114agentxagentxtrap_simple | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/fulltests/default/T114agentxagentxtrap_simple b/testing/fulltests/default/T114agentxagentxtrap_simple new file mode 100644 index 0000000..58475d0 --- /dev/null +++ b/testing/fulltests/default/T114agentxagentxtrap_simple @@ -0,0 +1,44 @@ +#!/bin/sh + +. ../support/simple_eval_tools.sh + +HEADER AgentX trap sending support using agentxtrap + +SKIPIFNOT USING_AGENTX_MASTER_MODULE +SKIPIFNOT NETSNMP_SECMOD_USM + +# +# Begin test +# + +# start the trap demon +CONFIGTRAPD authcommunity log public +STARTTRAPD + +# standard V3 configuration for initial user +. ./Sv3config +# configure the trap receiver. +CONFIGAGENT trap2sink ${SNMP_TRANSPORT_SPEC}:${SNMP_TEST_DEST}${SNMP_SNMPTRAPD_PORT} public + +# Start the agent +if [ "x$SNMP_TRANSPORT_SPEC" = "xunix" ];then +AGENTX_SERVER="-x $SNMP_TMPDIR/agentx_socket" +else +AGENTX_SERVER="-x tcp:${SNMP_TEST_DEST}${SNMP_AGENTX_PORT}" +fi +AGENT_FLAGS="$AGENT_FLAGS $AGENTX_SERVER" +STARTAGENT + +CAPTURE "agentxtrap $AGENTX_SERVER 0.0 0.0 s mostly_harmless" + +# stop the master agent +STOPAGENT + +# stop the trap demon +STOPTRAPD + +# Check that the trap was received +CHECKTRAPD "= STRING: \"*mostly_harmless\"*" + +# all done (whew) +FINISHED |