X-Git-Url: http://git.rot13.org/?p=bcm963xx.git;a=blobdiff_plain;f=userapps%2Fopensource%2Fnet-snmp%2Ftesting%2Ftests%2FT120proxyget;fp=userapps%2Fopensource%2Fnet-snmp%2Ftesting%2Ftests%2FT120proxyget;h=c9dd053ce446ba788d474078846dec4b36abf636;hp=0000000000000000000000000000000000000000;hb=9dffd9f7659a1b28265e0dc9497343eb3d108d02;hpb=e48c2529a5a7e7dbf1797bb6d1bf964bc03e78a7 diff --git a/userapps/opensource/net-snmp/testing/tests/T120proxyget b/userapps/opensource/net-snmp/testing/tests/T120proxyget new file mode 100644 index 00000000..c9dd053c --- /dev/null +++ b/userapps/opensource/net-snmp/testing/tests/T120proxyget @@ -0,0 +1,60 @@ +#!/bin/sh + +. ../eval_tools.sh + +HEADER Proxy GET support + +SKIPIFNOT USING_UCD_SNMP_PROXY_MODULE +SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE + +# +# Begin test +# + +# standard V3 configuration for initial user +. ./Sv3config +# config the proxy +CONFIGAGENT proxy -t 2 -r 1 -v 2c -c testcommunity udp:localhost:7676 system + +# Start the agent without initializing the system mib. +ORIG_AGENT_FLAGS="$AGENT_FLAGS" +AGENT_FLAGS="$ORIG_AGENT_FLAGS -I -system_mib -Dproxy" +STARTAGENT + +# test to see that the current agent doesn't support the system mib +#CAPTURE "snmpget -On -t 3 $SNMP_FLAGS -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0" + +#CHECK ".1.3.6.1.2.1.1.3.0 = No Such Object" + +#if test "$snmp_last_test_result" = 1; then + # test the proxy subagent by first running it... + + SNMP_SNMPD_PID_FILE_ORIG=$SNMP_SNMPD_PID_FILE + SNMP_SNMPD_LOG_FILE_ORIG=$SNMP_SNMPD_LOG_FILE + SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE.num2 + SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE.num2 + SNMP_CONFIG_FILE="$SNMP_TMPDIR/proxy.conf" + echo "rwcommunity testcommunity" >> $SNMP_CONFIG_FILE + AGENT_FLAGS=$ORIG_AGENT_FLAGS + ORIG_SNMP_SNMPD_PORT=$SNMP_SNMPD_PORT + SNMP_SNMPD_PORT="7676" + STARTAGENT + SNMP_SNMPD_PORT=$ORIG_SNMP_SNMPD_PORT + + # test to see that the agent now supports the system mib + CAPTURE "snmpget -On $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0" + + CHECK ".1.3.6.1.2.1.1.3.0 = Timeticks:" + + # stop the subagent + STOPAGENT + + SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE_ORIG + SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE_ORIG +#fi + +# stop the master agent +STOPAGENT + +# all done (whew) +FINISHED