Some tests get the current log line number so they can check that there is a new occurance of a log entry after a command.
'tail' uses the line number as the starting line number. However, this will include the last line of the log before the command. To prevent any races on logs and possibly checking an existing log entry prior to a command here or in reuse of this method, get the next line number of the log and use that as the starting line for tail. Suggested-by: Ilya Maximets <[email protected]> Signed-off-by: Kevin Traynor <[email protected]> --- v3: newly added from Ilya comment on alb.at --- tests/pmd.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pmd.at b/tests/pmd.at index cc5371d5a..e0d54c1dd 100644 --- a/tests/pmd.at +++ b/tests/pmd.at @@ -146,5 +146,5 @@ pmd thread numa_id <cleared> core_id <cleared>: AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-rxq-assign=cycles]) -TMP=$(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]]) +TMP=$(($(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])+1)) AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x3]) CHECK_PMD_THREADS_CREATED([2], [], [+$TMP]) @@ -161,5 +161,5 @@ port: p0 queue-id: 1 3 5 7 ]) -TMP=$(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]]) +TMP=$(($(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])+1)) AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x1]) CHECK_PMD_THREADS_CREATED([1], [], [+$TMP]) -- 2.31.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
