Hello community, here is the log from the commit of package libqb for openSUSE:Factory checked in at 2015-05-02 21:31:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqb (Old) and /work/SRC/openSUSE:Factory/.libqb.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libqb" Changes: -------- --- /work/SRC/openSUSE:Factory/libqb/libqb.changes 2015-03-18 13:01:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libqb.new/libqb.changes 2015-05-02 21:31:19.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Apr 30 12:30:07 UTC 2015 - ygao@suse.com + +- loop: fixes resource starvation in mainloop code +- Upstream version cs: c3bcf25b72bf451c2ef79ec3946a1c48077a50a0 + +------------------------------------------------------------------- Old: ---- libqb-0.17.1.git20150305.8355269.tar.bz2 New: ---- libqb-0.17.1.git20150429.c3bcf25.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqb.spec ++++++ --- /var/tmp/diff_new_pack.Nkd683/_old 2015-05-02 21:31:20.000000000 +0200 +++ /var/tmp/diff_new_pack.Nkd683/_new 2015-05-02 21:31:20.000000000 +0200 @@ -17,7 +17,7 @@ Name: libqb -Version: 0.17.1.git20150305.8355269 +Version: 0.17.1.git20150429.c3bcf25 Release: 0 Summary: An IPC library for high performance servers License: LGPL-2.1+ ++++++ _service ++++++ --- /var/tmp/diff_new_pack.Nkd683/_old 2015-05-02 21:31:20.000000000 +0200 +++ /var/tmp/diff_new_pack.Nkd683/_new 2015-05-02 21:31:20.000000000 +0200 @@ -11,7 +11,7 @@ <param name="version">0.17.1</param> --> <param name="versionformat">0.17.1+git%cd.%h</param> - <param name="revision">83552692aa5425e50049b130eb2e17ea7b31217d</param> + <param name="revision">c3bcf25b72bf451c2ef79ec3946a1c48077a50a0</param> </service> <service name="recompress" mode="disabled"> ++++++ libqb-0.17.1.git20150305.8355269.tar.bz2 -> libqb-0.17.1.git20150429.c3bcf25.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/HEAD new/libqb-0.17.1.git20150429.c3bcf25/.git/HEAD --- old/libqb-0.17.1.git20150305.8355269/.git/HEAD 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/HEAD 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -ref: refs/heads/master diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/ORIG_HEAD new/libqb-0.17.1.git20150429.c3bcf25/.git/ORIG_HEAD --- old/libqb-0.17.1.git20150305.8355269/.git/ORIG_HEAD 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/ORIG_HEAD 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -83552692aa5425e50049b130eb2e17ea7b31217d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/config new/libqb-0.17.1.git20150429.c3bcf25/.git/config --- old/libqb-0.17.1.git20150305.8355269/.git/config 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/config 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[remote "origin"] - url = git://github.com/ClusterLabs/libqb.git - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "master"] - remote = origin - merge = refs/heads/master diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/description new/libqb-0.17.1.git20150429.c3bcf25/.git/description --- old/libqb-0.17.1.git20150305.8355269/.git/description 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/description 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/applypatch-msg.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/applypatch-msg.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/applypatch-msg.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/applypatch-msg.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -test -x "$GIT_DIR/hooks/commit-msg" && - exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} -: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/commit-msg.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/commit-msg.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/commit-msg.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/commit-msg.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^(.*>).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/post-update.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/post-update.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/post-update.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/post-update.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-applypatch.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-applypatch.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-applypatch.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-applypatch.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} -: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-commit.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-commit.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-commit.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-commit.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-push.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-push.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-push.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-push.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# <local ref> <local sha1> <remote ref> <remote sha1> -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -IFS=' ' -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - else - if [ "$remote_sha" = $z40 ] - then - # New branch, examine all commits - range="$local_sha" - else - # Update to existing branch, examine new commits - range="$remote_sha..$local_sha" - fi - - # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` - if [ -n "$commit" ] - then - echo "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-rebase.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-rebase.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-rebase.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/pre-rebase.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up-to-date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -exit 0 - -################################################################ - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/prepare-commit-msg.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/prepare-commit-msg.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/prepare-commit-msg.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/prepare-commit-msg.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first comments out the -# "Conflicts:" part of a merge commit. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^(.*>).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/hooks/update.sample new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/update.sample --- old/libqb-0.17.1.git20150305.8355269/.git/hooks/update.sample 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/hooks/update.sample 1970-01-01 01:00:00.000000000 +0100 @@ -1,128 +0,0 @@ -#!/bin/sh -# -# An example hook script to blocks unannotated tags from entering. -# Called by "git receive-pack" with arguments: refname sha1-old sha1-new -# -# To enable this hook, rename this file to "update". -# -# Config -# ------ -# hooks.allowunannotated -# This boolean sets whether unannotated tags will be allowed into the -# repository. By default they won't be. -# hooks.allowdeletetag -# This boolean sets whether deleting tags will be allowed in the -# repository. By default they won't be. -# hooks.allowmodifytag -# This boolean sets whether a tag may be modified after creation. By default -# it won't be. -# hooks.allowdeletebranch -# This boolean sets whether deleting branches will be allowed in the -# repository. By default they won't be. -# hooks.denycreatebranch -# This boolean sets whether remotely creating branches will be denied -# in the repository. By default this is allowed. -# - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 <ref> <oldrev> <newrev>)" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 <ref> <oldrev> <newrev>" >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero="0000000000000000000000000000000000000000" -if [ "$newrev" = "$zero" ]; then - newrev_type=delete -else - newrev_type=$(git cat-file -t $newrev) -fi - -case "$refname","$newrev_type" in - refs/tags/*,commit) - # un-annotated tag - short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 Files old/libqb-0.17.1.git20150305.8355269/.git/index and new/libqb-0.17.1.git20150429.c3bcf25/.git/index differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/info/exclude new/libqb-0.17.1.git20150429.c3bcf25/.git/info/exclude --- old/libqb-0.17.1.git20150305.8355269/.git/info/exclude 2015-03-09 17:02:18.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/info/exclude 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/logs/HEAD new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/HEAD --- old/libqb-0.17.1.git20150305.8355269/.git/logs/HEAD 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/HEAD 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 1425916942 +0100 clone: from git://github.com/ClusterLabs/libqb.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/logs/refs/heads/master new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/refs/heads/master --- old/libqb-0.17.1.git20150305.8355269/.git/logs/refs/heads/master 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/refs/heads/master 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 1425916942 +0100 clone: from git://github.com/ClusterLabs/libqb.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/logs/refs/remotes/origin/HEAD new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/refs/remotes/origin/HEAD --- old/libqb-0.17.1.git20150305.8355269/.git/logs/refs/remotes/origin/HEAD 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/logs/refs/remotes/origin/HEAD 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 1425916942 +0100 clone: from git://github.com/ClusterLabs/libqb.git Files old/libqb-0.17.1.git20150305.8355269/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.idx and new/libqb-0.17.1.git20150429.c3bcf25/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.idx differ Files old/libqb-0.17.1.git20150305.8355269/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.pack and new/libqb-0.17.1.git20150429.c3bcf25/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.pack differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/packed-refs new/libqb-0.17.1.git20150429.c3bcf25/.git/packed-refs --- old/libqb-0.17.1.git20150305.8355269/.git/packed-refs 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/packed-refs 1970-01-01 01:00:00.000000000 +0100 @@ -1,68 +0,0 @@ -# pack-refs with: peeled fully-peeled -65933318882f6c975578dba43e1fc27eb43157d5 refs/remotes/origin/eventfd -27bea015fcf1dc773016adf07feac681d068531d refs/remotes/origin/gh-pages -3d4be7fa8018d520869fced8472a28da1f54cca5 refs/remotes/origin/maint-0.5 -83552692aa5425e50049b130eb2e17ea7b31217d refs/remotes/origin/master -b40fa6a87478e6a6572bb68bf2ad9d8fa334f1ce refs/remotes/origin/mingw -3372064f98f9a453fd1a4b2a1aa98670f3fa0f60 refs/remotes/origin/no-sock-block -f878118d9388534ca96d74763fc9d0c74e313a67 refs/remotes/origin/speed -9191fe783aac63c86eceda14f887fdf953abb2f9 refs/tags/libqb-0.0.0 -^69d77500dfc96f139f380d6b90b793bcb04b0619 -6a50cd6dda2d067555c509877f0a5bc0e92b3f49 refs/tags/libqb-0.1.0 -^80544249528b05e3999215e892728f270a56defe -fff6f1bbc0a6e266b5b73d81cc4e51e207c58183 refs/tags/v0.1.0 -^80544249528b05e3999215e892728f270a56defe -834b4d6e9f9e7d9a9dc537d20ca73ec59ae90f68 refs/tags/v0.10.0 -^362b0dccd458a08fa8f5394db5eb5ebeac36a9ee -6e153667273bb10f82d304581b60ba3ec39c001d refs/tags/v0.10.1 -^1c8a9d6461859860f2c8c2d10250a2ce1ebc56e8 -49310898e3dd183e430d5679351b91580222f232 refs/tags/v0.11.0 -^418471e6c1b916cca2f02c2234447cc99ac78c9b -973c32144cc8cf32ff929df35c5c38bf9237d604 refs/tags/v0.11.1 -^50f07abcfe7010360f697d1f26b56fec863d892f -9145d188cb1fa81d9c04fb2847603359a50e4d4e refs/tags/v0.12.0 -^0b8aeb66c82525edf5801369751abadcd2811239 -4ef15502ae194340349646e73f54022b853e82c9 refs/tags/v0.13.0 -^955d43eae698a5eded78234420491171825c7e98 -83d3799f041a64924ea939581991cd0e9e4a06bd refs/tags/v0.14.0 -^1c2b77f005a8011471af11839b7e1b67d147e10d -de60db63ad2801aaaf826284d92be916fef4a0d1 refs/tags/v0.14.1 -^5470bf5625353c3eaeac2ee0eb75704d0e02a691 -7ed428162b031e903d9e7fcda61ebf9b069cda96 refs/tags/v0.14.2 -^d54e8b1e8c3235918d57e1f1657efc3bb1b4bd4a -a6a7809726d43cdf442e23f7347e4bf2dfc5eaf1 refs/tags/v0.14.3 -^92ada8c4d1b0d8ba2380971f64cfaaf35ad1fd23 -9ae3d5f2ede74ec11caba673eb890e20169c96a8 refs/tags/v0.14.4 -^848242a7860c5a7e19240c2ded053fa9908af9e0 -27a6bcdb754ea847c1eec40e97e41f54ace42924 refs/tags/v0.15.0 -^986b92d3918a6fccec58e173d9f4dfe53d878635 -46e5cea42f8195fb514b39862b6782f89153eee4 refs/tags/v0.16.0 -^75f7ed373758b3cb9087e89e4fae17379dd7b483 -c7cbc7cdf0e34adf865e5cdec8daf46a6e5786bc refs/tags/v0.17.0 -^78978d07ac2f19a801ebde61379ac55359cc17f3 -78978d07ac2f19a801ebde61379ac55359cc17f3 refs/tags/v0.17.0.rc1 -312f3e562ce93d6c676088b66934a894c79837df refs/tags/v0.17.1 -^3f7de657855bb9fb4e58777851735bf663fa7f3f -d2b8c8cc781b175ce5cc4a6de49f4b46f1be54a5 refs/tags/v0.17.1-rc1 -c1c58f48f175c7eddd6ae2dc44545c3cc85bd126 refs/tags/v0.2.0 -^21fc479b92f111a5cb208b8b9d432afafedb9a32 -ecc2405e71b8035bd3c8ba4e25da454312da5bf3 refs/tags/v0.3.0 -^01838c18c631ad2be8f3dfd39799a92863b9be48 -cc47ad114f1157ed8ec0df264c6ee180828883bc refs/tags/v0.4.0 -^f647c79693c9136e93283620bfbeaa815eac298d -70a792cc653bf064e4840cae99d9c2eace8a06f8 refs/tags/v0.4.1 -^ea704d58210e76104fe17d017e8e455ea00904cd -70bc9a333008eccbbef03238b2269bddff4257c8 refs/tags/v0.5.0 -^a69482ade6e212cba7250fa7dc30ed251ab9041c -497d500fbf254fe112a8bfe32a6e84d377c10f3c refs/tags/v0.5.1 -^e910830b269cc4fa6b0b92c1041bf454c708cfd2 -d186bcc37af7df92a90e58d2ac135b1178b404b4 refs/tags/v0.6.0 -^750d6e2fa579df6dbc6ac0fa7ddd550d5ac9d008 -682f2c392cc12759c451dd52b6911b73efa3c78d refs/tags/v0.7.0 -^ce18956cc2148329a3bffc6789c8084c026ca5b9 -e7e1ced04d40c201c8a1d248e74c27f82b29d072 refs/tags/v0.8.0 -^e15a48254ab4a006e659e3f881b417a4d983cb28 -3e5a38958c6e50b035d4042615f1ccedf65d0fff refs/tags/v0.8.1 -^e0d55fe8f789598faba2d7a173d07c2e8e9a2005 -a329208c50b985950cc393ed70a165eb5ba4f643 refs/tags/v0.9.0 -^297970af0369e958685dc796fd39896728cc0bab diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/refs/heads/master new/libqb-0.17.1.git20150429.c3bcf25/.git/refs/heads/master --- old/libqb-0.17.1.git20150305.8355269/.git/refs/heads/master 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/refs/heads/master 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -83552692aa5425e50049b130eb2e17ea7b31217d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/.git/refs/remotes/origin/HEAD new/libqb-0.17.1.git20150429.c3bcf25/.git/refs/remotes/origin/HEAD --- old/libqb-0.17.1.git20150305.8355269/.git/refs/remotes/origin/HEAD 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/.git/refs/remotes/origin/HEAD 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -ref: refs/remotes/origin/master diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/configure.ac new/libqb-0.17.1.git20150429.c3bcf25/configure.ac --- old/libqb-0.17.1.git20150305.8355269/configure.ac 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/configure.ac 2015-04-30 14:25:06.000000000 +0200 @@ -253,10 +253,14 @@ nongcc_memory_barrier_needed=yes ;; arm*) - AC_MSG_RESULT([ia64]) + AC_MSG_RESULT([arm]) AC_DEFINE_UNQUOTED([QB_ARCH_ARM], [1], [arm]) arch_force_shmlba=yes ;; + hppa*) + AC_MSG_RESULT([hppa]) + AC_DEFINE_UNQUOTED([QB_ARCH_HPPA], [1], [hppa]) + ;; mips*) AC_MSG_RESULT([ia64]) AC_DEFINE_UNQUOTED([QB_ARCH_MIPS], [1], [mips]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/docs/Makefile.am new/libqb-0.17.1.git20150429.c3bcf25/docs/Makefile.am --- old/libqb-0.17.1.git20150305.8355269/docs/Makefile.am 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/docs/Makefile.am 2015-04-30 14:25:06.000000000 +0200 @@ -32,12 +32,12 @@ $(dist_man_MANS): man.dox $(dependant_headers) - @mkdir -p man3 - @doxygen man.dox + mkdir -p man3 + doxygen man.dox doxygen: html.dox - @mkdir -p html - @doxygen html.dox + mkdir -p html + doxygen html.dox else doxygen: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/docs/html.dox.in new/libqb-0.17.1.git20150429.c3bcf25/docs/html.dox.in --- old/libqb-0.17.1.git20150305.8355269/docs/html.dox.in 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/docs/html.dox.in 2015-04-30 14:25:06.000000000 +0200 @@ -32,7 +32,6 @@ DISTRIBUTE_GROUP_DOC = YES SUBGROUPING = NO TYPEDEF_HIDES_STRUCT = YES -SYMBOL_CACHE_SIZE = 0 EXTRACT_ALL = YES EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES @@ -108,7 +107,6 @@ HTML_FOOTER = HTML_TIMESTAMP = NO HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES HTML_DYNAMIC_SECTIONS = NO GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" @@ -131,7 +129,6 @@ DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NO -USE_INLINE_TREES = NO TREEVIEW_WIDTH = 250 FORMULA_FONTSIZE = 10 SEARCHENGINE = YES @@ -188,7 +185,7 @@ MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES -DOT_FONTNAME = FreeSans +DOT_FONTNAME = DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = YES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/docs/man.dox.in new/libqb-0.17.1.git20150429.c3bcf25/docs/man.dox.in --- old/libqb-0.17.1.git20150305.8355269/docs/man.dox.in 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/docs/man.dox.in 2015-04-30 14:25:06.000000000 +0200 @@ -32,7 +32,6 @@ DISTRIBUTE_GROUP_DOC = YES SUBGROUPING = NO TYPEDEF_HIDES_STRUCT = YES -SYMBOL_CACHE_SIZE = 0 EXTRACT_ALL = YES EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES @@ -136,7 +135,7 @@ MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO -DOT_FONTNAME = FreeSans +DOT_FONTNAME = DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = NO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/include/qb/qbatomic.h new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbatomic.h --- old/libqb-0.17.1.git20150305.8355269/include/qb/qbatomic.h 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbatomic.h 2015-04-30 14:25:06.000000000 +0200 @@ -52,7 +52,7 @@ * You must not directly read integers or pointers concurrently * accessed by multiple threads, but use the atomic accessor functions * instead. That is, always use qb_atomic_int_get() and qb_atomic_pointer_get() - * for read outs. They provide the neccessary synchonization mechanisms + * for read outs. They provide the necessary synchonization mechanisms * like memory barriers to access memory locations concurrently. * * If you are using those functions for anything apart from diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/include/qb/qbipc_common.h new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbipc_common.h --- old/libqb-0.17.1.git20150305.8355269/include/qb/qbipc_common.h 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbipc_common.h 2015-04-30 14:25:06.000000000 +0200 @@ -31,6 +31,11 @@ #endif /* *INDENT-ON* */ +/** + * @file qbipc_common.h + * common types and definitions + */ + struct qb_ipc_request_header { int32_t id __attribute__ ((aligned(8))); int32_t size __attribute__ ((aligned(8))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/include/qb/qbipcs.h new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbipcs.h --- old/libqb-0.17.1.git20150305.8355269/include/qb/qbipcs.h 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbipcs.h 2015-04-30 14:25:06.000000000 +0200 @@ -237,7 +237,7 @@ void qb_ipcs_destroy(qb_ipcs_service_t* s); /** - * Limit the incomming request rate. + * Limit the incoming request rate. * @param s service instance * @param rl the new rate */ @@ -245,7 +245,7 @@ enum qb_ipcs_rate_limit rl); /** - * Send a response to a incomming request. + * Send a response to a incoming request. * * @param c connection instance * @param data the message to send @@ -260,7 +260,7 @@ size_t size); /** - * Send a response to a incomming request. + * Send a response to a incoming request. * * @param c connection instance * @param iov the iovec struct that points to the message to send diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/include/qb/qbutil.h new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbutil.h --- old/libqb-0.17.1.git20150305.8355269/include/qb/qbutil.h 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/include/qb/qbutil.h 2015-04-30 14:25:06.000000000 +0200 @@ -36,10 +36,10 @@ /** * @file qbutil.h - * @author Angus Salkeld <asalkeld@redhat.com> - * * These are some convience functions used throughout libqb. * + * @author Angus Salkeld <asalkeld@redhat.com> + * * @par Locking * - qb_thread_lock_create() * - qb_thread_lock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/lib/loop_poll.c new/libqb-0.17.1.git20150429.c3bcf25/lib/loop_poll.c --- old/libqb-0.17.1.git20150305.8355269/lib/loop_poll.c 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/lib/loop_poll.c 2015-04-30 14:25:06.000000000 +0200 @@ -110,7 +110,7 @@ pe->item.user_data); if (res < 0) { _poll_entry_mark_deleted_(pe); - } else { + } else if (pe->state != QB_POLL_ENTRY_DELETED) { pe->state = QB_POLL_ENTRY_ACTIVE; pe->ufd.revents = 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/lib/ringbuffer.c new/libqb-0.17.1.git20150429.c3bcf25/lib/ringbuffer.c --- old/libqb-0.17.1.git20150305.8355269/lib/ringbuffer.c 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/lib/ringbuffer.c 2015-04-30 14:25:06.000000000 +0200 @@ -138,7 +138,9 @@ void *shm_addr; long page_size = sysconf(_SC_PAGESIZE); -#ifdef QB_FORCE_SHM_ALIGN +#ifdef QB_ARCH_HPPA + page_size = QB_MAX(page_size, 0x00400000); /* align to page colour */ +#elif defined(QB_FORCE_SHM_ALIGN) page_size = QB_MAX(page_size, 16 * 1024); #endif /* QB_FORCE_SHM_ALIGN */ /* The user of this api expects the 'size' parameter passed into this function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/lib/unix.c new/libqb-0.17.1.git20150429.c3bcf25/lib/unix.c --- old/libqb-0.17.1.git20150305.8355269/lib/unix.c 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/lib/unix.c 2015-04-30 14:25:06.000000000 +0200 @@ -170,6 +170,19 @@ flags |= MAP_PRIVATE; #endif /* QB_FORCE_SHM_ALIGN */ +#if defined(QB_ARCH_HPPA) + /* map twice the size we want to make sure we have already mapped + the second memory location behind it too. Otherwise the Linux + kernel may map it in the upper memory so that we can't map + the second part afterwards since it will conflict. */ + addr = mmap(NULL, 2*bytes, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); + + if (addr == MAP_FAILED) + return -errno; + + addr_orig = addr; +#else addr_orig = mmap(NULL, bytes << 1, PROT_NONE, flags, -1, 0); if (addr_orig == MAP_FAILED) { @@ -178,6 +191,7 @@ addr = mmap(addr_orig, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); +#endif if (addr != addr_orig) { res = -errno; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqb-0.17.1.git20150305.8355269/tests/check_ipc.c new/libqb-0.17.1.git20150429.c3bcf25/tests/check_ipc.c --- old/libqb-0.17.1.git20150305.8355269/tests/check_ipc.c 2015-03-09 17:02:22.000000000 +0100 +++ new/libqb-0.17.1.git20150429.c3bcf25/tests/check_ipc.c 2015-04-30 14:25:06.000000000 +0200 @@ -32,7 +32,7 @@ #include <qb/qbipcs.h> #include <qb/qbloop.h> -static const char *ipc_name = "ipc_test"; +static char ipc_name[256]; #define DEFAULT_MAX_MSG_SIZE (8192*16) static int CALCULATED_DGRAM_MAX_MSG_SIZE = 0; @@ -94,6 +94,7 @@ static int32_t num_bulk_events = 10; static int32_t num_stress_events = 30000; static int32_t reference_count_test = QB_FALSE; +static int32_t multiple_connections = QB_FALSE; static int32_t @@ -104,6 +105,18 @@ return -1; } +static void +set_ipc_name(const char *prefix) +{ + /* We have to give the server name a random postfix because + * some build systems attempt to generate packages for libqb + * in parallel. These unit tests are run during the package + * build process. Two builds executing on the same machine + * can stomp on each other's unit tests if the ipc server + * names aren't unique... This was very confusing to debug */ + snprintf(ipc_name, 256, "%s-%d", prefix, (int32_t)random()); +} + static int32_t s1_msg_process_fn(qb_ipcs_connection_t *c, void *data, size_t size) @@ -227,6 +240,7 @@ } else if (req_pt->id == IPC_MSG_REQ_SERVER_FAIL) { exit(0); } else if (req_pt->id == IPC_MSG_REQ_SERVER_DISCONNECT) { + multiple_connections = QB_FALSE; qb_ipcs_disconnect(c); } return 0; @@ -263,6 +277,9 @@ static int32_t s1_connection_closed(qb_ipcs_connection_t *c) { + if (multiple_connections) { + return 0; + } qb_enter(); qb_leave(); return 0; @@ -301,6 +318,10 @@ static void s1_connection_destroyed(qb_ipcs_connection_t *c) { + if (multiple_connections) { + return; + } + qb_enter(); if (reference_count_test) { struct cs_ipcs_conn_context *cnx; @@ -316,6 +337,9 @@ s1_connection_created(qb_ipcs_connection_t *c) { uint32_t max = MAX_MSG_SIZE; + if (multiple_connections) { + return; + } if (send_event_on_created) { struct qb_ipc_response_header response; @@ -698,7 +722,7 @@ { qb_enter(); ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = 5000; test_ipc_exit(); qb_leave(); @@ -709,7 +733,7 @@ { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = 1000; test_ipc_exit(); qb_leave(); @@ -720,7 +744,7 @@ { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_txrx_timeout(); qb_leave(); } @@ -730,7 +754,7 @@ { qb_enter(); ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_txrx_timeout(); qb_leave(); } @@ -741,7 +765,7 @@ qb_enter(); turn_on_fc = QB_FALSE; ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = 1000; test_ipc_txrx(); qb_leave(); @@ -753,7 +777,7 @@ qb_enter(); turn_on_fc = QB_FALSE; ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = -1; test_ipc_txrx(); qb_leave(); @@ -766,7 +790,7 @@ turn_on_fc = QB_TRUE; ipc_type = QB_IPC_SHM; recv_timeout = 500; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_txrx(); qb_leave(); } @@ -777,7 +801,7 @@ qb_enter(); turn_on_fc = QB_FALSE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = -1; test_ipc_txrx(); qb_leave(); @@ -789,7 +813,7 @@ qb_enter(); turn_on_fc = QB_FALSE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); recv_timeout = 1000; test_ipc_txrx(); qb_leave(); @@ -802,7 +826,7 @@ turn_on_fc = QB_TRUE; ipc_type = QB_IPC_SOCKET; recv_timeout = 500; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_txrx(); qb_leave(); } @@ -857,7 +881,7 @@ { qb_enter(); ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_dispatch(); qb_leave(); } @@ -934,6 +958,60 @@ } static void +test_ipc_stress_connections(void) +{ + int32_t c = 0; + int32_t j = 0; + uint32_t max_size = MAX_MSG_SIZE; + int32_t connections = 0; + pid_t pid; + + multiple_connections = QB_TRUE; + + qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_CLEAR_ALL, + QB_LOG_FILTER_FILE, "*", LOG_TRACE); + qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, + QB_LOG_FILTER_FILE, "*", LOG_INFO); + qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE); + + pid = run_function_in_new_process(run_ipc_server); + fail_if(pid == -1); + sleep(1); + + for (connections = 1; connections < 70000; connections++) { + if (conn) { + qb_ipcc_disconnect(conn); + conn = NULL; + } + do { + conn = qb_ipcc_connect(ipc_name, max_size); + if (conn == NULL) { + j = waitpid(pid, NULL, WNOHANG); + ck_assert_int_eq(j, 0); + sleep(1); + c++; + } + } while (conn == NULL && c < 5); + fail_if(conn == NULL); + + if (((connections+1) % 1000) == 0) { + qb_log(LOG_INFO, "%d ipc connections made", connections+1); + } + } + multiple_connections = QB_FALSE; + + request_server_exit(); + verify_graceful_stop(pid); + qb_ipcc_disconnect(conn); + + qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_CLEAR_ALL, + QB_LOG_FILTER_FILE, "*", LOG_TRACE); + qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, + QB_LOG_FILTER_FILE, "*", LOG_TRACE); + qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE); +} + +static void test_ipc_bulk_events(void) { int32_t c = 0; @@ -1070,18 +1148,28 @@ qb_enter(); send_event_on_created = QB_FALSE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_stress_test(); qb_leave(); } END_TEST +START_TEST(test_ipc_stress_connections_us) +{ + qb_enter(); + ipc_type = QB_IPC_SOCKET; + set_ipc_name(__func__); + test_ipc_stress_connections(); + qb_leave(); +} +END_TEST + START_TEST(test_ipc_bulk_events_us) { qb_enter(); send_event_on_created = QB_FALSE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_bulk_events(); qb_leave(); } @@ -1137,7 +1225,7 @@ qb_enter(); send_event_on_created = QB_TRUE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_event_on_created(); qb_leave(); } @@ -1199,7 +1287,7 @@ qb_enter(); disconnect_after_created = QB_TRUE; ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_disconnect_after_created(); qb_leave(); } @@ -1238,7 +1326,7 @@ { qb_enter(); ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_server_fail(); qb_leave(); } @@ -1248,7 +1336,7 @@ { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_dispatch(); qb_leave(); } @@ -1259,17 +1347,27 @@ qb_enter(); send_event_on_created = QB_FALSE; ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_stress_test(); qb_leave(); } END_TEST +START_TEST(test_ipc_stress_connections_shm) +{ + qb_enter(); + ipc_type = QB_IPC_SHM; + set_ipc_name(__func__); + test_ipc_stress_connections(); + qb_leave(); +} +END_TEST + START_TEST(test_ipc_bulk_events_shm) { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_bulk_events(); qb_leave(); } @@ -1280,7 +1378,7 @@ qb_enter(); send_event_on_created = QB_TRUE; ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_event_on_created(); qb_leave(); } @@ -1290,7 +1388,7 @@ { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_server_fail(); qb_leave(); } @@ -1331,7 +1429,7 @@ { qb_enter(); ipc_type = QB_IPC_SHM; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_service_ref_count(); qb_leave(); } @@ -1341,7 +1439,7 @@ { qb_enter(); ipc_type = QB_IPC_SOCKET; - ipc_name = __func__; + set_ipc_name(__func__); test_ipc_service_ref_count(); qb_leave(); } @@ -1439,6 +1537,11 @@ tcase_set_timeout(tc, 10); suite_add_tcase(s, tc); + tc = tcase_create("ipc_stress_connections_shm"); + tcase_add_test(tc, test_ipc_stress_connections_shm); + tcase_set_timeout(tc, 200); + suite_add_tcase(s, tc); + return s; } @@ -1513,6 +1616,11 @@ tcase_set_timeout(tc, 10); suite_add_tcase(s, tc); + tc = tcase_create("ipc_stress_connections_us"); + tcase_add_test(tc, test_ipc_stress_connections_us); + tcase_set_timeout(tc, 200); + suite_add_tcase(s, tc); + return s; } @@ -1524,6 +1632,7 @@ Suite *s; int32_t do_shm_tests = QB_TRUE; + set_ipc_name("ipc_test"); #ifdef DISABLE_IPC_SHM do_shm_tests = QB_FALSE; #endif /* DISABLE_IPC_SHM */