[ovs-dev] [PATCH 1/7] ovsdb: Improve torture test for clusters.

Justin Pettit jpettit at ovn.org
Fri May 25 00:01:48 UTC 2018


> On May 18, 2018, at 2:37 PM, Ben Pfaff <blp at ovn.org> wrote:
> 
> This test is supposed to be parameterized, but one of the loops didn't
> honor the parameterization and just had hardcoded values.  Also, the
> output comparison didn't work properly for more than 100 client sets
> (n1 > 100), so this adds some explicit sorting to the mix.
> 
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
> tests/ovsdb-cluster.at | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
> index e161d1abfc2a..cc66228c6265 100644
> --- a/tests/ovsdb-cluster.at
> +++ b/tests/ovsdb-cluster.at
> @@ -196,12 +196,12 @@ ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' database from ephemeral
>     echo "...done"
>     AT_CHECK([if test $phase != 2; then exit 77; fi])
> 
> -    for i in `seq 0 9`; do
> -	for j in `seq 5`; do
> +    for i in $(seq 0 $(expr $n1 - 1) ); do
> +	for j in `seq $n2`; do
> 	    echo "$i-$j=$i-$j"
> 	done
> -    done > expout
> -    AT_CHECK([ovn-sbctl --timeout=30 --log-file=finalize.log -vtimeval:off -vfile -vsyslog:off --bare get SB_Global . external-ids | sed 's/, /\n/g; s/[[{}""]]//g;'], [0], [expout])
> +    done | sort > expout
> +    AT_CHECK([ovn-sbctl --timeout=30 --log-file=finalize.log -vtimeval:off -vfile -vsyslog:off --bare get SB_Global . external-ids | sed 's/, /\n/g; s/[[{}""]]//g;' | sort], [0], [expout])

I believe the original code, as well as this new version, mixes spaces and tabs.

Acked-by: Justin Pettit <jpettit at ovn.org>

--Justin




More information about the dev mailing list