Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: xrefs - general cross-references & unique IDs #6766

Merged
merged 10 commits into from
Feb 2, 2021

Conversation

eqvinox
Copy link
Contributor

@eqvinox eqvinox commented Jul 18, 2020

This is #6328 cleaned up & polished for inclusion.

the goals are:

  • streamlining source code location (file/line/func) references

  • being able to extract lists of all references like this:
    https://aurora.nox.tf/tmp/xrefs-byfile.json
    https://aurora.nox.tf/tmp/xrefs.json

  • getting automatic unique IDs for use by the daemon itself, plans include:

    • automatic source code location (f/l/f) for all log messages
    • IDs for all log messages
    • CLI command "turn on backtraces for log message XYZ"
    • CLI command "turn on/of log message XYZ regardless of level"

First iterations of this date back to 2017 in the context of log messages only. In the meantime, this is generalized / detached from log messages and implemented as a general feature.

For log messages, the unique ID is explicitly intended to change when the log message format string changes. The reason for this is that the unique ID can be used to parse / reverse printf formatting of a log message to get the individual fields of it, which only works if you have the exact format string.

The ID currently has 49 bits of entropy, I've done the math and that should be sufficient. In most cases, even the first half (XXXXX-) should already be unique, and the dash is intentionally there due to that expectation.

The extraction script (xrelfo) is coming up in a separate PR.

@polychaeta polychaeta added libfrr tests Topotests, make check, etc labels Jul 18, 2020
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 18, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 c7245f2
Date 07/18/2020
Start 06:20:41
Finish 06:46:36
Run-Time 25:55
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-07-18-06:20:41.txt
Log autoscript-2020-07-18-06:21:42.log.bz2
Memory 462 471 424

For details, please contact louberger

@NetDEF-CI

This comment has been minimized.

@eqvinox
Copy link
Contributor Author

eqvinox commented Jul 18, 2020

CI:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 18, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13198/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-18973/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #186: FILE: /tmp/f1-18973/thread.h:186:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #234: FILE: /tmp/f1-18973/thread.h:234:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-18973/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-18973/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-18973/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-18973/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-18973/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#109: FILE: /tmp/f1-18973/xref.h:109:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#110: FILE: /tmp/f1-18973/xref.h:110:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#137: FILE: /tmp/f1-18973/xref.h:137:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#194: FILE: /tmp/f1-18973/xref.h:194:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#195: FILE: /tmp/f1-18973/xref.h:195:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#196: FILE: /tmp/f1-18973/xref.h:196:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-18973/xref.h:197:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-18973/xref.h:198:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-18973/xref.h:199:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-18973/xref.h:201:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-18973/xref.h:202:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#203: FILE: /tmp/f1-18973/xref.h:203:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-18973/xref.h:204:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-18973/xref.h:205:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-18973/xref.h:206:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-18973/xref.h:207:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-18973/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-18973/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-18973/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-18973/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13198/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200718-06-gc7245f220-0 (missing) -> 7.5-dev-20200718-06-gc7245f220-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200718-06-gc7245f220-0 (missing) -> 7.5-dev-20200718-06-gc7245f220-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200718-06-gc7245f220-0 (missing) -> 7.5-dev-20200718-06-gc7245f220-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200718-06-gc7245f220-0 (missing) -> 7.5-dev-20200718-06-gc7245f220-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200718-06-gc7245f220-0 (missing) -> 7.5-dev-20200718-06-gc7245f220-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 27, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 f4bb64a
Date 07/27/2020
Start 11:41:32
Finish 12:07:25
Run-Time 25:53
Total 1818
Pass 1818
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-07-27-11:41:32.txt
Log autoscript-2020-07-27-11:42:32.log.bz2
Memory 492 491 425

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 27, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 dbedc19
Date 07/27/2020
Start 14:24:45
Finish 14:50:43
Run-Time 25:58
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-07-27-14:24:45.txt
Log autoscript-2020-07-27-14:25:49.log.bz2
Memory 469 460 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jul 27, 2020

Continuous Integration Result:

Continuous Integration Result: FAILED PASSED

(Result overwritten by @eqvinox)

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13324/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed Passed

Topo tests part 0 un Ubuntu 16.04 arm8: Incomplete Manually skipped due to excessive queue length (check logs for details)
Successful on other platforms/tests
  • Topo tests part 2 on Ubuntu 16.04 amd64
  • IPv4 protocols on Ubuntu 18.04
  • Debian 10 deb pkg check
  • Topo tests part 2 on Ubuntu 18.04 amd64
  • Topo tests part 0 on Ubuntu 16.04 i386
  • Static analyzer (clang)
  • Fedora 29 rpm pkg check
  • Ubuntu 16.04 deb pkg check
  • Ubuntu 20.04 deb pkg check
  • Topo tests part 2 on Ubuntu 16.04 i386
  • Topo tests part 1 on Ubuntu 16.04 i386
  • Topo tests part 1 on Ubuntu 18.04 amd64
  • Ubuntu 18.04 deb pkg check
  • Addresssanitizer topotests part 2
  • Debian 8 deb pkg check
  • CentOS 7 rpm pkg check
  • Topo tests part 0 on Ubuntu 16.04 amd64
  • IPv4 ldp protocol on Ubuntu 18.04
  • Debian 9 deb pkg check
  • Addresssanitizer topotests part 0
  • Topo tests part 1 on Ubuntu 16.04 amd64
  • Addresssanitizer topotests part 1
  • Topo tests part 0 on Ubuntu 18.04 amd64
  • IPv6 protocols on Ubuntu 18.04

Warnings Generated during build:

Checkout code: Successful with additional warnings
Topo tests part 0 un Ubuntu 16.04 arm8: Incomplete (check logs for details)
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-24291/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #186: FILE: /tmp/f1-24291/thread.h:186:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #234: FILE: /tmp/f1-24291/thread.h:234:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-24291/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-24291/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-24291/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-24291/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-24291/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-24291/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-24291/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-24291/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-24291/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-24291/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-24291/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-24291/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-24291/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-24291/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-24291/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-24291/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-24291/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-24291/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-24291/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-24291/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-24291/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-24291/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-24291/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-24291/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-24291/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13324/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-14-gdbedc1927-0 (missing) -> 7.5-dev-20200727-14-gdbedc1927-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-14-gdbedc1927-0 (missing) -> 7.5-dev-20200727-14-gdbedc1927-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-14-gdbedc1927-0 (missing) -> 7.5-dev-20200727-14-gdbedc1927-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-14-gdbedc1927-0 (missing) -> 7.5-dev-20200727-14-gdbedc1927-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200727-14-gdbedc1927-0 (missing) -> 7.5-dev-20200727-14-gdbedc1927-0~deb10u1

@eqvinox
Copy link
Contributor Author

eqvinox commented Jul 27, 2020

CI has passed, I just skipped the Ubuntu 16.04 ARM8 run (it's the one building up excessive backlog due to diminishing servers)

@LabN-CI
Copy link
Collaborator

LabN-CI commented Aug 3, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 5e17ca3
Date 08/03/2020
Start 12:41:43
Finish 13:07:33
Run-Time 25:50
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-08-03-12:41:43.txt
Log autoscript-2020-08-03-12:42:44.log.bz2
Memory 463 484 426

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Aug 3, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13441/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-10328/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #186: FILE: /tmp/f1-10328/thread.h:186:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #234: FILE: /tmp/f1-10328/thread.h:234:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-10328/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-10328/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-10328/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-10328/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-10328/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-10328/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-10328/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-10328/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-10328/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-10328/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-10328/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-10328/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-10328/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-10328/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-10328/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-10328/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-10328/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-10328/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-10328/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-10328/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-10328/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-10328/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-10328/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-10328/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-10328/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-13441/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1

@riw777 riw777 self-requested a review September 1, 2020 14:09
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@Jafaral
Copy link
Member

Jafaral commented Oct 6, 2020

ci:rerun

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Oct 6, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topo tests part 1 on Ubuntu 16.04 i386: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1604I386-14590/test

Topology Tests failed for Topo tests part 1 on Ubuntu 16.04 i386:

r1 failed SHOW ISIS INTERFACE DETAIL check:
--- actual SHOW ISIS INTERFACE DETAIL
+++ expected SHOW ISIS OSPF6 INTERFACE DETAIL
@@ -1,5 +1,5 @@
 Area test:
-  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xa
+  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xXX
     Type: lan, Level: L1, SNPA: XXXX.XXXX.XXXX
     Level-1 Information:
       Metric: 10, Active neighbors: 0
@@ -13,7 +13,7 @@
     IPv6 Prefixes:
       fc00:0:0:5::1/64
 
-  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xb
+  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xXX
     Type: lan, Level: L2, SNPA: XXXX.XXXX.XXXX
     Level-2 Information:
       Metric: 10, Active neighbors: 0
2020-10-06 19:05:02,563 ERROR: assert failed at "test_all_protocol_startup/test_isis_interfaces": SHOW ISIS INTERFACE DETAIL failed for router r1:
  --- actual SHOW ISIS INTERFACE DETAIL
  +++ expected SHOW ISIS OSPF6 INTERFACE DETAIL
  @@ -1,5 +1,5 @@
   Area test:
  -  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xa
  +  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xXX
       Type: lan, Level: L1, SNPA: XXXX.XXXX.XXXX
       Level-1 Information:
         Metric: 10, Active neighbors: 0
  @@ -13,7 +13,7 @@
       IPv6 Prefixes:
         fc00:0:0:5::1/64
   
  -  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xb
  +  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xXX
       Type: lan, Level: L2, SNPA: XXXX.XXXX.XXXX
       Level-2 Information:
         Metric: 10, Active neighbors: 0
assert 1 == 0
  -1
  +0
2020-10-06 19:07:27,018 ERROR: 'router_json_cmp' failed after 103.72 seconds
2020-10-06 19:07:27,019 ERROR: assert failed at "test_bfd_topo2/test_protocols_convergence": "r1" JSON output mismatches
assert Generated JSON diff error report:
  
  > $->10.0.3.0/24: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 20,
  	    "protocol": "bgp",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "prefix": "10.0.3.0/24",
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true,
  	            "afi": "ipv6"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.3.0/24[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true,
  		    "afi": "ipv6"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.3.0/24[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.254.254.2/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 20,
  	    "protocol": "bgp",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "prefix": "10.254.254.2/32",
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true,
  	            "afi": "ipv6"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.254.254.2/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true,
  		    "afi": "ipv6"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.254.254.2/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2020-10-06 19:07:57,645 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/bgp.py", line 199, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 281, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 555, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 


2020-10-06 19:07:57,925 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/bgp.py", line 199, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 281, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 555, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  



2020-10-06 19:18:31,912 ERROR: 'router_json_cmp' failed after 143.16 seconds
2020-10-06 19:18:31,913 ERROR: assert failed at "test_bgp_evpn_vxlan/test_pe1_converge_evpn": "PE1" JSON output mismatches
assert Generated JSON diff error report:
  
  > $->ifindex: d1 has element with value '8' but in d2 it has value '5'
2020-10-06 19:23:08,903 ERROR: '_bgp_has_routes' failed after 38.60 seconds
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2020-10-06 19:28:14,645 ERROR: 'router_json_cmp' failed after 6.47 seconds
2020-10-06 19:28:14,647 ERROR: assert failed at "test_ospf_topo2/test_ospf_kernel_route": "TopoGear<name="r1",links=["r1-eth0"<->"s1-eth0","r1-eth1"<->"s3-eth0"]> TopoRouter<>" JSON output mistmatches
assert Generated JSON diff error report:
  
  > $->10.0.20.1/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 110,
  	    "destSelected": true,
  	    "protocol": "ospf",
  	    "internalFlags": 8,
  	    "metric": 20,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.20.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth1",
  	            "ip": "10.0.3.2",
  	            "interfaceIndex": 3,
  	            "fib": true,
  	            "flags": 11,
  	            "active": true,
  	            "onLink": true,
  	            "afi": "ipv4"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.20.1/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth1",
  		    "ip": "10.0.3.2",
  		    "interfaceIndex": 3,
  		    "fib": true,
  		    "flags": 11,
  		    "active": true,
  		    "onLink": true,
  		    "afi": "ipv4"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.20.1/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '6' but in d2 it has value '3'
  	
  
  > $->10.0.1.1/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 110,
  	    "protocol": "ospf",
  	    "internalFlags": 0,
  	    "metric": 10,
  	    "internalStatus": 0,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.1.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "ip": "0.0.0.0",
  	            "interfaceIndex": 2,
  	            "flags": 9,
  	            "active": true,
  	            "onLink": true,
  	            "afi": "ipv4"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.1.1/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "ip": "0.0.0.0",
  		    "interfaceIndex": 2,
  		    "flags": 9,
  		    "active": true,
  		    "onLink": true,
  		    "afi": "ipv4"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.1.1/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.0.1.1/32: d2 has the following element at index 1 which is not present in d1: 
  
  	{
  	    "distance": 0,
  	    "destSelected": true,
  	    "protocol": "connected",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.1.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "directlyConnected": true,
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 1 with the following errors: 
  
  	> $->10.0.1.1/32[1]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "directlyConnected": true,
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.1.1/32[1]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.0.3.4/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 0,
  	    "destSelected": true,
  	    "protocol": "connected",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.3.4/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "directlyConnected": true,
  	            "interfaceName": "r1-eth1",
  	            "interfaceIndex": 3,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.3.4/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "directlyConnected": true,
  		    "interfaceName": "r1-eth1",
  		    "interfaceIndex": 3,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.3.4/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '6' but in d2 it has value '3'

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/TP1U1604I386/ErrorLog/log_topotests.txt

Topo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-14590/test

Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt

Successful on other platforms/tests
  • Topo tests part 1 on Ubuntu 18.04 arm8
  • Topo tests part 1 on Ubuntu 16.04 amd64
  • Fedora 29 rpm pkg check
  • IPv6 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 1
  • Debian 8 deb pkg check
  • Topo tests part 0 on Ubuntu 16.04 amd64
  • IPv4 protocols on Ubuntu 18.04
  • Static analyzer (clang)
  • Ubuntu 20.04 deb pkg check
  • Topo tests part 2 on Ubuntu 18.04 arm8
  • Topo tests part 2 on Ubuntu 16.04 i386
  • Topo tests part 0 on Ubuntu 18.04 amd64
  • Ubuntu 18.04 deb pkg check
  • Ubuntu 16.04 deb pkg check
  • Addresssanitizer topotests part 2
  • Topo tests part 0 on Ubuntu 16.04 i386
  • Topo tests part 1 on Ubuntu 18.04 amd64
  • CentOS 7 rpm pkg check
  • Addresssanitizer topotests part 0
  • Topo tests part 2 on Ubuntu 18.04 amd64
  • Debian 10 deb pkg check
  • Debian 9 deb pkg check
  • Topo tests part 2 on Ubuntu 16.04 amd64
  • IPv4 ldp protocol on Ubuntu 18.04

Warnings Generated during build:

Checkout code: Successful with additional warnings
Topo tests part 1 on Ubuntu 16.04 i386: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1604I386-14590/test

Topology Tests failed for Topo tests part 1 on Ubuntu 16.04 i386:

r1 failed SHOW ISIS INTERFACE DETAIL check:
--- actual SHOW ISIS INTERFACE DETAIL
+++ expected SHOW ISIS OSPF6 INTERFACE DETAIL
@@ -1,5 +1,5 @@
 Area test:
-  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xa
+  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xXX
     Type: lan, Level: L1, SNPA: XXXX.XXXX.XXXX
     Level-1 Information:
       Metric: 10, Active neighbors: 0
@@ -13,7 +13,7 @@
     IPv6 Prefixes:
       fc00:0:0:5::1/64
 
-  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xb
+  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xXX
     Type: lan, Level: L2, SNPA: XXXX.XXXX.XXXX
     Level-2 Information:
       Metric: 10, Active neighbors: 0
2020-10-06 19:05:02,563 ERROR: assert failed at "test_all_protocol_startup/test_isis_interfaces": SHOW ISIS INTERFACE DETAIL failed for router r1:
  --- actual SHOW ISIS INTERFACE DETAIL
  +++ expected SHOW ISIS OSPF6 INTERFACE DETAIL
  @@ -1,5 +1,5 @@
   Area test:
  -  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xa
  +  Interface: r1-eth5, State: Up, Active, Circuit Id: 0xXX
       Type: lan, Level: L1, SNPA: XXXX.XXXX.XXXX
       Level-1 Information:
         Metric: 10, Active neighbors: 0
  @@ -13,7 +13,7 @@
       IPv6 Prefixes:
         fc00:0:0:5::1/64
   
  -  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xb
  +  Interface: r1-eth6, State: Up, Active, Circuit Id: 0xXX
       Type: lan, Level: L2, SNPA: XXXX.XXXX.XXXX
       Level-2 Information:
         Metric: 10, Active neighbors: 0
assert 1 == 0
  -1
  +0
2020-10-06 19:07:27,018 ERROR: 'router_json_cmp' failed after 103.72 seconds
2020-10-06 19:07:27,019 ERROR: assert failed at "test_bfd_topo2/test_protocols_convergence": "r1" JSON output mismatches
assert Generated JSON diff error report:
  
  > $->10.0.3.0/24: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 20,
  	    "protocol": "bgp",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "prefix": "10.0.3.0/24",
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true,
  	            "afi": "ipv6"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.3.0/24[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true,
  		    "afi": "ipv6"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.3.0/24[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.254.254.2/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 20,
  	    "protocol": "bgp",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "prefix": "10.254.254.2/32",
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true,
  	            "afi": "ipv6"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.254.254.2/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true,
  		    "afi": "ipv6"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.254.254.2/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2020-10-06 19:07:57,645 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/bgp.py", line 199, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 281, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 555, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 


2020-10-06 19:07:57,925 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/bgp.py", line 199, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 281, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1604I386/topotests/lib/common_config.py", line 555, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  



2020-10-06 19:18:31,912 ERROR: 'router_json_cmp' failed after 143.16 seconds
2020-10-06 19:18:31,913 ERROR: assert failed at "test_bgp_evpn_vxlan/test_pe1_converge_evpn": "PE1" JSON output mismatches
assert Generated JSON diff error report:
  
  > $->ifindex: d1 has element with value '8' but in d2 it has value '5'
2020-10-06 19:23:08,903 ERROR: '_bgp_has_routes' failed after 38.60 seconds
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2020-10-06 19:28:14,645 ERROR: 'router_json_cmp' failed after 6.47 seconds
2020-10-06 19:28:14,647 ERROR: assert failed at "test_ospf_topo2/test_ospf_kernel_route": "TopoGear<name="r1",links=["r1-eth0"<->"s1-eth0","r1-eth1"<->"s3-eth0"]> TopoRouter<>" JSON output mistmatches
assert Generated JSON diff error report:
  
  > $->10.0.20.1/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 110,
  	    "destSelected": true,
  	    "protocol": "ospf",
  	    "internalFlags": 8,
  	    "metric": 20,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.20.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth1",
  	            "ip": "10.0.3.2",
  	            "interfaceIndex": 3,
  	            "fib": true,
  	            "flags": 11,
  	            "active": true,
  	            "onLink": true,
  	            "afi": "ipv4"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.20.1/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth1",
  		    "ip": "10.0.3.2",
  		    "interfaceIndex": 3,
  		    "fib": true,
  		    "flags": 11,
  		    "active": true,
  		    "onLink": true,
  		    "afi": "ipv4"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.20.1/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '6' but in d2 it has value '3'
  	
  
  > $->10.0.1.1/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 110,
  	    "protocol": "ospf",
  	    "internalFlags": 0,
  	    "metric": 10,
  	    "internalStatus": 0,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.1.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "nexthops": [
  	        {
  	            "interfaceName": "r1-eth0",
  	            "ip": "0.0.0.0",
  	            "interfaceIndex": 2,
  	            "flags": 9,
  	            "active": true,
  	            "onLink": true,
  	            "afi": "ipv4"
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.1.1/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "interfaceName": "r1-eth0",
  		    "ip": "0.0.0.0",
  		    "interfaceIndex": 2,
  		    "flags": 9,
  		    "active": true,
  		    "onLink": true,
  		    "afi": "ipv4"
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.1.1/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.0.1.1/32: d2 has the following element at index 1 which is not present in d1: 
  
  	{
  	    "distance": 0,
  	    "destSelected": true,
  	    "protocol": "connected",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.1.1/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "directlyConnected": true,
  	            "interfaceName": "r1-eth0",
  	            "interfaceIndex": 2,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 1 with the following errors: 
  
  	> $->10.0.1.1/32[1]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "directlyConnected": true,
  		    "interfaceName": "r1-eth0",
  		    "interfaceIndex": 2,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.1.1/32[1]->nexthops[0]->interfaceIndex: d1 has element with value '5' but in d2 it has value '2'
  	
  
  > $->10.0.3.4/32: d2 has the following element at index 0 which is not present in d1: 
  
  	{
  	    "distance": 0,
  	    "destSelected": true,
  	    "protocol": "connected",
  	    "internalFlags": 8,
  	    "metric": 0,
  	    "selected": true,
  	    "installed": true,
  	    "internalNextHopNum": 1,
  	    "prefix": "10.0.3.4/32",
  	    "table": 254,
  	    "internalNextHopActiveNum": 1,
  	    "internalStatus": 16,
  	    "nexthops": [
  	        {
  	            "directlyConnected": true,
  	            "interfaceName": "r1-eth1",
  	            "interfaceIndex": 3,
  	            "fib": true,
  	            "flags": 3,
  	            "active": true
  	        }
  	    ]
  	}
  
  	Closest match in d1 is at index 0 with the following errors: 
  
  	> $->10.0.3.4/32[0]->nexthops: d2 has the following element at index 0 which is not present in d1: 
  	
  		{
  		    "directlyConnected": true,
  		    "interfaceName": "r1-eth1",
  		    "interfaceIndex": 3,
  		    "fib": true,
  		    "flags": 3,
  		    "active": true
  		}
  	
  		Closest match in d1 is at index 0 with the following errors: 
  	
  		> $->10.0.3.4/32[0]->nexthops[0]->interfaceIndex: d1 has element with value '6' but in d2 it has value '3'

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/TP1U1604I386/ErrorLog/log_topotests.txt

Topo tests part 0 on Ubuntu 18.04 arm8: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPO0U18ARM8-14590/test

Topology Tests failed for Topo tests part 0 on Ubuntu 18.04 arm8
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/TOPO0U18ARM8/ErrorLog/log_topotests.txt

<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-32087/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #186: FILE: /tmp/f1-32087/thread.h:186:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #234: FILE: /tmp/f1-32087/thread.h:234:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-32087/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-32087/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-32087/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-32087/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-32087/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-32087/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-32087/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-32087/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-32087/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-32087/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-32087/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-32087/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-32087/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-32087/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-32087/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-32087/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-32087/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-32087/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-32087/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-32087/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-32087/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-32087/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-32087/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-32087/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-32087/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Oct 14, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-32087/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #186: FILE: /tmp/f1-32087/thread.h:186:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #234: FILE: /tmp/f1-32087/thread.h:234:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-32087/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-32087/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-32087/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-32087/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-32087/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-32087/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-32087/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-32087/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-32087/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-32087/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-32087/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-32087/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-32087/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-32087/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-32087/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-32087/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-32087/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-32087/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-32087/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-32087/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-32087/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-32087/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-32087/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-32087/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-32087/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14590/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200803-09-g5e17ca3e7-0 (missing) -> 7.5-dev-20200803-09-g5e17ca3e7-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Oct 21, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 b35758d
Date 10/21/2020
Start 07:25:47
Finish 07:51:56
Run-Time 26:09
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-10-21-07:25:47.txt
Log autoscript-2020-10-21-07:26:48.log.bz2
Memory 486 482 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Oct 21, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14889/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-2458/clippy.c:110:
Report for thread.h | 4 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #188: FILE: /tmp/f1-2458/thread.h:188:
< WARNING: function definition argument 'struct thread *' should also have an identifier name
< #236: FILE: /tmp/f1-2458/thread.h:236:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-2458/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-2458/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-2458/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-2458/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-2458/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-2458/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-2458/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-2458/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-2458/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-2458/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-2458/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-2458/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-2458/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-2458/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-2458/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-2458/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-2458/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-2458/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-2458/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-2458/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-2458/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #352: FILE: /tmp/f1-2458/zlog.c:352:
< WARNING: line over 80 characters
< #452: FILE: /tmp/f1-2458/zlog.c:452:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-2458/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-2458/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14889/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201021-09-gb35758d9c-0 (missing) -> 7.6-dev-20201021-09-gb35758d9c-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201021-09-gb35758d9c-0 (missing) -> 7.6-dev-20201021-09-gb35758d9c-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201021-09-gb35758d9c-0 (missing) -> 7.6-dev-20201021-09-gb35758d9c-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201021-09-gb35758d9c-0 (missing) -> 7.6-dev-20201021-09-gb35758d9c-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201021-09-gb35758d9c-0 (missing) -> 7.6-dev-20201021-09-gb35758d9c-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Oct 25, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git merge/6766 76a4927
Date 10/25/2020
Start 12:10:46
Finish 12:37:00
Run-Time 26:14
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-10-25-12:10:46.txt
Log autoscript-2020-10-25-12:11:50.log.bz2
Memory 473 501 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Oct 25, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14968/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:181: trailing whitespace.
  $ readelf --wide -l -n lib/.libs/libfrr.so 
<stdin>:182: trailing whitespace.
  
<stdin>:186: trailing whitespace.
  
<stdin>:202: trailing whitespace.
  
<stdin>:204: trailing whitespace.
  
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Report for clippy.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #110: FILE: /tmp/f1-16464/clippy.c:110:
Report for thread.h | 2 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #189: FILE: /tmp/f1-16464/thread.h:189:
Report for xref.c | 24 issues
===============================================
ERROR: do not initialise globals to NULL
#35: FILE: /tmp/f1-16464/xref.c:35:
+struct xref_block *xref_blocks = NULL;

WARNING: Missing a blank line after declarations
#49: FILE: /tmp/f1-16464/xref.c:49:
+		uint32_t bits = in[0] | (in[1] << 8);
+		if (bp == -1) {

WARNING: braces {} are not necessary for any arm of this statement
#49: FILE: /tmp/f1-16464/xref.c:49:
+		if (bp == -1) {
[...]
+		} else
[...]

ERROR: do not use assignment in if condition
#97: FILE: /tmp/f1-16464/xref.c:97:
+		if ((p = strrchr(filename, '/'))) {

ERROR: do not use assignment in if condition
#98: FILE: /tmp/f1-16464/xref.c:98:
+			if ((q = memrchr(filename, '/', p - filename)))
Report for xref.h | 81 issues
===============================================
ERROR: "foo * const * bar" should be "foo * const *bar"
#112: FILE: /tmp/f1-16464/xref.h:112:
+	const struct xref * const * start;

ERROR: "foo * const * bar" should be "foo * const *bar"
#113: FILE: /tmp/f1-16464/xref.h:113:
+	const struct xref * const * stop;

WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-16464/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-16464/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-16464/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-16464/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-16464/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-16464/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-16464/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-16464/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-16464/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-16464/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-16464/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-16464/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-16464/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-16464/xref.h:210:
+	""                                                                 "\n"\
Report for zlog.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #353: FILE: /tmp/f1-16464/zlog.c:353:
< WARNING: line over 80 characters
< #453: FILE: /tmp/f1-16464/zlog.c:453:
Report for zlog.h | 4 issues
===============================================
< WARNING: line over 80 characters
< #62: FILE: /tmp/f1-16464/zlog.h:62:
< WARNING: line over 80 characters
< #76: FILE: /tmp/f1-16464/zlog.h:76:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-14968/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201025-08-g76a4927f4-0 (missing) -> 7.6-dev-20201025-08-g76a4927f4-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201025-08-g76a4927f4-0 (missing) -> 7.6-dev-20201025-08-g76a4927f4-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201025-08-g76a4927f4-0 (missing) -> 7.6-dev-20201025-08-g76a4927f4-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201025-08-g76a4927f4-0 (missing) -> 7.6-dev-20201025-08-g76a4927f4-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.6-dev-20201025-08-g76a4927f4-0 (missing) -> 7.6-dev-20201025-08-g76a4927f4-0~deb10u1

@donaldsharp donaldsharp self-requested a review October 27, 2020 15:16
@riw777
Copy link
Member

riw777 commented Nov 10, 2020

I see there are some additional warnings on this ... we should probably get those cleaned up before pushing this.

@riw777
Copy link
Member

riw777 commented Dec 15, 2020

@eqvinox -- if we can get the warnings cleaned up, I'll push this ... if you're ready :-)

Copy link
Member

@Jafaral Jafaral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

eqvinox and others added 10 commits February 1, 2021 17:08
Makes more sense to have this as a static inline.  Also I don't want to
be forced to link network.o into clippy ;)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This adds the machinery for cross reference points (hence "xref") for
things to be annotated with source code location or other metadata
and/or to be uniquely identified and found at runtime or by dissecting
executable files.

The extraction tool to walk down an ELF file is done and working but
needs some more cleanup and will be added in a separate commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
Our "true" libraries (i.e. not modules) don't invoke neither
FRR_DAEMON_INFO nor FRR_MODULE_SETUP, hence XREF_SETUP isn't invoked
either.  Invoke it directly to get things working.

Signed-off-by: David Lamparter <equinox@diac24.net>
Just a better way of doing what was previously the "debugargdef" macro.

Signed-off-by: David Lamparter <equinox@diac24.net>
This allows extracting a list of all log messages including their ECs
and autogenerated unique IDs for them.

Signed-off-by: David Lamparter <equinox@diac24.net>
This allows grabbing a list of all DEFUNs and their help texts through
the xref extraction mechanics.

Signed-off-by: David Lamparter <equinox@diac24.net>
Combined with the DEFUN xrefs, this means we can extract the full CLI
tree from a binary file.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
This is the best I can make the asm blocks in lib/xref.h look, so just
mute the warning.  (It shouldn't come in relevant for other code.)

Signed-off-by: David Lamparter <equinox@diac24.net>
@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 1, 2021

Sorry for the tardiness, health shit really did a number on me...

Style warnings should be fixed, with minor exceptions:

  • I disabled one of the warnings (string concatenation) because it's the best formatting possible in this case; the warning should be otherwise irrelevant
  • the macros should not use a trailing semicolon one remains because it's consistent with other locations in FRR (=> overall style question, not relevant to this PR)
  • for one thing in lib/thread.h I seriously couldn't figure out what checkpatch wants

@riw777 @Jafaral poke (just making sure you see this due to the delay)

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 1, 2021

  • I disabled one of the warnings (string concatenation) because it's the best formatting possible in this case; the warning should be otherwise irrelevant

... this only takes effect after the PR is merged, since the CI uses checkpatch from master, not the PR ... so the string concatenation warnings will still be there. (I did check that the change to checkpatch works.)

@LabN-CI
Copy link
Collaborator

LabN-CI commented Feb 1, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6766 acbf514
Date 02/01/2021
Start 13:05:01
Finish 13:44:24
Run-Time 39:23
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-02-01-13:05:01.txt
Log autoscript-2021-02-01-13:06:08.log.bz2
Memory 476 491 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16867/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for thread.h | 2 issues
===============================================
< ERROR: space required after that ',' (ctx:VxV)
< #189: FILE: /tmp/f1-3241/thread.h:189:
Report for xref.h | 73 issues
===============================================
WARNING: macros should not use a trailing semicolon
#140: FILE: /tmp/f1-3241/xref.h:140:
+#define XREF_SETUP()                                                           \
+	static const struct xref _dummy_xref = {                               \
+			.file = __FILE__, .line = __LINE__, .func = "dummy",   \
+			.type = XREFT_NONE,                                    \
+	};                                                                     \
+	static const struct xref * const _dummy_xref_p                         \
+			__attribute__((used, section("xref_array")))           \
+			= &_dummy_xref;                                        \
+	static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
+			_xref_init(void) {                                     \
+		static struct xref_block _xref_block = {                       \
+			.start = __start_xref_array,                           \
+			.stop = __stop_xref_array,                             \
+		};                                                             \
+		xref_block_add(&_xref_block);                                  \
+	}                                                                      \
+	asm(XREF_NOTE);                                                        \
+	/* end */

WARNING: Consecutive strings are generally better as a single string
#197: FILE: /tmp/f1-3241/xref.h:197:
+	""                                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#198: FILE: /tmp/f1-3241/xref.h:198:
+	"	.type _frr_xref_note," asmspecial "object"                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#199: FILE: /tmp/f1-3241/xref.h:199:
+	"	.pushsection .note.FRR,\"a\"," asmspecial "note"           "\n"\

WARNING: Consecutive strings are generally better as a single string
#200: FILE: /tmp/f1-3241/xref.h:200:
+	"	.p2align 2"                                                "\n"\

WARNING: Consecutive strings are generally better as a single string
#201: FILE: /tmp/f1-3241/xref.h:201:
+	"_frr_xref_note:"                                                  "\n"\

WARNING: Consecutive strings are generally better as a single string
#202: FILE: /tmp/f1-3241/xref.h:202:
+	"	.long	9"                                                 "\n"\

WARNING: Consecutive strings are generally better as a single string
#204: FILE: /tmp/f1-3241/xref.h:204:
+	"	.ascii	\"XREF\""                                          "\n"\

WARNING: Consecutive strings are generally better as a single string
#205: FILE: /tmp/f1-3241/xref.h:205:
+	"	.ascii	\"FRRouting\\0\\0\\0\""                            "\n"\

WARNING: Consecutive strings are generally better as a single string
#206: FILE: /tmp/f1-3241/xref.h:206:
+	"	" _NOTE_PTR "	__start_xref_array-."                      "\n"\

WARNING: Consecutive strings are generally better as a single string
#207: FILE: /tmp/f1-3241/xref.h:207:
+	"	" _NOTE_PTR "	__stop_xref_array-."                       "\n"\

WARNING: Consecutive strings are generally better as a single string
#208: FILE: /tmp/f1-3241/xref.h:208:
+	"	.size _frr_xref_note, .-_frr_xref_note"                    "\n"\

WARNING: Consecutive strings are generally better as a single string
#209: FILE: /tmp/f1-3241/xref.h:209:
+	"	.popsection"                                               "\n"\

WARNING: Consecutive strings are generally better as a single string
#210: FILE: /tmp/f1-3241/xref.h:210:
+	""                                                                 "\n"\

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16867/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210201-12-gacbf5146a-0 (missing) -> 7.7-dev-20210201-12-gacbf5146a-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210201-12-gacbf5146a-0 (missing) -> 7.7-dev-20210201-12-gacbf5146a-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210201-12-gacbf5146a-0 (missing) -> 7.7-dev-20210201-12-gacbf5146a-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210201-12-gacbf5146a-0 (missing) -> 7.7-dev-20210201-12-gacbf5146a-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210201-12-gacbf5146a-0 (missing) -> 7.7-dev-20210201-12-gacbf5146a-0~deb10u1

@riw777
Copy link
Member

riw777 commented Feb 2, 2021

changes look good -- thanks!

@riw777 riw777 merged commit 8f57f74 into FRRouting:master Feb 2, 2021
@donaldsharp
Copy link
Member

This is failing to build for me with this configure:
./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --libexecdir=\${prefix}/lib/frr --enable-exampledir=/usr/share/doc/frr/examples/ --localstatedir=/var/run/frr --sbindir=/usr/lib/frr --sysconfdir=/etc/frr --enable-ospfapi=yes --enable-multipath=128 --enable-user=frr --enable-group=frr --enable-vty-group=frrvty --enable-configfile-mask=0640 --enable-logfile-mask=0640 --enable-rtadv --with-libpam --enable-systemd=yes --enable-cumulus=yes --enable-vtysh=yes --with-vtysh-pager=cat --enable-snmp --enable-bgp-vnc=yes --enable-sharpd=yes --enable-realms --enable-protobuf --enable-snmp --enable-config-rollbacks --enable-zeromq --enable-fpm --enable-cumulus --enable-rpki --enable-bfdd --enable-irdp=yes --enable-protobuf=yes --enable-grpc --enable-scripting --enable-pathd CC=gcc --enable-dev-build

This gets us closer:

index 11796bc4f..891a72f2b 100644
--- a/lib/xref.h
+++ b/lib/xref.h
@@ -139,14 +139,15 @@ extern const struct xref * const __stop_xref_array[1] DSO_LOCAL;
  */
 #define XREF_SETUP()                                                           \
        static const struct xref _dummy_xref = {                               \
-                       .file = __FILE__, .line = __LINE__, .func = "dummy",   \
-                       .type = XREFT_NONE,                                    \
+               .type = XREFT_NONE,                                            \
+               .line = __LINE__,                                              \
+               .file = __FILE__,                                              \
+               .func = "dummy",                                               \
        };                                                                     \
-       static const struct xref * const _dummy_xref_p                         \
-                       __attribute__((used, section("xref_array")))           \
-                       = &_dummy_xref;                                        \
-       static void __attribute__((used, _CONSTRUCTOR(1100)))                  \
-                       _xref_init(void) {                                     \
+       static const struct xref *const _dummy_xref_p                          \
+               __attribute__((used, section("xref_array"))) = &_dummy_xref;   \
+       static void __attribute__((used, _CONSTRUCTOR(1100))) _xref_init(void) \
+       {                                                                      \
                static struct xref_block _xref_block = {                       \
                        .start = __start_xref_array,                           \
                        .stop = __stop_xref_array,                             \
@@ -223,16 +224,12 @@ extern const struct xref * const __stop_xref_array[1] DSO_LOCAL;
 /* initializer for a "struct xref" */
 #define XREF_INIT(type_, xrefdata_, func_)                                     \
        {                                                                      \
-               .type = (type_), .xrefdata = (xrefdata_),                      \
-               .file = __FILE__, .line = __LINE__, .func = func_,             \
+               .xrefdata = (xrefdata_), .type = (type_), .line = __LINE__,    \
+               .file = __FILE__, .func = func_,                               \
        }                                                                      \
        /* end */
 
 /* use with XREF_INIT when outside of a function, i.e. no __func__ */
 #define XREF_NO_FUNC   "<global>"
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _FRR_XREF_H */

Am still getting build failures.

@eqvinox can you fix this?

@donaldsharp
Copy link
Member

I suspect it's a combination of --enable-grpc and --enable-protobuf=yes

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

Argh. Yes, this code predates the C++ compatibility push. I'm looking at it.

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

@mwinter-osr sidenote: do we have a build with these flags (--enable-grpc --enable-protobuf=yes) enabled in CI? This shouldn't have passed 😦

@donaldsharp
Copy link
Member

We talked about adding these two flags to one of the CI systems in today's tech meeting.

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

Well... it's hitting a GCC bug... from 2009... https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41091

(It works in clang.)

I'm pondering what to do, the simplest thing is to disable ID generation in C++ code. (This doesn't break anything else, like the logging code can still get file/line/function from the struct xref object; the ID field will just be zeroes...)

...but... lemme think... I could probably slap a constructor on it & get it fully functional too ... hmm

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

Sidenote: the GCC bug might break SystemTap trace points too, I don't think those are used anywhere in C++ code yet(?)

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

Got a workaround, I think. Testing...

@eqvinox
Copy link
Contributor Author

eqvinox commented Feb 2, 2021

fixed in #8004

@eqvinox eqvinox deleted the xref branch February 2, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libfrr tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants