From e6f34657d22bf85996c046e5fa0a3639a0b71128 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Fri, 1 Dec 2017 10:45:52 +0300 Subject: [PATCH 1/3] Print a header before options lists on missing --file-test-mode. When the required --file-test-mode option is missing, print a header before printing the list of available options. --- src/tests/fileio/sb_fileio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/fileio/sb_fileio.c b/src/tests/fileio/sb_fileio.c index 820bc9d..57d1d83 100644 --- a/src/tests/fileio/sb_fileio.c +++ b/src/tests/fileio/sb_fileio.c @@ -1779,8 +1779,11 @@ int parse_arguments(void) { if (mode == NULL) { - log_text(LOG_FATAL, "Missing required argument: --file-test-mode"); + log_text(LOG_FATAL, "Missing required argument: --file-test-mode\n"); + + log_text(LOG_NOTICE, "fileio options:"); sb_print_options(fileio_args); + return 1; } if (!strcmp(mode, "seqwr")) From 5a9d6811df2725a777b7e392226d125e14015583 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Fri, 1 Dec 2017 11:09:58 +0300 Subject: [PATCH 2/3] Use C99 inlines for sb_counter API to make them LuaJIT/FFI usable. --- src/sb_counter.c | 3 +++ src/sb_counter.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sb_counter.c b/src/sb_counter.c index d10c105..b7e56c7 100644 --- a/src/sb_counter.c +++ b/src/sb_counter.c @@ -28,6 +28,9 @@ static sb_counters_t last_intermediate_counters; static sb_counters_t last_cumulative_counters; +extern inline uint64_t sb_counter_val(int thread_id, sb_counter_type_t type); +extern inline void sb_counter_inc(int thread_id, sb_counter_type_t type); + /* Initialize per-thread stats */ int sb_counters_init(void) diff --git a/src/sb_counter.h b/src/sb_counter.h index a0aa030..a7e5e04 100644 --- a/src/sb_counter.h +++ b/src/sb_counter.h @@ -57,13 +57,13 @@ int sb_counters_init(void); void sb_counters_done(void); /* Return the current value for a given counter */ -static inline uint64_t sb_counter_val(int thread_id, sb_counter_type_t type) +inline uint64_t sb_counter_val(int thread_id, sb_counter_type_t type) { return ck_pr_load_64(&sb_counters[thread_id][type]); } /* Increment a given stat counter for a given thread */ -static inline void sb_counter_inc(int thread_id, sb_counter_type_t type) +inline void sb_counter_inc(int thread_id, sb_counter_type_t type) { ck_pr_store_64(&sb_counters[thread_id][type], sb_counter_val(thread_id, type)+1); From ba77afa3f9085a43350b74e224df42b4032181d1 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Fri, 1 Dec 2017 12:26:03 +0300 Subject: [PATCH 3/3] Fix Travis macOS builds by replacing pip with pip2. pip is no longer available in default images as per https://github.com/travis-ci/travis-ci/issues/8829. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fbeef78..59a467a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -169,7 +169,7 @@ before_install: fi install: - - pip install --user urllib3[secure] cpp-coveralls + - pip2 install --user urllib3[secure] cpp-coveralls - > case "${TRAVIS_OS_NAME:-linux}" in osx)