Signed-off-by: Angus Salkeld asalkeld@redhat.com --- check | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/check b/check index f5ac1af..e0ec7c3 100755 --- a/check +++ b/check @@ -136,6 +136,18 @@ check_rpm() { set -e }
+ +check_mock() { + echo "checking mock building" + set +e + make maintainer-clean + rm -f *.rpm + ./autogen.sh + ./configure --quiet + make srpm + mock --no-clean --rebuild *.src.rpm +} + check_coverity() { make clean cov-build --dir=cov make @@ -181,6 +193,9 @@ case $command in rpm) check_rpm ;; + mock) + check_mock + ;; dist) check_dist ;;
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- include/qb/qblog.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/qb/qblog.h b/include/qb/qblog.h index 5231daf..99ea018 100644 --- a/include/qb/qblog.h +++ b/include/qb/qblog.h @@ -31,6 +31,7 @@ extern "C" { #include <stdint.h> #include <stdlib.h> #include <stdio.h> +#include <stdarg.h> #include <errno.h> #include <syslog.h> #include <string.h>
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- lib/log.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/log.c b/lib/log.c index 885751e..bd1c5c7 100644 --- a/lib/log.c +++ b/lib/log.c @@ -548,9 +548,9 @@ qb_log_filter_ctl2(int32_t t, enum qb_log_filter_conf c, return -EINVAL; }
- if (t == QB_LOG_FILTER_ADD || - t == QB_LOG_FILTER_CLEAR_ALL || - t == QB_LOG_FILTER_REMOVE) { + if (c == QB_LOG_FILTER_ADD || + c == QB_LOG_FILTER_CLEAR_ALL || + c == QB_LOG_FILTER_REMOVE) { if (t < 0 || t >= QB_LOG_TARGET_MAX || conf[t].state == QB_LOG_STATE_UNUSED) { return -EBADF;
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- lib/log_thread.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/log_thread.c b/lib/log_thread.c index fdef85c..b728f06 100644 --- a/lib/log_thread.c +++ b/lib/log_thread.c @@ -123,7 +123,9 @@ qb_log_thread_priority_set(int32_t policy, int32_t priority) logt_sched_policy = policy;
if (policy == SCHED_OTHER || +#ifdef SCHED_IDLE policy == SCHED_IDLE || +#endif policy == SCHED_BATCH) { logt_sched_param.sched_priority = 0; } else {
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- tests/check_map.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/tests/check_map.c b/tests/check_map.c index 95a7a12..734e3e6 100644 --- a/tests/check_map.c +++ b/tests/check_map.c @@ -521,14 +521,15 @@ test_map_load(qb_map_t *m, const char* test_name) ck_assert(m != NULL); sw = qb_util_stopwatch_create();
+#define MAX_WORDS 100000 + /* * Load with dictionary */ fp = fopen("/usr/share/dict/words", "r"); qb_util_stopwatch_start(sw); count = 0; - while (fgets(word, sizeof(word), fp) && count < 100000) { - word[strlen(word) - 1] = '\0'; + while (fgets(word, sizeof(word), fp) && count < MAX_WORDS) { w = strdup(word); qb_map_put(m, w, w); count++; @@ -536,7 +537,6 @@ test_map_load(qb_map_t *m, const char* test_name) qb_util_stopwatch_stop(sw); ck_assert_int_eq(qb_map_count_get(m), count); fclose(fp); - secs = qb_util_stopwatch_sec_elapsed_get(sw); ops = (float)count / secs; qb_log(LOG_INFO, "%25s %12.2f puts/sec (%d/%fs)\n", test_name, ops, count, secs); @@ -547,8 +547,7 @@ test_map_load(qb_map_t *m, const char* test_name) fp = fopen("/usr/share/dict/words", "r"); qb_util_stopwatch_start(sw); count2 = 0; - while (fgets(word, sizeof(word), fp) && count2 < 100000) { - word[strlen(word) - 1] = '\0'; + while (fgets(word, sizeof(word), fp) && count2 < MAX_WORDS) { value = qb_map_get(m, word); ck_assert_str_eq(word, value); count2++; @@ -578,8 +577,7 @@ test_map_load(qb_map_t *m, const char* test_name) fp = fopen("/usr/share/dict/words", "r"); qb_util_stopwatch_start(sw); count2 = 0; - while (fgets(word, sizeof(word), fp) && count2 < 100000) { - word[strlen(word) - 1] = '\0'; + while (fgets(word, sizeof(word), fp) && count2 < MAX_WORDS) { res = qb_map_rm(m, word); ck_assert_int_eq(res, QB_TRUE); count2++;
quarterback-devel@lists.fedorahosted.org