get_log_next_line_num() was defined in alb.at. As it may be useful in other test files, move to ofproto-macros.at.
Suggested-by: David Marchand <david.march...@redhat.com> Signed-off-by: Kevin Traynor <ktray...@redhat.com> --- tests/alb.at | 4 ---- tests/ofproto-macros.at | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/alb.at b/tests/alb.at index 922185d61..32dc40a1b 100644 --- a/tests/alb.at +++ b/tests/alb.at @@ -3,8 +3,4 @@ AT_BANNER([PMD Auto Load Balance]) m4_divert_push([PREPARE_TESTS]) -get_log_next_line_num () { - LINENUM=$(($(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])+1)) -} - m4_divert_pop([PREPARE_TESTS]) diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 676d55aa9..d2e6ac768 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -266,4 +266,11 @@ check_logs () { } +# Gets the last line number in ovs-vswitchd.log +1. This can be used to +# help ensure that an output in the log is newly written as the result of +# a test command and it is not just matching an earlier log line. +get_log_next_line_num () { + LINENUM=$(($(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])+1)) +} + # add_of_br BRNUM [ARG...] add_of_br () { -- 2.40.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev