summaryrefslogtreecommitdiff
path: root/testing/fulltests/read-only/T0141snmpv2csetfail_simple
diff options
context:
space:
mode:
authorHideki Yamane <henrich@debian.org>2014-03-30 19:38:48 +0900
committerHideki Yamane <henrich@debian.org>2014-03-30 19:38:48 +0900
commit7769a9595c3da9a35f31b42451b1f6c3ed4004fa (patch)
tree009bf8fd68af6bb1129e07dd8c1ed205010d81f8 /testing/fulltests/read-only/T0141snmpv2csetfail_simple
parent2e7891b0311204e0ecd5dc4a4334df01f3a6a1b4 (diff)
downloadpkg-net-snmp-7769a9595c3da9a35f31b42451b1f6c3ed4004fa.tar.gz
Imported Upstream version 5.7.2~dfsg
Diffstat (limited to 'testing/fulltests/read-only/T0141snmpv2csetfail_simple')
-rw-r--r--testing/fulltests/read-only/T0141snmpv2csetfail_simple32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/fulltests/read-only/T0141snmpv2csetfail_simple b/testing/fulltests/read-only/T0141snmpv2csetfail_simple
new file mode 100644
index 0000000..9705f49
--- /dev/null
+++ b/testing/fulltests/read-only/T0141snmpv2csetfail_simple
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+. ../support/simple_eval_tools.sh
+
+HEADER SNMPv2c set failure to system.sysContact.0
+
+SKIPIFNOT NETSNMP_NO_WRITE_SUPPORT
+SKIPIF NETSNMP_DISABLE_SNMPV2C
+SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE
+
+#
+# Begin test
+#
+
+# standard V2C configuration: testcomunnity
+snmp_write_access='all'
+(cd ../default ; . ./Sv2cconfig)
+STARTAGENT
+
+CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0"
+
+CHECK ".1.3.6.1.2.1.1.4.0 = STRING:"
+
+CAPTURE "snmpset -r 0 -t 1 -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0 s foobartestingbaz"
+
+CHECK "Timeout: No Response"
+
+STOPAGENT
+
+CHECKAGENT 'Bad PDU type received'
+
+FINISHED