[ovs-discuss] Windows Unit Failed Tests summary

Jakub Sitnicki jkbs at redhat.com
Tue Jul 31 14:54:02 UTC 2018


Hi Alin,

On Tue, 31 Jul 2018 16:01:11 +0300
<aserdean at ovn.org> wrote:

> I need some guidance on 2607. A bit more background we are
> using the BSD variant of getopt, and there are some slight
> differences.
> I tried updating:
> https://github.com/openvswitch/ovs/blob/master/lib/getopt_long.c
> to the latest BSD variant but it still is not 100% compatible with the
> GNU one.
> Does anyone have some opinions if I should change the
> test and/or code?
> 
> I'm including also the logged output:
> #                             -*- compilation -*-
> 2607. ovn-nbctl.at:1503: testing ovn-nbctl - commands parser error paths ...
> ./ovn-nbctl.at:1504: ovsdb-tool create ovn-nb.db
> $abs_top_srcdir/ovn/ovn-nb.ovsschema
> ./ovn-nbctl.at:1504: ovsdb-server --detach --no-chdir --pidfile --log-file
> --remote=punix:$OVS_RUNDIR/ovnnb_db.sock ovn-nb.db
> stderr:
> ./ovn-nbctl.at:1504: ovn-nbctl init
> ./ovn-nbctl.at:1504: sed < stderr '
> /vlog|INFO|opened log file/d
> /ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d'
> ./ovn-nbctl.at:1510: ovn-nbctl -- --if-exists --if-exists list
> Logical_Switch
> stderr:
> ovn-nbctl: '--if-exists' option specified multiple times
> ./ovn-nbctl.at:1511: grep 'option specified multiple times' stderr
> stdout:
> ovn-nbctl: '--if-exists' option specified multiple times
> ./ovn-nbctl.at:1514: ovn-nbctl
> stderr:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1515: grep 'missing command name' stderr
> stdout:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1517: ovn-nbctl --if-exists
> stderr:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1518: grep 'missing command name' stderr
> stdout:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1520: ovn-nbctl --
> stderr:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1521: grep 'missing command name' stderr
> stdout:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1523: ovn-nbctl -- --if-exists
> stderr:
> ovn-nbctl: missing command name (use --help for help)	
> ./ovn-nbctl.at:1524: grep 'missing command name' stderr
> stdout:
> ovn-nbctl: missing command name (use --help for help)
> ./ovn-nbctl.at:1527: ovn-nbctl foo
> stderr:
> ovn-nbctl: unknown command 'foo'; use --help for help
> ./ovn-nbctl.at:1528: grep 'unknown command' stderr
> stdout:
> ovn-nbctl: unknown command 'foo'; use --help for help
> ./ovn-nbctl.at:1530: ovn-nbctl -- foo
> stderr:
> ovn-nbctl: unknown command 'foo'; use --help for help
> ./ovn-nbctl.at:1531: grep 'unknown command' stderr
> stdout:
> ovn-nbctl: unknown command 'foo'; use --help for help
> ./ovn-nbctl.at:1534: ovn-nbctl --foo list Logical_Switch
> stderr:
> 2018-07-31T12:23:53Z|00001|getopt_long|WARN|unknown option -- foo
> ./ovn-nbctl.at:1535: grep 'unrecognized option' stderr
> stdout:
> ./ovn-nbctl.at:1535: exit code was 1, expected 0

Ah, internal getopt_long() implementation prints errors to the log
instead of the standard error. Thanks for reporting it. This is my
doing.

Not sure how to best address this. Does the "commands parser error
paths" pass with the following patch applied?

---8<---

diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index 3e0a8b2ec..f08ac8478 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -1531,23 +1531,14 @@ AT_CHECK([ovn-nbctl -- foo], [1], [], [stderr])
 AT_CHECK([grep 'unknown command' stderr], [0], [ignore])

 dnl Unknown option
-AT_CHECK([ovn-nbctl --foo list Logical_Switch], [1], [], [stderr])
-AT_CHECK([grep 'unrecognized option' stderr], [0], [ignore])
-
 AT_CHECK([ovn-nbctl -- --foo list Logical_Switch], [1], [], [stderr])
 AT_CHECK([grep 'command has no .* option' stderr], [0], [ignore])

 dnl Missing option argument
-AT_CHECK([ovn-nbctl --columns], [1], [], [stderr])
-AT_CHECK([grep 'option .* requires an argument' stderr], [0], [ignore])
-
 AT_CHECK([ovn-nbctl -- --columns list Logical_Switch], [1], [], [stderr])
 AT_CHECK([grep 'missing argument to .* option' stderr], [0], [ignore])

 dnl Unexpected option argument
-AT_CHECK([ovn-nbctl --if-exists=foo list Logical_Switch], [1], [], [stderr])
-AT_CHECK([grep 'option .* doesn'\''t allow an argument' stderr], [0], [ignore])
-
 AT_CHECK([ovn-nbctl -- --if-exists=foo list Logical_Switch], [1], [], [stderr])
 AT_CHECK([grep 'option on .* does not accept an argument' stderr], [0], [ignore])




More information about the discuss mailing list