1.0.2-15 - Evolution of the previous (rhbz#1478089)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
parent
1799fc0be2
commit
93fffaf298
@ -1,4 +1,4 @@
|
|||||||
From 47f007a9bbdbfcdb1df6736dddde64f9c6381b58 Mon Sep 17 00:00:00 2001
|
From 5e5370134377bbec66060d9adb5673973239981b Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||||
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
||||||
Subject: [PATCH 1/6] Med: qblog.h: better explanation + behaviour of
|
Subject: [PATCH 1/6] Med: qblog.h: better explanation + behaviour of
|
||||||
@ -46,7 +46,7 @@ Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|||||||
1 file changed, 40 insertions(+), 5 deletions(-)
|
1 file changed, 40 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/include/qb/qblog.h b/include/qb/qblog.h
|
diff --git a/include/qb/qblog.h b/include/qb/qblog.h
|
||||||
index 3cb4eef..4954932 100644
|
index 3cb4eef..99ead1b 100644
|
||||||
--- a/include/qb/qblog.h
|
--- a/include/qb/qblog.h
|
||||||
+++ b/include/qb/qblog.h
|
+++ b/include/qb/qblog.h
|
||||||
@@ -42,6 +42,10 @@ extern "C" {
|
@@ -42,6 +42,10 @@ extern "C" {
|
||||||
@ -110,11 +110,11 @@ index 3cb4eef..4954932 100644
|
|||||||
+ /* our own (target's) sanity, or possibly that of higher priority \
|
+ /* our own (target's) sanity, or possibly that of higher priority \
|
||||||
+ symbol resolution site (unless target equals end executable) \
|
+ symbol resolution site (unless target equals end executable) \
|
||||||
+ or even the lower one if no such predecessor defines these */ \
|
+ or even the lower one if no such predecessor defines these */ \
|
||||||
+ assert("non-empty implicit callsite section" \
|
+ assert("implicit callsite section is populated" \
|
||||||
+ && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP); } \
|
+ && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP); } \
|
||||||
void __attribute__ ((constructor)) name(void);
|
void __attribute__ ((constructor)) name(void);
|
||||||
#else
|
#else
|
||||||
#define QB_LOG_INIT_DATA(name)
|
#define QB_LOG_INIT_DATA(name)
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f400d33a3ce8ca04248a6602441a40b878eadf2c Mon Sep 17 00:00:00 2001
|
From 454610697b9790da14c6115b0dd8b9fe3754dd0f Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||||
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
||||||
Subject: [PATCH 3/6] tests: new sort of tests dubbed "functional", cover
|
Subject: [PATCH 3/6] tests: new sort of tests dubbed "functional", cover
|
||||||
@ -95,11 +95,11 @@ can observe a somewhat simpler story (DEP ~ "depends"):
|
|||||||
[*3] both client and interlib logging not working
|
[*3] both client and interlib logging not working
|
||||||
|
|
||||||
[*A] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
[*A] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
||||||
which fails on 'non-empty implicit callsite section' assertion
|
which fails on 'implicit callsite section is populated' assertion
|
||||||
[*B] boils down to [*1], unless QB_LOG_INIT_DATA used on interlib side,
|
[*B] boils down to [*1], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which fails on 'non-empty implicit callsite section' assertion
|
which fails on 'implicit callsite section is populated' assertion
|
||||||
[*C] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
[*C] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which fails on 'non-empty implicit callsite section' assertion
|
which fails on 'implicit callsite section is populated' assertion
|
||||||
[*D] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
[*D] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which makes it boil down just to [*1] (hypothesis: mere internal
|
which makes it boil down just to [*1] (hypothesis: mere internal
|
||||||
self-reference to the section's boundary symbols makes them
|
self-reference to the section's boundary symbols makes them
|
||||||
@ -1067,5 +1067,5 @@ index 0000000..145b9f4
|
|||||||
+ "- results stored in '_results/<timestamp>_<input_name>[_<tag>]'" \
|
+ "- results stored in '_results/<timestamp>_<input_name>[_<tag>]'" \
|
||||||
+ || do_proceed "$@"
|
+ || do_proceed "$@"
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 260768d94017023771af9e7f1bddcff91883617a Mon Sep 17 00:00:00 2001
|
From b36464c9487ec2b56caa1e99e58bc74c43774577 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||||
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
||||||
Subject: [PATCH 4/6] Med: add extra run-time (client, libqb) checks that
|
Subject: [PATCH 4/6] Med: add extra run-time (client, libqb) checks that
|
||||||
@ -82,41 +82,41 @@ change (and extending log_test_mock.sh so as to capture syslog
|
|||||||
stream within the container), not much changes with the table above,
|
stream within the container), not much changes with the table above,
|
||||||
i.e., X(b) .. ld.bfd = 2.29:
|
i.e., X(b) .. ld.bfd = 2.29:
|
||||||
[*A] in addition, unless QB_LOG_INIT_DATA used on client side,
|
[*A] in addition, unless QB_LOG_INIT_DATA used on client side,
|
||||||
syslog carries this warning:
|
syslog carries this notice:
|
||||||
"(LOG@QB) target chain supplied section not observed by libqb,
|
"(libqb) log module hasn't observed target chain supplied callsite
|
||||||
target's and/or libqb's linkage at fault and logging of the target
|
section, target's and/or libqb's build is at fault, preventing
|
||||||
will not work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context, or target chain built purposefully without
|
context unexpectedly, or target chain built purposefully without
|
||||||
callsite section)"
|
these sections)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*C] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
[*C] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
syslog carries this warning:
|
syslog carries this notice:
|
||||||
"(LOG@QB) target chain supplied section not observed by libqb,
|
"(libqb) log module hasn't observed target chain supplied callsite
|
||||||
target's and/or libqb's linkage at fault and logging of the target
|
section, target's and/or libqb's build is at fault, preventing
|
||||||
will not work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context, or target chain built purposefully without
|
context unexpectedly, or target chain built purposefully without
|
||||||
callsite section)"
|
these sections)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*E] in addition, unless QB_LOG_INIT_DATA used on client side,
|
[*E] in addition, unless QB_LOG_INIT_DATA used on client side,
|
||||||
syslog carries this warning:
|
syslog carries this warning:
|
||||||
"(LOG@QB) target chain supplied section empty, target's and/or
|
"(libqb) log module has observed target chain supplied section
|
||||||
libqb's linkage at fault and logging of the target will not
|
unpopulated, target's and/or libqb's build is at fault, preventing
|
||||||
work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context)"
|
context unexpectedly)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*F] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
[*F] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
syslog carries this warning:
|
syslog carries this warning:
|
||||||
"(LOG@QB) target chain supplied section empty, target's and/or
|
"(libqb) log module has observed target chain supplied section
|
||||||
libqb's linkage at fault and logging of the target will not
|
unpopulated, target's and/or libqb's build is at fault, preventing
|
||||||
work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context)"
|
context unexpectedly)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*G] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
[*G] in addition, unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
syslog carries this warning:
|
syslog carries this warning:
|
||||||
"(LOG@QB) target chain supplied section empty, target's and/or
|
"(libqb) log module has observed target chain supplied section
|
||||||
libqb's linkage at fault and logging of the target will not
|
unpopulated, target's and/or libqb's build is at fault, preventing
|
||||||
work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context)"
|
context unexpectedly)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
|
|
||||||
but desirably changes with "X(b) .. ld.bfd = 2.29.1" one
|
but desirably changes with "X(b) .. ld.bfd = 2.29.1" one
|
||||||
@ -139,33 +139,33 @@ but desirably changes with "X(b) .. ld.bfd = 2.29.1" one
|
|||||||
|
|
||||||
[*A] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
[*A] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"non-empty implicit callsite section, otherwise target's linkage at
|
"implicit callsite section is populated, otherwise target's build
|
||||||
fault and logging would not work reliably"
|
is at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
[*B] boils down to [*1], unless QB_LOG_INIT_DATA used on interlib side,
|
[*B] boils down to [*1], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"non-empty implicit callsite section, otherwise target's linkage at
|
"implicit callsite section is populated, otherwise target's build
|
||||||
fault and logging would not work reliably"
|
is at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
[*C] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
[*C] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"non-empty implicit callsite section, otherwise target's linkage at
|
"implicit callsite section is populated, otherwise target's build
|
||||||
fault and logging would not work reliably"
|
is at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
[*E] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
[*E] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"implicit callsite section self-observable, otherwise target's and/or
|
"implicit callsite section is self-observable, otherwise target's
|
||||||
libqb's linkage at fault and logging would not work reliably"
|
and/or libqb's build is at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
[*F] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
[*F] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"libqb's callsite section non-empty, otherwise libqb's linkage at
|
"libqb's callsite section is populated, otherwise libqb's build is
|
||||||
fault and logging would not work reliably"
|
at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
[*G] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
[*G] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side,
|
||||||
which then fails on
|
which then fails on
|
||||||
"implicit callsite section self-observable, otherwise target's and/or
|
"implicit callsite section is self-observable, otherwise target's
|
||||||
libqb's linkage at fault and logging would not work reliably"
|
and/or libqb's build is at fault, preventing reliable logging"
|
||||||
assertion
|
assertion
|
||||||
|
|
||||||
[*I] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
[*I] boils down to [*1], unless QB_LOG_INIT_DATA used on client side,
|
||||||
@ -175,30 +175,30 @@ libqb's linkage at fault and logging would not work reliably"
|
|||||||
which makes it, likely through self-reference keepalive (see
|
which makes it, likely through self-reference keepalive (see
|
||||||
below), work OK
|
below), work OK
|
||||||
[*K] boils down to [*3]
|
[*K] boils down to [*3]
|
||||||
in addition, syslog carries this warning:
|
in addition, syslog carries this notice:
|
||||||
"(LOG@QB) target chain supplied section not observed by libqb,
|
"(libqb) log module hasn't observed target chain supplied callsite
|
||||||
target's and/or libqb's linkage at fault and logging of the target
|
section, target's and/or libqb's build is at fault, preventing
|
||||||
will not work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context, or target chain built purposefully without
|
context unexpectedly, or target chain built purposefully without
|
||||||
callsite section)"
|
these sections)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*L] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side
|
[*L] boils down to [*3], unless QB_LOG_INIT_DATA used on interlib side
|
||||||
(sufficient?), which makes it, likely through self-reference
|
(sufficient?), which makes it, likely through self-reference
|
||||||
keepalive (see below), boil down just to [*1];
|
keepalive (see below), boil down just to [*1];
|
||||||
in addition, syslog carries this warning:
|
in addition, syslog carries this notice:
|
||||||
"(LOG@QB) target chain supplied section not observed by libqb,
|
"(libqb) log module hasn't observed target chain supplied callsite
|
||||||
target's and/or libqb's linkage at fault and logging of the target
|
section, target's and/or libqb's build is at fault, preventing
|
||||||
will not work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context, or target chain built purposefully without
|
context unexpectedly, or target chain built purposefully without
|
||||||
callsite section)"
|
these sections)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*M] boils down to [*1];
|
[*M] boils down to [*1];
|
||||||
in addition, syslog carries this warning:
|
in addition, syslog carries this notice:
|
||||||
"(LOG@QB) target chain supplied section not observed by libqb,
|
"(libqb) log module hasn't observed target chain supplied callsite
|
||||||
target's and/or libqb's linkage at fault and logging of the target
|
section, target's and/or libqb's build is at fault, preventing
|
||||||
will not work reliably (unless qb_log_init function used unexpectedly
|
reliable logging (unless qb_log_init invoked in no-custom-logging
|
||||||
in no-logging context, or target chain built purposefully without
|
context unexpectedly, or target chain built purposefully without
|
||||||
callsite section)"
|
these sections)"
|
||||||
logged by libqb proper
|
logged by libqb proper
|
||||||
[*N] boils down to [*M], unless QB_LOG_INIT_DATA used on client side,
|
[*N] boils down to [*M], unless QB_LOG_INIT_DATA used on client side,
|
||||||
which makes it, likely through self-reference keepalive (see
|
which makes it, likely through self-reference keepalive (see
|
||||||
@ -235,15 +235,15 @@ which the current build system/code shake is all about.
|
|||||||
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
||||||
---
|
---
|
||||||
configure.ac | 1 +
|
configure.ac | 1 +
|
||||||
include/qb/qblog.h | 111 ++++++++++++++++++++++--------
|
include/qb/qblog.h | 108 ++++++++++++++++++++++--------
|
||||||
lib/libqb.pc.in | 3 +-
|
lib/libqb.pc.in | 3 +-
|
||||||
lib/log.c | 53 ++++++++++++++
|
lib/log.c | 51 ++++++++++++++
|
||||||
tests/functional/Makefile.am | 3 +-
|
tests/functional/Makefile.am | 3 +-
|
||||||
tests/functional/log.am | 2 +-
|
tests/functional/log.am | 2 +-
|
||||||
tests/functional/log_external/Makefile.am | 8 ++-
|
tests/functional/log_external/Makefile.am | 8 ++-
|
||||||
tests/functional/log_test_mock.sh | 13 +++-
|
tests/functional/log_test_mock.sh | 13 +++-
|
||||||
tests/functional/syslog-stdout.py | 51 ++++++++++++++
|
tests/functional/syslog-stdout.py | 51 ++++++++++++++
|
||||||
9 files changed, 209 insertions(+), 36 deletions(-)
|
9 files changed, 205 insertions(+), 35 deletions(-)
|
||||||
create mode 100755 tests/functional/syslog-stdout.py
|
create mode 100755 tests/functional/syslog-stdout.py
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
@ -259,7 +259,7 @@ index 8c588cb..fdcd93c 100644
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
diff --git a/include/qb/qblog.h b/include/qb/qblog.h
|
diff --git a/include/qb/qblog.h b/include/qb/qblog.h
|
||||||
index 4954932..a9a9ef2 100644
|
index d09b21c..7be1390 100644
|
||||||
--- a/include/qb/qblog.h
|
--- a/include/qb/qblog.h
|
||||||
+++ b/include/qb/qblog.h
|
+++ b/include/qb/qblog.h
|
||||||
@@ -1,9 +1,10 @@
|
@@ -1,9 +1,10 @@
|
||||||
@ -305,7 +305,7 @@ index 4954932..a9a9ef2 100644
|
|||||||
*
|
*
|
||||||
* @par Configuring log targets.
|
* @par Configuring log targets.
|
||||||
* A log target can be syslog, stderr, the blackbox, stdout, or a text file.
|
* A log target can be syslog, stderr, the blackbox, stdout, or a text file.
|
||||||
@@ -283,35 +285,86 @@ typedef void (*qb_log_filter_fn)(struct qb_log_callsite * cs);
|
@@ -283,35 +285,85 @@ typedef void (*qb_log_filter_fn)(struct qb_log_callsite * cs);
|
||||||
extern struct qb_log_callsite QB_ATTR_SECTION_START[];
|
extern struct qb_log_callsite QB_ATTR_SECTION_START[];
|
||||||
extern struct qb_log_callsite QB_ATTR_SECTION_STOP[];
|
extern struct qb_log_callsite QB_ATTR_SECTION_STOP[];
|
||||||
|
|
||||||
@ -345,11 +345,11 @@ index 4954932..a9a9ef2 100644
|
|||||||
+ dlsym(work_handle, QB_ATTR_SECTION_START_STR); \
|
+ dlsym(work_handle, QB_ATTR_SECTION_START_STR); \
|
||||||
+ work_s2 = (struct qb_log_callsite *) \
|
+ work_s2 = (struct qb_log_callsite *) \
|
||||||
+ dlsym(work_handle, QB_ATTR_SECTION_STOP_STR); \
|
+ dlsym(work_handle, QB_ATTR_SECTION_STOP_STR); \
|
||||||
+ assert("libqb's callsite section observable, otherwise libqb's \
|
+ assert("libqb's callsite section is observable, otherwise \
|
||||||
+linkage at fault and logging would not work reliably" \
|
+libqb's build is at fault, preventing reliable logging" \
|
||||||
+ && work_s1 != NULL && work_s2 != NULL); \
|
+ && work_s1 != NULL && work_s2 != NULL); \
|
||||||
+ assert("libqb's callsite section non-empty, otherwise libqb's \
|
+ assert("libqb's callsite section is populated, otherwise \
|
||||||
+linkage at fault and logging would not work reliably" \
|
+libqb's build is at fault, preventing reliable logging" \
|
||||||
+ && work_s1 != work_s2); \
|
+ && work_s1 != work_s2); \
|
||||||
+ dlclose(work_handle); } }
|
+ dlclose(work_handle); } }
|
||||||
+#endif /* _GNU_SOURCE */
|
+#endif /* _GNU_SOURCE */
|
||||||
@ -386,24 +386,22 @@ index 4954932..a9a9ef2 100644
|
|||||||
/* our own (target's) sanity, or possibly that of higher priority \
|
/* our own (target's) sanity, or possibly that of higher priority \
|
||||||
symbol resolution site (unless target equals end executable) \
|
symbol resolution site (unless target equals end executable) \
|
||||||
or even the lower one if no such predecessor defines these */ \
|
or even the lower one if no such predecessor defines these */ \
|
||||||
- assert("non-empty implicit callsite section" \
|
- assert("implicit callsite section is populated" \
|
||||||
- && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP); } \
|
|
||||||
+ if ((work_handle = dlopen(NULL, RTLD_LOCAL|RTLD_LAZY)) != NULL) { \
|
+ if ((work_handle = dlopen(NULL, RTLD_LOCAL|RTLD_LAZY)) != NULL) { \
|
||||||
+ work_s1 = (struct qb_log_callsite *) \
|
+ work_s1 = (struct qb_log_callsite *) \
|
||||||
+ dlsym(work_handle, QB_ATTR_SECTION_START_STR); \
|
+ dlsym(work_handle, QB_ATTR_SECTION_START_STR); \
|
||||||
+ work_s2 = (struct qb_log_callsite *) \
|
+ work_s2 = (struct qb_log_callsite *) \
|
||||||
+ dlsym(work_handle, QB_ATTR_SECTION_STOP_STR); \
|
+ dlsym(work_handle, QB_ATTR_SECTION_STOP_STR); \
|
||||||
+ assert("implicit callsite section observable, otherwise \
|
+ assert("implicit callsite section is observable, otherwise \
|
||||||
+target's and/or libqb's linkage at fault and logging would not work \
|
+target's and/or libqb's build is at fault, preventing reliable logging" \
|
||||||
+reliably" \
|
|
||||||
+ && work_s1 != NULL && work_s2 != NULL); \
|
+ && work_s1 != NULL && work_s2 != NULL); \
|
||||||
+ dlclose(work_handle); /* perhaps overly eager thing to do */ } \
|
+ dlclose(work_handle); /* perhaps overly eager thing to do */ } \
|
||||||
+ /* better targeted attestations when available */ \
|
+ /* better targeted attestations when available */ \
|
||||||
+ QB_NONAPI_LOG_INIT_DATA_EXTRA_; \
|
+ QB_NONAPI_LOG_INIT_DATA_EXTRA_; \
|
||||||
+ /* finally, original, straightforward check */ \
|
+ /* finally, original, straightforward check */ \
|
||||||
+ assert("non-empty implicit callsite section, otherwise target's \
|
+ assert("implicit callsite section is populated, otherwise \
|
||||||
+linkage at fault and logging would not work reliably" \
|
+target's build is at fault, preventing reliable logging" \
|
||||||
+ && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP); } \
|
&& QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP); } \
|
||||||
void __attribute__ ((constructor)) name(void);
|
void __attribute__ ((constructor)) name(void);
|
||||||
#else
|
#else
|
||||||
#define QB_LOG_INIT_DATA(name)
|
#define QB_LOG_INIT_DATA(name)
|
||||||
@ -425,7 +423,7 @@ index 8a8d0ba..37d27b7 100644
|
|||||||
+Libs.private: @LIBS@
|
+Libs.private: @LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
diff --git a/lib/log.c b/lib/log.c
|
diff --git a/lib/log.c b/lib/log.c
|
||||||
index bfd218f..eb35d6f 100644
|
index bfd218f..c5fecc5 100644
|
||||||
--- a/lib/log.c
|
--- a/lib/log.c
|
||||||
+++ b/lib/log.c
|
+++ b/lib/log.c
|
||||||
@@ -853,6 +853,18 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
|
@@ -853,6 +853,18 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
|
||||||
@ -474,36 +472,34 @@ index bfd218f..eb35d6f 100644
|
|||||||
qb_log_callsites_register(QB_ATTR_SECTION_START, QB_ATTR_SECTION_STOP);
|
qb_log_callsites_register(QB_ATTR_SECTION_START, QB_ATTR_SECTION_STOP);
|
||||||
dl_iterate_phdr(_log_so_walk_callback, NULL);
|
dl_iterate_phdr(_log_so_walk_callback, NULL);
|
||||||
_log_so_walk_dlnames();
|
_log_so_walk_dlnames();
|
||||||
@@ -884,6 +916,27 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
|
@@ -884,6 +916,25 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
|
||||||
_log_target_state_set(&conf[QB_LOG_SYSLOG], QB_LOG_STATE_ENABLED);
|
_log_target_state_set(&conf[QB_LOG_SYSLOG], QB_LOG_STATE_ENABLED);
|
||||||
(void)qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
|
(void)qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
|
||||||
QB_LOG_FILTER_FILE, "*", priority);
|
QB_LOG_FILTER_FILE, "*", priority);
|
||||||
+
|
+
|
||||||
+ if (preinit_err == preinit_err_target_sec)
|
+ if (preinit_err == preinit_err_target_sec)
|
||||||
+ qb_util_log(LOG_WARNING, "(LOG@QB) target chain supplied"
|
+ qb_util_log(LOG_NOTICE, "(libqb) log module hasn't observed"
|
||||||
+ " section not observed by libqb,"
|
+ " target chain supplied callsite"
|
||||||
+ " target's and/or libqb's linkage"
|
+ " section, target's and/or libqb's"
|
||||||
+ " at fault and logging of the target"
|
+ " build is at fault, preventing"
|
||||||
+ " will not work reliably (unless"
|
+ " reliable logging (unless qb_log_init"
|
||||||
+ " qb_log_init function used"
|
+ " invoked in no-custom-logging context"
|
||||||
+ " unexpectedly in no-logging"
|
+ " unexpectedly, or target chain built"
|
||||||
+ " context, or target chain built"
|
+ " purposefully without these sections)");
|
||||||
+ " purposefully without callsite"
|
|
||||||
+ " sections)");
|
|
||||||
+ else if (preinit_err == preinit_err_target_empty) {
|
+ else if (preinit_err == preinit_err_target_empty) {
|
||||||
+ qb_util_log(LOG_WARNING, "(LOG@QB) target chain supplied"
|
+ qb_util_log(LOG_WARNING, "(libqb) log module has observed"
|
||||||
+ " section empty, target's and/or"
|
+ " target chain supplied section"
|
||||||
+ " libqb's linkage at fault and"
|
+ " unpopulated, target's and/or libqb's"
|
||||||
+ " logging of the target will not"
|
+ " build is at fault, preventing"
|
||||||
+ " work reliably (unless qb_log_init"
|
+ " reliable logging (unless qb_log_init"
|
||||||
+ " function used unexpectedly in"
|
+ " invoked in no-custom-logging context"
|
||||||
+ " no-logging context)");
|
+ " unexpectedly)");
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
diff --git a/tests/functional/Makefile.am b/tests/functional/Makefile.am
|
diff --git a/tests/functional/Makefile.am b/tests/functional/Makefile.am
|
||||||
index 0d34ae8..522fb61 100644
|
index 33dde48..4d9071f 100644
|
||||||
--- a/tests/functional/Makefile.am
|
--- a/tests/functional/Makefile.am
|
||||||
+++ b/tests/functional/Makefile.am
|
+++ b/tests/functional/Makefile.am
|
||||||
@@ -19,5 +19,6 @@
|
@@ -19,5 +19,6 @@
|
||||||
@ -515,11 +511,10 @@ index 0d34ae8..522fb61 100644
|
|||||||
+ log_test_mock.sh syslog-stdout.py
|
+ log_test_mock.sh syslog-stdout.py
|
||||||
SUBDIRS = log_external log_internal
|
SUBDIRS = log_external log_internal
|
||||||
diff --git a/tests/functional/log.am b/tests/functional/log.am
|
diff --git a/tests/functional/log.am b/tests/functional/log.am
|
||||||
index e8e4740..80bccb0 100644
|
index 8976b6c..f2c6fbc 100644
|
||||||
--- a/tests/functional/log.am
|
--- a/tests/functional/log.am
|
||||||
+++ b/tests/functional/log.am
|
+++ b/tests/functional/log.am
|
||||||
@@ -20,7 +20,7 @@
|
@@ -21,6 +21,6 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
|
||||||
CLEANFILES = log_test_client.err.real log_test_interlib_client.err.real
|
CLEANFILES = log_test_client.err.real log_test_interlib_client.err.real
|
||||||
|
|
||||||
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
|
-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||||
@ -528,7 +523,7 @@ index e8e4740..80bccb0 100644
|
|||||||
noinst_PROGRAMS = log_client log_interlib_client
|
noinst_PROGRAMS = log_client log_interlib_client
|
||||||
# cannot use {check,noinst}_LTLIBRARIES because it leads to solely static lib
|
# cannot use {check,noinst}_LTLIBRARIES because it leads to solely static lib
|
||||||
diff --git a/tests/functional/log_external/Makefile.am b/tests/functional/log_external/Makefile.am
|
diff --git a/tests/functional/log_external/Makefile.am b/tests/functional/log_external/Makefile.am
|
||||||
index 36aa0af..ca1c8a5 100644
|
index 018c836..b1b568a 100644
|
||||||
--- a/tests/functional/log_external/Makefile.am
|
--- a/tests/functional/log_external/Makefile.am
|
||||||
+++ b/tests/functional/log_external/Makefile.am
|
+++ b/tests/functional/log_external/Makefile.am
|
||||||
@@ -19,5 +19,9 @@
|
@@ -19,5 +19,9 @@
|
||||||
@ -627,5 +622,5 @@ index 0000000..64baf4c
|
|||||||
+if __name__ == '__main__':
|
+if __name__ == '__main__':
|
||||||
+ main(*argv)
|
+ main(*argv)
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From cd5d104895f018cf90480dc84f09f32f6dcc2b3c Mon Sep 17 00:00:00 2001
|
From ae47b6941efa0565de5e1187585a2ee54132e653 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||||
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
||||||
Subject: [PATCH 5/6] High: bare fix for libqb logging not working with
|
Subject: [PATCH 5/6] High: bare fix for libqb logging not working with
|
||||||
@ -543,9 +543,9 @@ index a9a9ef2..00adb3a 100644
|
|||||||
{ Dl_info work_dli; \
|
{ Dl_info work_dli; \
|
||||||
/* libqb sanity (locating libqb by it's relatively unique \
|
/* libqb sanity (locating libqb by it's relatively unique \
|
||||||
-- and currently only such per-linkage global one -- \
|
-- and currently only such per-linkage global one -- \
|
||||||
@@ -310,6 +314,23 @@ linkage at fault and logging would not work reliably" \
|
@@ -310,6 +314,23 @@ libqb's build is at fault, preventing reliable logging" \
|
||||||
assert("libqb's callsite section non-empty, otherwise libqb's \
|
assert("libqb's callsite section is populated, otherwise \
|
||||||
linkage at fault and logging would not work reliably" \
|
libqb's build is at fault, preventing reliable logging" \
|
||||||
&& work_s1 != work_s2); \
|
&& work_s1 != work_s2); \
|
||||||
+ dlclose(work_handle); } \
|
+ dlclose(work_handle); } \
|
||||||
+ /* sanity of the target site originating this check alone */ \
|
+ /* sanity of the target site originating this check alone */ \
|
||||||
@ -567,16 +567,16 @@ index a9a9ef2..00adb3a 100644
|
|||||||
dlclose(work_handle); } }
|
dlclose(work_handle); } }
|
||||||
#endif /* _GNU_SOURCE */
|
#endif /* _GNU_SOURCE */
|
||||||
|
|
||||||
@@ -355,8 +376,7 @@ target's and/or libqb's linkage at fault and logging would not work \
|
@@ -354,8 +375,7 @@ libqb's build is at fault, preventing reliable logging" \
|
||||||
reliably" \
|
target's and/or libqb's build is at fault, preventing reliable logging" \
|
||||||
&& work_s1 != NULL && work_s2 != NULL); \
|
&& work_s1 != NULL && work_s2 != NULL); \
|
||||||
dlclose(work_handle); /* perhaps overly eager thing to do */ } \
|
dlclose(work_handle); /* perhaps overly eager thing to do */ } \
|
||||||
- /* better targeted attestations when available */ \
|
- /* better targeted attestations when available */ \
|
||||||
- QB_NONAPI_LOG_INIT_DATA_EXTRA_; \
|
- QB_NONAPI_LOG_INIT_DATA_EXTRA_; \
|
||||||
+ QB_NONAPI_LOG_INIT_DATA_EXTRA_(name); \
|
+ QB_NONAPI_LOG_INIT_DATA_EXTRA_(name); \
|
||||||
/* finally, original, straightforward check */ \
|
/* finally, original, straightforward check */ \
|
||||||
assert("non-empty implicit callsite section, otherwise target's \
|
assert("implicit callsite section is populated, otherwise \
|
||||||
linkage at fault and logging would not work reliably" \
|
target's build is at fault, preventing reliable logging" \
|
||||||
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
||||||
index 0bebeb5..1572cff 100644
|
index 0bebeb5..1572cff 100644
|
||||||
--- a/lib/Makefile.am
|
--- a/lib/Makefile.am
|
||||||
@ -788,5 +788,5 @@ index 0000000..f037fca
|
|||||||
@@ -0,0 +1 @@
|
@@ -0,0 +1 @@
|
||||||
+/* this is an empty linker script having a role of a NO-OP link object */
|
+/* this is an empty linker script having a role of a NO-OP link object */
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 8ae46f6c7a2e9c518fec635b8f7afb1b1dbc710f Mon Sep 17 00:00:00 2001
|
From 5ae933f0c3bf1685cf7251ee3db96fe401030be0 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||||||
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
Date: Fri, 6 Oct 2017 17:17:26 +0200
|
||||||
Subject: [PATCH 6/6] Low: fix internal object symbol's leak & expose run-time
|
Subject: [PATCH 6/6] Low: fix internal object symbol's leak & expose run-time
|
||||||
@ -193,5 +193,5 @@ index 19fca2c..98df44c 100644
|
|||||||
+[MAIN |debug] ../log_client.c:69:hello
|
+[MAIN |debug] ../log_client.c:69:hello
|
||||||
[libqb|error] log_blackbox.c:196:qb_log_blackbox_print_from_file:
|
[libqb|error] log_blackbox.c:196:qb_log_blackbox_print_from_file:
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.1
|
||||||
|
|
||||||
|
12
libqb.spec
12
libqb.spec
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: libqb
|
Name: libqb
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 14%{?dist}
|
Release: 15%{?dist}
|
||||||
Summary: An IPC library for high performance servers
|
Summary: An IPC library for high performance servers
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -30,9 +30,6 @@ and polling.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -S git_am
|
%autosetup -p1 -S git_am
|
||||||
|
|
||||||
## Make sure the timestamps are correct
|
|
||||||
#find . -exec touch \{\} \;
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%configure --disable-static
|
%configure --disable-static
|
||||||
@ -40,8 +37,8 @@ make %{?_smp_mflags} V=1
|
|||||||
|
|
||||||
%if 0%{?with_check}
|
%if 0%{?with_check}
|
||||||
%check
|
%check
|
||||||
make V=1 check \
|
make VERBOSE=1 check \
|
||||||
&& make -C tests/functional/log_internal V=1 check
|
&& make -C tests/functional/log_internal VERBOSE=1 check
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -78,6 +75,9 @@ developing applications that use %{name}.
|
|||||||
%{_mandir}/man3/qb*3*
|
%{_mandir}/man3/qb*3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 12 2017 Jan Pokorný <jpokorny+rpm-libqb@redhat.com> - 1.0.2-15
|
||||||
|
- Evolution of the previous (rhbz#1478089)
|
||||||
|
|
||||||
* Wed Nov 15 2017 Jan Pokorný <jpokorny+rpm-libqb@redhat.com> - 1.0.2-14
|
* Wed Nov 15 2017 Jan Pokorný <jpokorny+rpm-libqb@redhat.com> - 1.0.2-14
|
||||||
- Evolution of the previous (rhbz#1478089)
|
- Evolution of the previous (rhbz#1478089)
|
||||||
- Make -devel package dependency on the main package arch-qualified
|
- Make -devel package dependency on the main package arch-qualified
|
||||||
|
Loading…
Reference in New Issue
Block a user