On Mon, Oct 23, 2023 at 10:20 AM David Marchand
<[email protected]> wrote:
> +# OVS_DPDK_CHECK_TESTPMD()
> +#
> +# Check dpdk-testpmd availability.
> +#
> +m4_define([OVS_DPDK_CHECK_TESTPMD],
> +  [AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null])
> +])
> +
> +
> +# OVS_DPDK_START_TESTPMD()
> +#
> +# Start dpdk-testpmd in background.
> +#
> +m4_define([OVS_DPDK_START_TESTPMD],
> +  [AT_CHECK([lscpu], [], [stdout])
> +   AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) 
> {printf "512,"}; print "512"}' > NUMA_NODE])
> +   eal_options="--socket-mem="$(cat NUMA_NODE)" --file-prefix page0 
> --single-file-segments --no-pci"
> +   options="$1"
> +   [ "$options" != "${options%% -- *}" ] || options="$options -- "

I realised, looking at a generated dpdk testsuite file (while trying
to understand a Intel CI failure), that this syntax above is wrong.

It is not a big problem, since testpmd (/getopt) does not complain
about such a trailing --.
Yet, better to avoid [] and instead use a "if test ...; then ...; fi" construct.


-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to