]> git.puffer.fish Git - mirror/frr.git/commit
topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict") 12635/head
authorG. Paul Ziemba <paulz@labn.net>
Fri, 13 Jan 2023 06:27:57 +0000 (22:27 -0800)
committerG. Paul Ziemba <paulz@labn.net>
Fri, 13 Jan 2023 18:53:36 +0000 (10:53 -0800)
commit25cdcf1fac682dd76222c1f6c69c402d1c4090b8
tree8e793b48f0fbb321e3f5d198420ca05314814dc3
parentc0937881df35118f726536be80e4a9028c57334b
topotests/lib/lutil.py: luSetWaitType("strict"|"nostrict")

    This change alters the behavior of existing test code. The
    default mode (before any call to luSetWaitType()) is now
    "strict".

    The historical behavior of luCommand(op="wait) is to ignore
    failures to match the specified regexp in the specified time.
    In those cases, no result was logged and no error was signaled.

    This change introduces a new "strict" mode for luCommand(op="wait):
    in "strict" wait mode, each invocation of luCommand(op="wait)
    generates an explicit, logged failure result when it fails to match
    the specified regexp in the specified time. These failures signal
    an error for the test.

    Calling luSetWaitType("nostrict") restores the historical behavior.

    Calling luSetWaitType("strict") (re)enables the new strict behavior.

    Individual calls to luCommand() may also specify op="wait-nostrict"
    to override any default and use the historical behavior.

    Individual calls to luCommand() may also specify op="wait-strict"
    to override any default and use the new behavior.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
tests/topotests/lib/lutil.py