Commit Graph

1211 Commits

Author SHA1 Message Date
Chrissie Caulfield
026aaa7bde Merge pull request #230 from jnpkrn/log_thread
Med: log_thread: logt_wthread_lock is vital for logging thread
2016-10-21 15:43:17 +01:00
Chrissie Caulfield
7e5212b6a3 Merge pull request #228 from jnpkrn/maint
Various cleanups (symbol imports, typos, doc)
2016-10-21 15:31:13 +01:00
Jan Pokorný
ca710b2505
Refactor: log_thread: fix and diminish inferior comments 2016-10-21 09:42:48 +02:00
Jan Pokorný
07542cf693
Med: log_thread: logt_wthread_lock is vital for logging thread
This fixes issue with would-fail-if-applied-to-thread-right-away
qb_log_thread_priority_set invocation when logging thread doesn't
exist yet, which will arrange for calling itself at the time of
thread's birth that is the moment it will actually fail.
In this + lock-could-not-have-been-initialized corner cases, the
already running thread would proceed as allowed by error condition
handling in the main thread, trying to dereference uninitialized
(or outdated) pointer to the lock at hand, resulting in segfault.

Also include the test that would have been caught that (we use the
fact that it doesn't matter whether setting of the scheduler parameters
fails due to bad input or just because of lack of privileges as it's
the failure at the right moment that is of our interest).

See also:
https://github.com/ClusterLabs/libqb/issues/229
2016-10-21 09:42:16 +02:00
Christine Caulfield
e13d15e993 tests: Unit test for previous zero tag patch
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-20 14:52:52 +01:00
Christine Caulfield
0d6a698931 log: Remove check for HAVE_SCHED_GET_PRIORITY_MAX
it doesn't exist

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-20 09:50:12 +01:00
Jan Pokorný
0d90bcb0ad
tests: SIGSTOP cannot be caught, blocked, or ignored
...per signal(7), so it is foolish trying to do so.
2016-10-19 00:40:56 +02:00
Christine Caulfield
b40c499d7d log: Don't overwrite valid tags
If a tag of 0 is passed into the logger and an existing callsite
is found with a non-zero tag, the don't overwrite the existing tag.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2016-10-18 14:30:28 +01:00
Jan Pokorný
6743206b72
Low: ipc_shm: fix superfluous NULL check
That's what qb_rb_chunk_reclaim does since commit
ef77398738 that made this
check redundant.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2016-10-17 19:48:19 +02:00
Jan Pokorný
617730b3ed
doc: elaborate more on thread safety as it's not so pure 2016-10-17 18:25:03 +02:00
Jan Pokorný
d107a2ab3b
Low: further sanitize qbipc[cs].h public headers wrt. includes 2016-10-17 17:41:37 +02:00
Jan Pokorný
ab78f2a4fd
Low: sanitize import of <poll.h> symbols 2016-10-17 17:39:09 +02:00
Jan Pokorný
c1c26c94cb
Low: sanitize import of <qb/qbarray.h> symbols 2016-10-17 17:25:50 +02:00
Jan Pokorný
b7f6dae97a
Fix typos: availabi{l -> li}ty, explici{lt -> tl}y 2016-10-12 20:10:22 +02:00
Christine Caulfield
2f6f5892fe Merge branch 'jnpkrn-Svante-Signell-Hurd' 2016-10-11 15:25:07 +01:00
Christine Caulfield
e77383897e Merge branch 'Svante-Signell-Hurd' of https://github.com/jnpkrn/libqb into jnpkrn-Svante-Signell-Hurd 2016-10-11 15:24:50 +01:00
Chrissie Caulfield
164ba7b6af Merge pull request #226 from jnpkrn/maint
Maint: fix typos + resources.test
2016-10-11 10:02:57 +01:00
Jan Pokorný
8cc165a87b
tests: resources: check for proper names of leftover processes
Unfortunately, the change in test names introduced with commit e990681
hadn't been reflected (until now).

Also reformat shell syntax per more usual convention.
2016-10-07 21:14:07 +02:00
Jan Pokorný
485885597c
Fix typos: differ{ne -> en}t, is -> if 2016-10-07 21:13:17 +02:00
Chrissie Caulfield
e3d569c331 Merge pull request #224 from jnpkrn/maint
Maint: typo + unused functions checked in configure
2016-10-04 09:09:11 +01:00
Jan Pokorný
d2b15efe60
Fix typo: asyncronous -> asynchronous 2016-09-30 14:26:15 +02:00
Jan Pokorný
db7dcd1411
Build: configure: do not check for unused "sched" functions
Do not compile-time-conditionalize based on one of them being available,
either.
2016-09-30 14:24:46 +02:00
Chrissie Caulfield
04442d41d5 Merge pull request #223 from jnpkrn/maint
maint: qb-blackbox man page should accompany the binary
2016-09-23 09:45:47 +01:00
Jan Pokorný
6da5cc1368
maint: qb-blackbox man page should accompany the binary 2016-09-22 20:59:40 +02:00
Chrissie Caulfield
4dff79e3f3 Merge pull request #218 from wferi/apropos
docs: qbdefs.h: description must directly follow @file
2016-08-01 11:07:58 +01:00
Ferenc Wágner
d7aaae8497 docs: qbdefs.h: description must directly follow @file
If we want to see it again in the man page NAME section, where it can
be indexed by apropos or whatis.
2016-07-31 14:03:34 +02:00
Chrissie Caulfield
495389d03a Merge pull request #221 from jnpkrn/typo-qblog.h
Fix typo: qblog.h: q{g -> b}_log_filter_ctl
2016-06-30 08:31:31 +01:00
Jan Pokorný
bf3abb45c1
Fix typo: qblog.h: q{g -> b}_log_filter_ctl 2016-06-29 13:25:06 +02:00
Chrissie Caulfield
84b131c27e Merge pull request #217 from jnpkrn/log-serialize-check-char-properly
Low: log: check for appropriate space when serializing a char
2016-06-20 08:52:53 +01:00
Christine Caulfield
22ac41108e log: Add missing z,j, & t types to the logger
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Ken Gaillot <kgaillot@redhat.com>
Reviewed-by: Jan Pokorný <jpokorny@redhat.com>
2016-06-20 08:37:13 +01:00
Jan Pokorný
17e5a36b18
Low: log: check for appropriate space when serializing a char
... where appropriate space is measured for, surprisingly, a char,
not for an int.  Note that's also the actual type used for both
de-/serializing, so there's no conflict.

Also bother to explain why, now surprisingly for real, an unsigned int
is scraped out from va_list (akin to to STDARG(3)).
2016-06-17 16:42:36 +02:00
Chrissie Caulfield
907e49b999 Merge pull request #213 from liu4480/master
low:fixed:Spelling error of failure in qbhdb.h
2016-06-06 09:49:38 +01:00
bin.liu
afcdcba16c low:fixed:Spelling error of failure in qbhdb.h
There are spelling error in include/qb/qbhdb.h, "failure" is
wroten as "faliure"
2016-06-06 09:49:29 +08:00
Chrissie Caulfield
70340f72f6 Merge pull request #211 from jnpkrn/CI-travis-clang
CI: make travis use also clang compiler (for good measure)
2016-05-06 12:36:55 +01:00
Jan Pokorný
43efb5197c
CI: make travis use also clang compiler (for good measure)
Also, unify the indentation.
2016-05-05 16:20:13 +02:00
Jan Pokorný
c61ee802d9
tests: make clang-friendly (avoid using run-time VLAs)
This is to also get libqb from the Debian's shame list:
http://clang.debian.net/status.php?version=3.4.2&key=VARIABLE_LENGTH_ARRAY
2016-05-05 16:19:28 +02:00
Chrissie Caulfield
0f1523ff09 Merge pull request #210 from jnpkrn/tests-ensure-failure-output
tests: ensure verbose output on failure w/ more recent automake
2016-04-29 10:08:04 +01:00
Jan Pokorný
8ab2799599
tests: ensure verbose output on failure w/ more recent automake
...so as to obtain a first glance diagnostics in all cases with possibly
remote build system preventing other means of investigation.
2016-04-28 21:56:05 +02:00
Chrissie Caulfield
267c2492e6 Merge pull request #209 from jnpkrn/header-based-versioning-PATCH-to-MICRO
API: header-based versioning: s/PATCH/MICRO
2016-04-19 10:56:28 +01:00
Jan Pokorný
5accb7ae8c
API: header-based versioning: s/PATCH/MICRO
Under the influence of libxml2 and considering that actual "patch"
information in fact, if significant, ends up encoded in QB_VER_REST,
shift away from convention codified, e.g., by semver.org (not adored
by libqb, anyway) and rename designated PATCH component of the version
to MICRO accordingly.

Note that at this point, after a release without any header-based
versioning present and just a few commits after it was tentatively
introduced, it's a painless change.  Once this PATCH nomenclature
is leaked into a full release, there's no way to get rid of it
reasonably...
2016-04-18 19:08:28 +02:00
Chrissie Caulfield
6f2b3e85d0 Merge pull request #208 from jnpkrn/update-git-version-gen
build: use latest git-version-gen from gnulib (rev. 6118065)
2016-04-07 14:04:39 +01:00
Chrissie Caulfield
15176fc360 Merge pull request #207 from jnpkrn/alternative-header-based-versioning
API: introduce alternative, header-based versioning
2016-04-07 14:04:17 +01:00
Jan Pokorný
bd31052e7d
build: persuade git-version-gen vMAJOR.MINOR tags just miss .0
Recent "v1.0" discovered this discrepancy propagated all around
and also this is not very compatible with the logic of commit 26d3911.

Treat missing "patch" component of the version as an implicit zero
to make such oddity go away.

Adjust spec file generation accordingly.
2016-04-04 16:08:18 +02:00
Jan Pokorný
5e1aef1ba4
build: use latest git-version-gen from gnulib (rev. 6118065)
Preserve, however, the modification by David Vossel to keep the script
working as expected also with lightweight tags (e.g., v1.0rc3).
2016-04-04 15:32:01 +02:00
Jan Pokorný
137b3dea5b
API: introduce alternative, header-based versioning
Mainly as a light-weight alternative to full-blown autoconf/pkg-config
machineries, whereby one can:

* workaround functionality not present in libqb up to 1.0 (inclusive)
  - note that this versioning schema is being introduced *after*
    1.0.0 release so one cannot tell that version from any older,
    but will be able to safely identify any later one (1.0.1+)
    and act accordingly
  - example:
  #if !defined(QB_VER_MAJOR) || ((QB_VER_MAJOR == 1) && (QB_VER_MINOR < 1))
  #warning "Feature X not supported"
  int do_foo(int arg) { };
  #else
  int
  do_foo(int arg)
  {
      /* use feature X of libqb */
  }
  #endif

* make its program report libqb API version it was built with by
  emitting QB_VER_STR symbolic string (see tests/print_ver.c for example)

Also added is a print_ver test program to:

* emit how original unparsed version is parsed to particular components
  defined in qbconfig.h (QB_VER_{MAJOR,MINOR,PATCH} symbolic integer
  constants and QB_VER_REST symbolic string) when being compiled

* emit mentioned QB_VER_STR symbolic string joining the components
  back to a single string, plus the components themselves

Resolves: https://github.com/ClusterLabs/libqb/issues/186
2016-04-01 23:19:40 +02:00
Chrissie Caulfield
67af307953 Merge pull request #196 from jnpkrn/demystify-qblog.h
Low: explain mysterious lines in a public header (qblog.h)
2016-04-01 16:01:14 +01:00
Chrissie Caulfield
6677fe6971 Merge pull request #191 from jnpkrn/refactor-test-case-defs
tests: refactor test case defs using versatile add_tcase macro
2016-04-01 15:44:36 +01:00
Chrissie Caulfield
6fc24f855b Merge pull request #205 from jnpkrn/docs-fix-make-doxygen
docs: fix "make doxygen" target not generating anything
2016-03-18 08:24:37 +00:00
Jan Pokorný
3ed7c63aef
docs: fix "make doxygen" target not generating anything 2016-03-17 20:33:30 +01:00
Chrissie Caulfield
b2d159f7ba Merge pull request #201 from jnpkrn/splint-better-support
build: better support for splint checker
2016-03-17 14:29:03 +00:00