Skip to content

Commit

Permalink
tests: ovsdb-server: Fix config-file same schema test.
Browse files Browse the repository at this point in the history
When a configuration file is used the ovsdb-server (re-)configures
databases in multiple passes.  First the configuration file is
read and a shash is populated, second the shash is iterated over
to remove/create databases.

The "ovsdb-server config-file - same schema" test currently relies
on a certain ordering of this shash, but we can't really rely on a
specific ordering as it would be environment specific.

The test currently fails on big endian systems such as s390x with:
 -WARN|failed to open database 'db2': ovsdb error: ordinals: duplicate database name
 +WARN|failed to open database 'db': ovsdb error: ordinals: duplicate database name

Normalize the logged database name so that the test can focus on
the fact that duplication is detected rather than in which order.

Fixes: 5514009 ("ovsdb-server: Allow user-provided config files.")
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Frode Nordahl <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
fnordahl authored and igsilya committed Jan 22, 2024
1 parent 432a0b9 commit 3f74d6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ovsdb-server.at
Original file line number Diff line number Diff line change
Expand Up @@ -2870,7 +2870,9 @@ m4_define([TEST_CONFIG_FILE],
--config-file=config.json], [$3], [ignore], [stderr])
m4_if([$4], [], [], [
AT_CHECK([cat stderr | grep -v -E 'INFO|DBG' \
| grep -v 'failed to load configuration from' > warnings])
| grep -v 'failed to load configuration from' \
| sed -e "/duplicate database name/ s/'db'/'db2'/" \
> warnings])
AT_CHECK([cat warnings], [0], [m4_if([$3], [0], [$4], [$4
ovsdb-server: server configuration failed
])])])
Expand Down

0 comments on commit 3f74d6b

Please sign in to comment.