[quagga-dev,16478] Re: [PATCH] vtysh: make warnings about node installs a non-default compile-time option

Message ID 20161227225151.GA55188@cheesecake.ibn.ie
State Under Review
Headers show

Commit Message

Nick Hilliard Dec. 27, 2016, 10:51 p.m.
On Tue, Dec 06, 2016 at 06:52:14PM -0600, Jafar Al-Gharaibeh wrote:
> I tested this patch with the latest sources and got a weird situation 
> where vtysh shell doesn't exit. "end", "exit", "quit" failed to make it 
> do so. I moved the #ifdef DEV_BUILD inside the if statement to cover 
> only the fprintf statement and that fixed it. The reason I think is that 
> the ifdef prevents an early bailout (return) that takes place in the 
> normal case. HEre is the code looks:

fix for patchwork:

Comments

cisystem@netdef.org Dec. 27, 2016, 11:20 p.m. | #1
Continous Integration Result: FAILED

See below for issues.
This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 2294: http://patchwork.quagga.net/patch/2294
       [quagga-dev,16478] Re: [PATCH] vtysh: make warnings about node installs a non-default compile-time option
Tested on top of Git : 258f3da (as of 20161018.130352 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-385/


Get source and apply patch from patchwork: Successful
----------------

Building Stage: Failed
----------------
Ubuntu1204 amd64 build: Successful
FreeBSD9 amd64 build: Successful
CentOS6 amd64 build: Successful
FreeBSD11 amd64 build: Successful
Debian8 amd64 build: Successful
Ubuntu1404 amd64 build: Successful
Ubuntu1604 amd64 build: Successful
NetBSD7 amd64 build: Successful
FreeBSD10 amd64 build: Successful
CentOS7 amd64 build: Successful
NetBSD6 amd64 build: Successful
OmniOS amd64 build: Successful

Make failed for Openbsd60 amd64 build:    (see full log in attachment openbsd60_amd64_make.log)
>   CC       kernel_socket.o
> kernel_socket.c:92:2: warning: #warning "net/route.h does not define RT_ROUNDUP; making unwarranted assumptions!"
> kernel_socket.c:245: error: 'RTF_XRESOLVE' undeclared here (not in a function)
> *** Error 1 in zebra (Makefile:620 'kernel_socket.o': @echo "  CC      " kernel_socket.o;gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/home/ci/cibuild...)
> *** Error 1 in . (Makefile:490 'all-recursive')
> *** Error 1 in /home/ci/cibuild.385/quagga-source (Makefile:397 'all')


Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org
make  all-recursive
Making all in lib
(gawk -f ./memtypes.awk ./memtypes.c > memtypes.h)
/usr/bin/perl ./route_types.pl < ./route_types.txt > route_types.h
true
make  all-am
  CC       network.lo
  CC       pid_output.lo
  CC       getopt.lo
  CC       getopt1.lo
  CC       daemon.lo
  CC       checksum.lo
  CC       vector.lo
  CC       linklist.lo
  CC       vty.lo
  CC       command.lo
  CC       sockunion.lo
  CC       prefix.lo
  CC       thread.lo
  CC       if.lo
  CC       memory.lo
  CC       buffer.lo
  CC       table.lo
  CC       hash.lo
  CC       filter.lo
  CC       routemap.lo
  CC       distribute.lo
  CC       stream.lo
stream.c:500:2: warning: #warning "Unknown floating-point format, __func__ may be wrong"
stream.c:516:2: warning: #warning "Unknown floating-point format, __func__ may be wrong"
stream.c:638:2: warning: #warning "Unknown floating-point format, __func__ may be wrong"
stream.c:655:2: warning: #warning "Unknown floating-point format, __func__ may be wrong"
  CC       str.lo
  CC       log.lo
  CC       plist.lo
  CC       zclient.lo
  CC       sockopt.lo
  CC       smux.lo
  CC       agentx.lo
  CC       snmp.lo
  CC       md5.lo
  CC       if_rmap.lo
  CC       keychain.lo
  CC       privs.lo
  CC       sigevent.lo
  CC       pqueue.lo
  CC       jhash.lo
  CC       memtypes.lo
  CC       workqueue.lo
  CC       vrf.lo
  CC       event_counter.lo
  CC       nexthop.lo
  CCLD     libzebra.la
Making all in qpb
make  all-am
  CC       qpb.lo
  CCLD     libquagga_pb.la
Making all in fpm
make  all-am
  CC       fpm_pb.lo
  CCLD     libfpm_pb.la
Making all in zebra
  CC       test_main.o
  CC       zebra_rib.o
  CC       interface.o
  CC       connected.o
  CC       debug.o
  CC       zebra_vty.o
  CC       kernel_null.o
  CC       redistribute_null.o
  CC       ioctl_null.o
  CC       misc_null.o
  CC       zebra_rnh_null.o
  CCLD     testzebra
../lib/.libs/libzebra.so.0.0: warning: warning: strcpy() is almost always misused, please use strlcpy()
../lib/.libs/libzebra.so.0.0: warning: warning: strcat() is almost always misused, please use strlcat()
../lib/.libs/libzebra.so.0.0: warning: warning: sprintf() is often misused, please use snprintf()
../lib/.libs/libzebra.so.0.0: warning: warning: random() may return deterministic values, is that what you want?
  CC       zserv.o
zserv.c: In function 'config_write_fpm':
zserv.c:2289: warning: implicit declaration of function 'fpm_remote_srv_write'
  CC       main.o
  CC       zebra_routemap.o
  CC       redistribute.o
  CC       rtadv.o
rtadv.c: In function 'rtadv_send_packet':
rtadv.c:136: warning: unused variable 'sdl'
  CC       zebra_snmp.o
  CC       irdp_main.o
  CC       irdp_interface.o
  CC       irdp_packet.o
  CC       router-id.o
  CC       zebra_fpm.o
zebra_fpm.c: In function 'zfpm_encode_route':
zebra_fpm.c:883: warning: unused variable 'cmd'
zebra_fpm.c: At top level:
zebra_fpm.c:1676: warning: no previous prototype for 'fpm_remote_srv_write'
  CC       zebra_rnh.o
  CC       ioctl.o
  CC       ipforward_sysctl.o
  CC       if_ioctl.o
if_ioctl.c: In function 'interface_list_ioctl':
if_ioctl.c:113: warning: comparison between signed and unsigned
  CC       rt_socket.o
  CC       rtread_sysctl.o
  CC       kernel_socket.o
kernel_socket.c:92:2: warning: #warning "net/route.h does not define RT_ROUNDUP; making unwarranted assumptions!"
kernel_socket.c:245: error: 'RTF_XRESOLVE' undeclared here (not in a function)
*** Error 1 in zebra (Makefile:620 'kernel_socket.o': @echo "  CC      " kernel_socket.o;gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/home/ci/cibuild...)
*** Error 1 in . (Makefile:490 'all-recursive')
*** Error 1 in /home/ci/cibuild.385/quagga-source (Makefile:397 'all')
Paul Jakma Jan. 4, 2017, 10:25 p.m. | #2
On Tue, 27 Dec 2016, Nick Hilliard wrote:

> fix for patchwork:

Other possibility (so long as this bit of debug is kept) would be to 
check for some property of vtysh (e.g. argv[0]).

regards,

Patch hide | download patch | download mbox

diff --git a/lib/command.c b/lib/command.c
index ab46fc4a..bff86e58 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -638,9 +638,11 @@  install_element (enum node_type ntype, struct cmd_element *cmd)
   
   if (hash_lookup (cnode->cmd_hash, cmd) != NULL)
     {
+#ifdef DEV_BUILD
       fprintf (stderr, 
                "Multiple command installs to node %d of command:\n%s\n",
                ntype, cmd->string);
+#endif
       return;
     }