[ovs-dev] [PATCH v2 1/2] ovsdb-idl.at: Make test outputs more predictable.

Dumitru Ceara dceara at redhat.com
Tue Mar 9 16:08:34 UTC 2021


On 3/9/21 3:36 PM, Ilya Maximets wrote:
> On 3/3/21 3:39 PM, Dumitru Ceara wrote:
>> IDL tests need predictable output from test-ovsdb.
>>
>> This used to be done by first sorting the output of test-ovsdb and then
>> applying uuidfilt to predictably translate UUIDs.  This was not
>> reliable enough in case test-ovsdb processes two or more insert/delete
>> operations in the same iteration because the order of lines in the
>> output depends on the automatically generated UUID values.
>>
>> To fix this we change the way test-ovsdb and test-ovsdb.py generate
>> outputs and prepend the table name and tracking information before
>> printing the contents of a row.
>>
>> All existing ovsdb-idl.at tests are updated to expect the new output
>> format.
>>
>> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
>> ---
>> Note: the old approach was enough for outputs of the existing tests but
>> the next patch in this series adds a new test that requires this
>> change.
>>
>> v2:
>> - Reworked the patch and changed test-ovsdb.c and test-ovsdb.py to
>>    generate output that can be sorted predictably.
>> - Rephrased commit message.
>> ---
> 
> One part in tests/ovsdb-cluster.at is missing:
> 
> diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
> index 92aa42709..cf43e9cf8 100644
> --- a/tests/ovsdb-cluster.at
> +++ b/tests/ovsdb-cluster.at
> @@ -128,7 +128,7 @@ ovsdb_test_cluster_disconnect () {
>              "rows": [{"i": 1}]}]]' > test-ovsdb.log 2>&1 &
>       echo $! > test-ovsdb.pid
>   
> -    OVS_WAIT_UNTIL([grep "000: i=1" test-ovsdb.log])
> +    OVS_WAIT_UNTIL([grep "000: table simple: i=1" test-ovsdb.log])
>   
>       # Start collecting raft_is_connected logs for $target before shutting down
>       # any servers.
> ---
> 

Ah, sorry about that, I'll fix it in the next revision.

Regards,
Dumitru



More information about the dev mailing list