On Mon, Nov 2, 2020 at 9:37 AM Bill Fenner <fen...@gmail.com> wrote:

> I imagined writing a test that exercises all of the output options (-Of,
> -On, -Os, -OS, -Ou) for both netSnmpExampleAnonymousIntermediateNode
> and netSnmpExamples.42.1.  Does anyone have any other suggestions of what
> to test?
>

I accidentally stumbled across this bug in my proposed change with -OX
output: if a late index element translates to a string (e.g., a
PhysicalAddress), and an earlier element is a TimeTicks (or its
representation otherwise has a period in it), the output would be
MODULE-NAME::00][string]  (the "00" is the part of [0.00] after the dot..)
- I'm looking for brainstorming about other crazy corner cases like this.

(Concretely, this was
snmptranslate -OX
ARISTA-BRIDGE-EXT-MIB::aristaDot1qTpFdbNumMoves.1.42.40.41.42.43.44.45
ARISTA-BRIDGE-EXT-MIB::01][42][STRING: 28:29:2a:2b:2c:2d]
where the right output was
ARISTA-BRIDGE-EXT-MIB::aristaDot1qTpFdbNumMoves[0:00:00.01][42][STRING:
28:29:2a:2b:2c:2d]
where the INDEX was { aristaDot1qTpFdbTimeMark, dot1qFdbId,
dot1qTpFdbAddress } )

(This doesn't *require* -OX, once I identified the bug, it required "the
representation of the index contained a period followed by a letter",
so Q-BRIDGE-MIB::dot1qTpFdbAddress.42.40.41.42.43.46.66 => Q-BRIDGE-MIB::B'
instead of Q-BRIDGE-MIB::dot1qTpFdbAddress.42.'()*+.B'...)

  Bill
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to