From c29afb189edb5b54d648e9ab72122da2b1c5e81d Mon Sep 17 00:00:00 2001 From: martijn Date: Sat, 1 May 2021 16:55:14 +0000 Subject: [PATCH] Expand the regress test quite a bit to make sure no new regressions are introduced by the previous libagentx commit. There's a few of the new tests failing, mark those as such. --- regress/lib/libagentx/Makefile | 1072 +++++++++++++++++++++++++++++++- regress/lib/libagentx/main.c | 50 +- regress/lib/libagentx/walk.out | 1 - 3 files changed, 1102 insertions(+), 21 deletions(-) diff --git a/regress/lib/libagentx/Makefile b/regress/lib/libagentx/Makefile index c5f859ce73f..2c5749f49e9 100644 --- a/regress/lib/libagentx/Makefile +++ b/regress/lib/libagentx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2021/04/20 11:17:52 martijn Exp $ +# $OpenBSD: Makefile,v 1.7 2021/05/01 16:55:14 martijn Exp $ .if ! exists(/usr/local/sbin/snmpd) regress: @@ -13,24 +13,27 @@ NOMAN= yes LDADD= -lagentx -levent REGRESS_SETUP_ONCE= start -REGRESS_TARGETS= run-regress-walk +REGRESS_TARGETS= REGRESS_CLEANUP= stop CLEANFILES= SNMPD_CMD= /usr/local/sbin/snmpd -r -C -c snmpd.conf -Le -UID!!= id -u +UID!!= id -u .if ${UID} == 0 SNMPD_CMD+= -u _netsnmp .endif -CLEANFILES+= snmpd.conf +NOOBJECT= No Such Object available on this agent at this OID +NOINSTANCE= No Such Instance currently exists at this OID + +CLEANFILES+= snmpd.conf snmpd.conf: Makefile @printf "agentaddress udp:127.0.0.1:6161\n" > snmpd.conf @printf "rwcommunity public\n" >> snmpd.conf @printf "master agentx\n" >> snmpd.conf @printf "agentXSocket agentx.sock\n" >> snmpd.conf -CLEANFILES+= agentx.sock +CLEANFILES+= agentx.sock start: stop snmpd.conf agentx ${SNMPD_CMD} # XXX Race in net-snmpd, socket exists before data is available. @@ -40,10 +43,1061 @@ start: stop snmpd.conf agentx stop: -pkill -xf "${SNMPD_CMD}" -CLEANFILES+= walk.run.out walk.run.err -run-regress-walk: - snmp walk 127.0.0.1:6161 openbsd > walk.run.out 2> walk.run.err || true - diff -up ${.CURDIR}/walk.err walk.run.err +REGRESS_EXPECTED_FAILURES= getnext_indexoid_0 getnext_indexoid_1 +REGRESS_EXPECTED_FAILURES+= getnext_indexoid_1_3_6_1_4_1_30155_100_0 +REGRESS_EXPECTED_FAILURES+= getnext_indexoid_1_3_6_1_4_1_30155_100_0_tail +REGRESS_EXPECTED_FAILURES+= getnext_indexoid_1_3_6_1_4_1_30155_100_1_tail +REGRESS_EXPECTED_FAILURES+= getnext_indexoid_1_3_6_1_4_1_30155_100_4294967294 + +REGRESS_TARGETS+= walk +CLEANFILES+= walk.run.out walk.run.err +walk: + snmp walk 127.0.0.1:6161 openbsd.100 > walk.run.out 2> walk.run.err || true diff -up ${.CURDIR}/walk.out walk.run.out + diff -up ${.CURDIR}/walk.err walk.run.err + +REGRESS_TARGETS+= get_nosuchobject +get_nosuchobject: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.0)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_nosuchobject_0 +get_nosuchobject_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.0.0)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_nosuchobject_tail +get_nosuchobject_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.0.0.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_nosuchobject_index +get_nosuchobject_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.0.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_nosuchobject_parent +get_nosuchobject_parent: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_scalarinteger +get_scalarinteger: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarinteger_0 +get_scalarinteger_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.1.0)" = "INTEGER: 1" ] + +REGRESS_TARGETS+= get_scalarinteger_tail +get_scalarinteger_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.1.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarinteger_index +get_scalarinteger_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarstring +get_scalarstring: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.2)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarstring_0 +get_scalarstring_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.2.0)" = "STRING: scalar-string" ] + +REGRESS_TARGETS+= get_scalarstring_tail +get_scalarstring_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.2.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarstring_index +get_scalarstring_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.2.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaroid +get_scalaroid: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.4)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaroid_0 +get_scalaroid_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.4.0)" = "OID: openBSD" ] + +REGRESS_TARGETS+= get_scalaroid_tail +get_scalaroid_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.4.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaroid_index +get_scalaroid_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.4.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaripaddress +get_scalaripaddress: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.5)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaripaddress_0 +get_scalaripaddress_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.5.0)" = "IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= get_scalaripaddress_0 +get_scalaripaddress_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.5.0)" = "IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= get_scalaripaddress_tail +get_scalaripaddress_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.5.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaripaddress_index +get_scalaripaddress_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.5.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter32 +get_scalarcounter32: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.6)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter32_0 +get_scalarcounter32_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.6.0)" = "Counter32: 1" ] + +REGRESS_TARGETS+= get_scalarcounter32_tail +get_scalarcounter32_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.6.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter32_index +get_scalarcounter32_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.6.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalargauge32 +get_scalargauge32: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.7)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalargauge32_0 +get_scalargauge32_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.7.0)" = "Gauge32: 1" ] + +REGRESS_TARGETS+= get_scalargauge32_tail +get_scalargauge32_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.7.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalargauge32_index +get_scalargauge32_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.7.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalartimeticks +get_scalartimeticks: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.8)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalartimeticks +get_scalartimeticks: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.8)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalartimeticks_0 +get_scalartimeticks_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.8.0)" = "Timeticks: (1) 0:00:00.01" ] + +REGRESS_TARGETS+= get_scalartimeticks_tail +get_scalartimeticks_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.8.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalartimeticks_index +get_scalartimeticks_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.8.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaropaque +get_scalaropaque: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.9)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaropaque_0 +get_scalaropaque_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.9.0)" = "Opaque: 6382179" ] + +REGRESS_TARGETS+= get_scalaropaque_tail +get_scalaropaque_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.9.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalaropaque_index +get_scalaropaque_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.9.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter64 +get_scalarcounter64: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.10)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter64_0 +get_scalarcounter64_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.10.0)" = "Counter64: 1" ] + +REGRESS_TARGETS+= get_scalarcounter64_tail +get_scalarcounter64_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.10.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_scalarcounter64_index +get_scalarcounter64_index: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.10.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint_table +get_indexint_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexint_entry +get_indexint_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexint_object +get_indexint_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint_0 +get_indexint_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint_1 +get_indexint_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1.1)" = "INTEGER: 1" ] + +REGRESS_TARGETS+= get_indexint_1_tail +get_indexint_1_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint_16 +get_indexint_16: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1.16)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint_16_tail +get_indexint_16_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.11.1.1.16.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_table +get_indexint2_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexint2_entry +get_indexint2_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexint2_object +get_indexint2_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_0 +get_indexint2_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_0_0 +get_indexint2_0_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.0.0)" = "INTEGER: 0" ] + +REGRESS_TARGETS+= get_indexint2_0_0_tail +get_indexint2_0_0_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.0.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_0_1 +get_indexint2_0_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.0.1)" = "INTEGER: 1" ] + +REGRESS_TARGETS+= get_indexint2_0_2 +get_indexint2_0_2: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.0.2)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_1_0 +get_indexint2_1_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.1.0)" = "INTEGER: 2" ] + +REGRESS_TARGETS+= get_indexint2_1_0_tail +get_indexint2_1_0_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.1.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexint2_8_1 +get_indexint2_8_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.8.1)" = "INTEGER: 17" ] + +REGRESS_TARGETS+= get_indexint2_9_0 +get_indexint2_9_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.12.1.1.9.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_table +get_indexstr_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexstr_entry +get_indexstr_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexstr_object +get_indexstr_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_0 +get_indexstr_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_1 +get_indexstr_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_1_96 +get_indexstr_1_96: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.1.96)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_1_97 +get_indexstr_1_97: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.1.97)" = "STRING: a" ] + +REGRESS_TARGETS+= get_indexstr_1_97_tail +get_indexstr_1_97_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.1.97.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr_2_97 +get_indexstr_2_97: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.13.1.1.2.97)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximplstr_table +get_indeximplstr_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indeximplstr_entry +get_indeximplstr_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indeximplstr_object +get_indeximplstr_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximplstr_96 +get_indeximplstr_96: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1.1.96)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximplstr_97 +get_indeximplstr_97: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1.1.97)" = "STRING: a" ] + +REGRESS_TARGETS+= get_indeximplstr_97_97 +get_indeximplstr_97_97: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1.1.97.97)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximplstr_100 +get_indeximplstr_100: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.14.1.1.100)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_table +get_indexstr2_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexstr2_entry +get_indexstr2_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexstr2_object +get_indexstr2_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_1_97 +get_indexstr2_1_97_1_97: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.97)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_1_98 +get_indexstr2_1_97_1_98: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.98)" = "STRING: a - b" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_1_98_tail +get_indexstr2_1_97_1_98_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.98.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_2_98 +get_indexstr2_1_97_2_98: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.98)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_2_98_98 +get_indexstr2_1_97_2_98_98: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.98.98)" = "STRING: a - bb" ] + +REGRESS_TARGETS+= get_indexstr2_1_97_2_98_98_tail +get_indexstr2_1_97_2_98_98_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.98.98.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_99_2_98_98 +get_indexstr2_1_99_2_98_98: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.99.2.98.98)" = "STRING: c - bb" ] + +REGRESS_TARGETS+= get_indexstr2_1_99_2_98_98_tail +get_indexstr2_1_99_2_98_98_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.99.2.98.98.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_100_2_98_98 +get_indexstr2_1_100_2_98_98: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.100.2.98.98)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexstr2_1_99_2_98_99 +get_indexstr2_1_99_2_98_99: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.15.1.1.1.99.2.98.99)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_table +get_indeximploid_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indeximploid_entry +get_indeximploid_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indeximploid_object +get_indeximploid_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_1 +get_indeximploid_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd +get_indeximploid_openbsd: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_1 +get_indeximploid_openbsd_100_1: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.1)" = "OID: openBSD.100.1" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_1_tail +get_indeximploid_openbsd_100_1_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_1_tail +get_indeximploid_openbsd_100_1_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_20_1_2 +get_indeximploid_openbsd_100_20_1_2: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.20.1.2)" = "OID: openBSD.100.20.1.2" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_20_1_2_tail +get_indeximploid_openbsd_100_20_1_2_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.20.1.2.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_4294967294 +get_indeximploid_openbsd_100_4294967294: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.4294967294)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indeximploid_openbsd_100_4294967296 +get_indeximploid_openbsd_100_4294967296: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.4294967294)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_table +get_indexipaddress_table: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexipaddress_entry +get_indexipaddress_entry: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1)" = "${NOOBJECT}" ] + +REGRESS_TARGETS+= get_indexipaddress_object +get_indexipaddress_object: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_10 +get_indexipaddress_10: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.10)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_10_0 +get_indexipaddress_10_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.10.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_10_0_0 +get_indexipaddress_10_0_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_10_0_0_0 +get_indexipaddress_10_0_0_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0.0)" = "IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= get_indexipaddress_10_0_0_0_tail +get_indexipaddress_10_0_0_0_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_192_168_0_0 +get_indexipaddress_192_168_0_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.192.168.0.0)" = "IpAddress: 192.168.0.0" ] + +REGRESS_TARGETS+= get_indexipaddress_192_168_0_0_tail +get_indexipaddress_192_168_0_0_tail: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.192.168.0.0.1)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= get_indexipaddress_193_168_0_0 +get_indexipaddress_193_168_0_0: + [ "$$(snmp get -Ov 127.0.0.1:6161 openbsd.100.17.1.1.193.168.0.0)" = "${NOINSTANCE}" ] + +REGRESS_TARGETS+= getnext_region +getnext_region: + [ "$$(snmp getnext -Ov 127.0.0.1:6161 openbsd.100)" = "INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_region +getnext_region: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100)" = "openBSD.100.1.0 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_scalarinteger +getnext_scalarinteger: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.1)" = "openBSD.100.1.0 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_scalarinteger_0 +getnext_scalarinteger_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.1.0)" = "openBSD.100.2.0 = STRING: scalar-string" ] + +REGRESS_TARGETS+= getnext_scalarinteger_0_tail +getnext_scalarinteger_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.1.0.1)" = "openBSD.100.2.0 = STRING: scalar-string" ] + +REGRESS_TARGETS+= getnext_scalarinteger_index +getnext_scalarinteger_index: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.1.1)" = "openBSD.100.2.0 = STRING: scalar-string" ] + +REGRESS_TARGETS+= getnext_scalarstring +getnext_scalarstring: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.2)" = "openBSD.100.2.0 = STRING: scalar-string" ] + +REGRESS_TARGETS+= getnext_scalarstring_0 +getnext_scalarstring_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.2.0)" = "openBSD.100.4.0 = OID: openBSD" ] + +REGRESS_TARGETS+= getnext_scalarstring_0_tail +getnext_scalarstring_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.2.0.1)" = "openBSD.100.4.0 = OID: openBSD" ] + +REGRESS_TARGETS+= getnext_scalarstring_index +getnext_scalarstring_index: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.2.1)" = "openBSD.100.4.0 = OID: openBSD" ] + +REGRESS_TARGETS+= getnext_gap +getnext_gap: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.3)" = "openBSD.100.4.0 = OID: openBSD" ] + +REGRESS_TARGETS+= getnext_scalaroid +getnext_scalaroid: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.4)" = "openBSD.100.4.0 = OID: openBSD" ] + +REGRESS_TARGETS+= getnext_scalaroid_0 +getnext_scalaroid_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.4.0)" = "openBSD.100.5.0 = IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= getnext_scalarcounter64_0 +getnext_scalarcounter64_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.10.0)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_table +getnext_indexint_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_entry +getnext_indexint_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_object +getnext_indexint_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_object_0 +getnext_indexint_object_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.0)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_object_0_tail +getnext_indexint_object_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.0.1)" = "openBSD.100.11.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint_object_1 +getnext_indexint_object_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.1)" = "openBSD.100.11.1.1.2 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint_object_1_tail +getnext_indexint_object_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.1.1)" = "openBSD.100.11.1.1.2 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint_object_15 +getnext_indexint_object_15: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.15)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint_object_15_tail +getnext_indexint_object_15_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.11.1.1.15.1)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint2_table +getnext_indexint2_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint2_entry +getnext_indexint2_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint2_object +getnext_indexint2_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint2_0 +getnext_indexint2_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0)" = "openBSD.100.12.1.1.0.0 = INTEGER: 0" ] + +REGRESS_TARGETS+= getnext_indexint2_0_0 +getnext_indexint2_0_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.0)" = "openBSD.100.12.1.1.0.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint2_0_0_tail +getnext_indexint2_0_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.0.1)" = "openBSD.100.12.1.1.0.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexint2_0_1 +getnext_indexint2_0_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.1)" = "openBSD.100.12.1.1.1.0 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint2_0_1_tail +getnext_indexint2_0_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.1.1)" = "openBSD.100.12.1.1.1.0 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint2_0_2 +getnext_indexint2_0_2: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.2)" = "openBSD.100.12.1.1.1.0 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint2_0_2_tail +getnext_indexint2_0_2_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.0.2.1)" = "openBSD.100.12.1.1.1.0 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint2_1 +getnext_indexint2_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.1)" = "openBSD.100.12.1.1.1.0 = INTEGER: 2" ] + +REGRESS_TARGETS+= getnext_indexint2_1_0 +getnext_indexint2_1_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.1.0)" = "openBSD.100.12.1.1.1.1 = INTEGER: 3" ] + +REGRESS_TARGETS+= getnext_indexint2_1_0_tail +getnext_indexint2_1_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.1.0.1)" = "openBSD.100.12.1.1.1.1 = INTEGER: 3" ] + +REGRESS_TARGETS+= getnext_indexint2_8_1 +getnext_indexint2_8_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.8.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexint2_8_1_tail +getnext_indexint2_8_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.8.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexint2_9 +getnext_indexint2_9: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.12.1.1.9)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_table +getnext_indexstr_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_entry +getnext_indexstr_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_object +getnext_indexstr_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_object +getnext_indexstr_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_0 +getnext_indexstr_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.0)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1 +getnext_indexstr_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_1 +getnext_indexstr_1_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_1_tail +getnext_indexstr_1_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.1.1)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_96 +getnext_indexstr_1_96: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.96)" = "openBSD.100.13.1.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_97 +getnext_indexstr_1_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.97)" = "openBSD.100.13.1.1.1.98 = STRING: b" ] + +REGRESS_TARGETS+= getnext_indexstr_1_97_tail +getnext_indexstr_1_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.97.1)" = "openBSD.100.13.1.1.1.98 = STRING: b" ] + +REGRESS_TARGETS+= getnext_indexstr_1_99 +getnext_indexstr_1_99: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.99)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_99_tail +getnext_indexstr_1_99_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.99.1)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_1_999 +getnext_indexstr_1_999: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.1.999)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_2 +getnext_indexstr_2: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.2)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indexstr_999 +getnext_indexstr_999: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.13.1.1.999)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_table +getnext_indeximplstr_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_entry +getnext_indeximplstr_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_object +getnext_indeximplstr_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_0 +getnext_indeximplstr_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.0)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_0_tail +getnext_indeximplstr_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.0.1)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_96 +getnext_indeximplstr_96: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.96)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_96_tail +getnext_indeximplstr_96_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.96.1)" = "openBSD.100.14.1.1.97 = STRING: a" ] + +REGRESS_TARGETS+= getnext_indeximplstr_97 +getnext_indeximplstr_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.97)" = "openBSD.100.14.1.1.98 = STRING: b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_97_tail +getnext_indeximplstr_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.97.1)" = "openBSD.100.14.1.1.98 = STRING: b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_97_tail +getnext_indeximplstr_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.97.1)" = "openBSD.100.14.1.1.98 = STRING: b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_99 +getnext_indeximplstr_99: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.99)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_99_tail +getnext_indeximplstr_99_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.99.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_100 +getnext_indeximplstr_100: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.100)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_999 +getnext_indeximplstr_999: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.999)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indeximplstr_999 +getnext_indeximplstr_999: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.14.1.1.999)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_table +getnext_indexstr2_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_entry +getnext_indexstr2_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_object +getnext_indexstr2_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_0 +getnext_indexstr2_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.0)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1 +getnext_indexstr2_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_1 +getnext_indexstr2_1_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_96 +getnext_indexstr2_1_96: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.96)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97 +getnext_indexstr2_1_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_0 +getnext_indexstr2_1_97_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.0)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1 +getnext_indexstr2_1_97_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_1 +getnext_indexstr2_1_97_1_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_1_tail +getnext_indexstr2_1_97_1_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.1.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_97 +getnext_indexstr2_1_97_1_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.97)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_97_tail +getnext_indexstr2_1_97_1_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.97.1)" = "openBSD.100.15.1.1.1.97.1.98 = STRING: a - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_98 +getnext_indexstr2_1_97_1_98: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.98)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_98_1 +getnext_indexstr2_1_97_1_98_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.98.1)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_1_98_1 +getnext_indexstr2_1_97_1_98_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.1.98.1)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2 +getnext_indexstr2_1_97_2: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2 +getnext_indexstr2_1_97_2: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_1 +getnext_indexstr2_1_97_2_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.1)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_1_1 +getnext_indexstr2_1_97_2_1_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.1.1)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_1_1_tail +getnext_indexstr2_1_97_2_1_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.1.1.1)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_97 +getnext_indexstr2_1_97_2_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.97)" = "openBSD.100.15.1.1.1.97.2.97.97 = STRING: a - aa" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_97_97 +getnext_indexstr2_1_97_2_97_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.97.97)" = "openBSD.100.15.1.1.1.97.2.98.98 = STRING: a - bb" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_97_97_tail +getnext_indexstr2_1_97_2_97_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.97.97.1)" = "openBSD.100.15.1.1.1.97.2.98.98 = STRING: a - bb" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_97_98 +getnext_indexstr2_1_97_2_97_98: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.97.98)" = "openBSD.100.15.1.1.1.97.2.98.98 = STRING: a - bb" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_98_97 +getnext_indexstr2_1_97_2_98_97: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.98.97)" = "openBSD.100.15.1.1.1.97.2.98.98 = STRING: a - bb" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_2_98_97_tail +getnext_indexstr2_1_97_2_98_97_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.2.98.97.1)" = "openBSD.100.15.1.1.1.97.2.98.98 = STRING: a - bb" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_3 +getnext_indexstr2_1_97_3: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.3)" = "openBSD.100.15.1.1.1.98.1.98 = STRING: b - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_3 +getnext_indexstr2_1_97_3: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.3)" = "openBSD.100.15.1.1.1.98.1.98 = STRING: b - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_97_3 +getnext_indexstr2_1_97_3: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.97.3)" = "openBSD.100.15.1.1.1.98.1.98 = STRING: b - b" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_99_2_98_98 +getnext_indexstr2_1_99_2_98_98: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.99.2.98.98)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexstr2_1_99_2_98_98 +getnext_indexstr2_1_99_2_98_98: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.15.1.1.1.99.2.98.98)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_table +getnext_indexoid_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_entry +getnext_indexoid_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_object +getnext_indexoid_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_0 +getnext_indexoid_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.0)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_1 +getnext_indexoid_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_0 +getnext_indexoid_1_3_6_1_4_1_30155_100_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.0)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_0_tail +getnext_indexoid_1_3_6_1_4_1_30155_100_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.0.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.1 = OID: openBSD.100.1" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_1 +getnext_indexoid_1_3_6_1_4_1_30155_100_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.2 = OID: openBSD.100.2" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_1_tail +getnext_indexoid_1_3_6_1_4_1_30155_100_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.1.1)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.2 = OID: openBSD.100.2" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_4294967294 +getnext_indexoid_1_3_6_1_4_1_30155_100_4294967294: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.4294967294)" = "openBSD.100.16.1.1.1.3.6.1.4.1.30155.100.4294967295 = OID: openBSD.100.4294967295" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_4294967295 +getnext_indexoid_1_3_6_1_4_1_30155_100_4294967295: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.4294967295)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexoid_1_3_6_1_4_1_30155_100_4294967295_tail +getnext_indexoid_1_3_6_1_4_1_30155_100_4294967295_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.16.1.1.1.3.6.1.4.1.30155.100.4294967295.1)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_table +getnext_indexipaddress_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_entry +getnext_indexipaddress_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_object +getnext_indexipaddress_object: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_0 +getnext_indexipaddress_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.0)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10 +getnext_indexipaddress_10: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_0 +getnext_indexipaddress_10_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.0)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_0_0 +getnext_indexipaddress_10_0_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0)" = "openBSD.100.17.1.1.10.0.0.0 = IpAddress: 10.0.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_0_0_0 +getnext_indexipaddress_10_0_0_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0.0)" = "openBSD.100.17.1.1.127.0.0.1 = IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_0_0_1 +getnext_indexipaddress_10_0_0_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.0.0.1)" = "openBSD.100.17.1.1.127.0.0.1 = IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_0_1 +getnext_indexipaddress_10_0_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.0.1)" = "openBSD.100.17.1.1.127.0.0.1 = IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= getnext_indexipaddress_10_1 +getnext_indexipaddress_10_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.10.1)" = "openBSD.100.17.1.1.127.0.0.1 = IpAddress: 127.0.0.1" ] + +REGRESS_TARGETS+= getnext_indexipaddress_192_168 +getnext_indexipaddress_192_168: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.192.168)" = "openBSD.100.17.1.1.192.168.0.0 = IpAddress: 192.168.0.0" ] + +REGRESS_TARGETS+= getnext_indexipaddress_192_168_0_0 +getnext_indexipaddress_192_168_0_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.17.1.1.192.168.0.0)" = "openBSD.100.18.1.1.5 = INTEGER: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_table +getnext_indexintvalue_table: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18)" = "openBSD.100.18.1.1.5 = INTEGER: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_entry +getnext_indexintvalue_entry: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1)" = "openBSD.100.18.1.1.5 = INTEGER: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_int +getnext_indexintvalue_int: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.1)" = "openBSD.100.18.1.1.5 = INTEGER: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_int_0 +getnext_indexintvalue_int_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.1.0)" = "openBSD.100.18.1.1.5 = INTEGER: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_int_5 +getnext_indexintvalue_int_5: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.1.5)" = "openBSD.100.18.1.2.5 = STRING: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_int_5_tail +getnext_indexintvalue_int_5_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.1.5.1)" = "openBSD.100.18.1.2.5 = STRING: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_int_6 +getnext_indexintvalue_int_6: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.1.6)" = "openBSD.100.18.1.2.5 = STRING: 5" ] + +REGRESS_TARGETS+= getnext_indexintvalue_string_5 +getnext_indexintvalue_string_5: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.2.5)" = "openBSD.100.19.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintvalue_string_5 +getnext_indexintvalue_string_5: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.18.1.2.5)" = "openBSD.100.19.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_int +getnext_indexintany_int: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.1)" = "openBSD.100.19.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_int_0 +getnext_indexintany_int_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.1.0)" = "openBSD.100.19.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_int_0_tail +getnext_indexintany_int_0_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.1.0.1)" = "openBSD.100.19.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_int_1 +getnext_indexintany_int_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.1.1)" = "openBSD.100.19.1.2.1 = STRING: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_int_1_tail +getnext_indexintany_int_1_tail: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.1.1.1)" = "openBSD.100.19.1.2.1 = STRING: 1" ] + +REGRESS_TARGETS+= getnext_indexintany_string_1 +getnext_indexintany_string_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.19.1.2.1)" = "openBSD.100.20.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintnew_int +getnext_indexintnew_int: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.20.1.1)" = "openBSD.100.20.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintnew_int_0 +getnext_indexintnew_int_0: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.20.1.1.0)" = "openBSD.100.20.1.1.1 = INTEGER: 1" ] + +REGRESS_TARGETS+= getnext_indexintnew_int_1 +getnext_indexintnew_int_1: + [ "$$(snmp getnext 127.0.0.1:6161 openbsd.100.20.1.1.1)" = "openBSD.100.20.1.2.1 = STRING: 1" ] .include diff --git a/regress/lib/libagentx/main.c b/regress/lib/libagentx/main.c index ff006b4270d..92c04afca71 100644 --- a/regress/lib/libagentx/main.c +++ b/regress/lib/libagentx/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 2021/04/20 11:19:54 martijn Exp $ */ +/* $OpenBSD: main.c,v 1.7 2021/05/01 16:55:14 martijn Exp $ */ /* * Copyright (c) 2019 Martijn van Duren @@ -287,7 +287,7 @@ main(int argc, char *argv[]) if ((regressidx_any = agentx_index_integer_any(regress, AGENTX_OID(AGENTX_ENTERPRISES, 30155, 100, 19, 1, 1))) == NULL) - fatal("agentx_index_oid_dynamic"); + fatal("agentx_index_integer_any"); if ((regressobj_intindexstaticanyint = agentx_object(regress, AGENTX_OID(AGENTX_ENTERPRISES, 30155, 100, 19, 1, 1), ®ressidx_any, 1, 0, regress_intindexstaticanyint)) == NULL) @@ -299,7 +299,7 @@ main(int argc, char *argv[]) if ((regressidx_new = agentx_index_integer_new(regress, AGENTX_OID(AGENTX_ENTERPRISES, 30155, 100, 20, 1, 1))) == NULL) - fatal("agentx_index_oid_dynamic"); + fatal("agentx_index_integer_new"); if ((regressobj_intindexstaticnewint = agentx_object(regress, AGENTX_OID(AGENTX_ENTERPRISES, 30155, 100, 20, 1, 1), ®ressidx_new, 1, 0, regress_intindexstaticnewint)) == NULL) @@ -453,8 +453,21 @@ regress_intindex(struct agentx_varbind *vb) uint32_t idx; idx = agentx_varbind_get_index_integer(vb, regressidx_int); - if (agentx_varbind_request(vb) == AGENTX_REQUEST_TYPE_GETNEXT) + switch (agentx_varbind_request(vb)) { + case AGENTX_REQUEST_TYPE_GET: + if (idx == 0) { + agentx_varbind_notfound(vb); + return; + } + break; + case AGENTX_REQUEST_TYPE_GETNEXTINCLUSIVE: + if (idx == 0) + idx++; + break; + case AGENTX_REQUEST_TYPE_GETNEXT: idx++; + break; + } if (idx > 0xf) agentx_varbind_notfound(vb); else { @@ -467,16 +480,21 @@ void regress_intindex2(struct agentx_varbind *vb) { uint32_t idx1, idx2; + enum agentx_request_type type; idx1 = agentx_varbind_get_index_integer(vb, regressidx_int); idx2 = agentx_varbind_get_index_integer(vb, regressidx_int2); - if (agentx_varbind_request(vb) == AGENTX_REQUEST_TYPE_GETNEXT) { - if (++idx2 > 1) { + type = agentx_varbind_request(vb); + if (type == AGENTX_REQUEST_TYPE_GETNEXT) + idx2++; + if (type == AGENTX_REQUEST_TYPE_GETNEXT || + type == AGENTX_REQUEST_TYPE_GETNEXTINCLUSIVE) { + if (idx2 > 1) { idx1++; idx2 = 0; } } - if (idx1 > 8) + if (idx2 > 1 || idx1 > 8) agentx_varbind_notfound(vb); else { agentx_varbind_set_index_integer(vb, regressidx_int, idx1); @@ -500,9 +518,12 @@ regress_strindex(struct agentx_varbind *vb) fatalx("%s: string length should not be implied", __func__); if (slen == 0) { - if (request == AGENTX_REQUEST_TYPE_GET) - fatalx("%s: 0 index should be handled in agentx.c", + if (request == AGENTX_REQUEST_TYPE_GET) { + log_warnx("%s: 0 index should be handled in agentx.c", __func__); + agentx_varbind_error(vb); + return; + } } /* !implied first needs a length check before content check */ if (slen > 1) { @@ -519,8 +540,13 @@ regress_strindex(struct agentx_varbind *vb) return; } } - if (idx == NULL || idx[0] < 'a') + if (idx == NULL || idx[0] < 'a') { + if (request == AGENTX_REQUEST_TYPE_GET) { + agentx_varbind_notfound(vb); + return; + } idx = (unsigned char *)"a"; + } agentx_varbind_set_index_string(vb, regressidx_str, (const char *)idx); @@ -629,6 +655,8 @@ regress_strindex2(struct agentx_varbind *vb) match = 0; break; } + if (opt2i == opt2len) + match = 0; if (request == AGENTX_REQUEST_TYPE_GET) { if (!match) { agentx_varbind_notfound(vb); @@ -667,7 +695,7 @@ regress_oidimplindex(struct agentx_varbind *vb) fatalx("%s: string length should be implied", __func__); if (request == AGENTX_REQUEST_TYPE_GET) - obj = agentx_context_object_find(sac, idx, oidlen, 1, 0); + obj = agentx_context_object_find(sac, idx, oidlen, 1, 1); else obj = agentx_context_object_nfind(sac, idx, oidlen, 1, request == AGENTX_REQUEST_TYPE_GETNEXTINCLUSIVE); diff --git a/regress/lib/libagentx/walk.out b/regress/lib/libagentx/walk.out index d8902f38c2b..34af4b3a526 100644 --- a/regress/lib/libagentx/walk.out +++ b/regress/lib/libagentx/walk.out @@ -7,7 +7,6 @@ openBSD.100.7.0 = Gauge32: 1 openBSD.100.8.0 = Timeticks: (1) 0:00:00.01 openBSD.100.9.0 = Opaque: 6382179 openBSD.100.10.0 = Counter64: 1 -openBSD.100.11.1.1.0 = INTEGER: 0 openBSD.100.11.1.1.1 = INTEGER: 1 openBSD.100.11.1.1.2 = INTEGER: 2 openBSD.100.11.1.1.3 = INTEGER: 3 -- 2.20.1