-# $OpenBSD: Makefile,v 1.5 2022/09/02 07:07:45 martijn Exp $
+# $OpenBSD: Makefile,v 1.6 2023/11/06 09:46:04 martijn Exp $
SNMP?= /usr/bin/snmp
SNMPD?= /usr/sbin/snmpd -f ${.OBJDIR}/snmpd.conf
${SNMPGET} -v2c -cpublic -Ox 127.0.0.1 1.3.6.1.4.1.30155.42.3.2.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_utf8
+REGRESS_EXPECTED_FAILURES:= output_displayhint_255t_utf8
CLEANFILES+= output_displayhint_255t_utf8.res output_displayhint_255t_utf8.exp
output_displayhint_255t_utf8:
printf "STRING: Reyk Flöter\n" > $@.exp
LC_ALL=en_US.UTF-8 ${SNMPGET} -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.1.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_ascii
+REGRESS_EXPECTED_FAILURES+= output_displayhint_255t_ascii
CLEANFILES+= output_displayhint_255t_ascii.res output_displayhint_255t_ascii.exp
output_displayhint_255t_ascii:
printf "STRING: Reyk Fl.ter\n" > $@.exp
LC_ALL=C ${SNMPGET} -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.1.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_invalchar_utf8
+REGRESS_EXPECTED_FAILURES+= output_displayhint_255t_invalchar_utf8
CLEANFILES+= output_displayhint_255t_invalchar_utf8.res output_displayhint_255t_invalchar_utf8.exp
output_displayhint_255t_invalchar_utf8:
printf "STRING: Reyk Fl�ter\n" > $@.exp
LC_ALL=en_US.UTF-8 ${SNMPGET} -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.2.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_invalchar_ascii
+REGRESS_EXPECTED_FAILURES+= output_displayhint_255t_invalchar_ascii
CLEANFILES+= output_displayhint_255t_invalchar_ascii.res output_displayhint_255t_invalchar_ascii.exp
output_displayhint_255t_invalchar_ascii:
printf "STRING: Reyk Fl?ter\n" > $@.exp
LC_ALL=C ${SNMPGET} -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.2.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_truncatefull
+REGRESS_EXPECTED_FAILURES+= output_displayhint_255t_truncatefull
CLEANFILES+= output_displayhint_255t_truncatefull.res output_displayhint_255t_truncatefull.exp
output_displayhint_255t_truncatefull:
printf "STRING: %s\n" "$$(jot -ba 255 | tr -d '\n')" > $@.exp
LC_ALL=en_US.UTF-8 ${SNMPGET} -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.3.0 > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) setting customer oids under SNMPv2-MIB are not allowed anymore
REGRESS_TARGETS+= output_displayhint_255t_truncatehalf
+REGRESS_EXPECTED_FAILURES+= output_displayhint_255t_truncatehalf
CLEANFILES+= output_displayhint_255t_truncatehalf.res output_displayhint_255t_truncatehalf.exp
output_displayhint_255t_truncatehalf:
printf "STRING: %s\n" "$$(jot -ba 254 | tr -d '\n')" > $@.exp
### SNMP BULKGET
# Building output manually is large and error prone: Assume get/getnext works
+# XXX snmpd(8) currently doesn't have any entries in sysORTable
REGRESS_TARGETS+= bulkget_simple
+REGRESS_EXPECTED_FAILURES+= bulkget_simple
CLEANFILES+= bulkget_simple.res bulkget_simple.exp
bulkget_simple:
IDX=1; while [ $$IDX -le 4 ]; do ${SNMPGET} -v2c -cpublic 127.0.0.1 sysORDescr.$$IDX; IDX=$$((IDX+1)); done > $@.exp
${SNMPBULKGET} -v2c -cpublic -Cr4 127.0.0.1 sysORDescr > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) currently doesn't have any entries in sysORTable
REGRESS_TARGETS+= bulkget_multi
+REGRESS_EXPECTED_FAILURES+= bulkget_multi
CLEANFILES+= bulkget_multi.res bulkget_multi.exp
bulkget_multi:
> $@.exp
${SNMPBULKGET} -v2c -cpublic -Cr4 127.0.0.1 sysORDescr sysORID > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) currently doesn't have any entries in sysORTable
REGRESS_TARGETS+= bulkget_nonrep
+REGRESS_EXPECTED_FAILURES+= bulkget_nonrep
CLEANFILES+= bulkget_nonrep.res bulkget_nonrep.exp
bulkget_nonrep:
${SNMPGET} -v2c -cpublic 127.0.0.1 sysDescr.0 > $@.exp
${SNMPBULKGET} -v2c -cpublic -Cn1 -Cr4 127.0.0.1 sysDescr sysORDescr > $@.res
diff -up $@.exp $@.res
+# XXX snmpd(8) currently doesn't have any entries in sysORTable
REGRESS_TARGETS+= bulkget_maxrep
+REGRESS_EXPECTED_FAILURES+= bulkget_maxrep
CLEANFILES+= bulkget_maxrep.res bulkget_maxrep.exp
bulkget_maxrep:
IDX=1; while [ $$IDX -le 4 ]; do ${SNMPGET} -v2c -cpublic 127.0.0.1 sysORDescr.$$IDX; IDX=$$((IDX+1)); done > $@.exp
REGRESS_TARGETS+= walk_end
CLEANFILES+= walk_end.res walk_end.exp
walk_end:
- OID=system; while true; do OID="$$(${SNMPGETNEXT} -v2c -cpublic 127.0.0.1 "$$OID")"; [ "$${OID%% *}" == "sysORLastChange.0" ] && break; printf "%s\n" "$${OID}"; OID="$${OID%% *}"; done | grep -v ^sysUpTime.0 > $@.exp
- ${SNMPWALK} -v2c -cpublic -CE sysORLastChange 127.0.0.1 system | grep -v ^sysUpTime.0 > $@.res
+ OID=system; while true; do OID="$$(${SNMPGETNEXT} -v2c -cpublic 127.0.0.1 "$$OID")"; [ "$${OID%% *}" == "sysServices.0" ] && break; printf "%s\n" "$${OID}"; OID="$${OID%% *}"; done | grep -v ^sysUpTime.0 > $@.exp
+ ${SNMPWALK} -v2c -cpublic -CE sysServices 127.0.0.1 system | grep -v ^sysUpTime.0 > $@.res
diff -up $@.exp $@.res
REGRESS_TARGETS+= walk_includeoid