Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit c593b23

Browse files
authored
Merge pull request #889 from lukaszstolarczuk/merge-stable-1.9-into-stable-1.10
Merge stable-1.9 into stable-1.10
2 parents a1b9685 + a7280d8 commit c593b23

File tree

13 files changed

+71
-53
lines changed

13 files changed

+71
-53
lines changed

.github/workflows/gha.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ jobs:
2626
WORKDIR: utils/docker
2727
strategy:
2828
matrix:
29-
CONFIG: ["N=1 OS=ubuntu OS_VER=19.10 TYPE=debug PUSH_IMAGE=1",
30-
"N=2 OS=fedora OS_VER=31 TYPE=debug PUSH_IMAGE=1",
31-
"N=3 OS=ubuntu OS_VER=19.10 TYPE=release",
32-
"N=4 OS=fedora OS_VER=31 TYPE=release XXX_DISABLE_AUTO_DOC_UPDATE=1",
33-
"N=5 OS=ubuntu OS_VER=19.10 TYPE=valgrind",
34-
"N=6 OS=ubuntu OS_VER=19.10 TYPE=memcheck_drd",
35-
"N=7 OS=ubuntu OS_VER=19.10 TYPE=package",
36-
"N=8 OS=fedora OS_VER=31 TYPE=package",
37-
"N=9 OS=ubuntu OS_VER=19.10 TYPE=coverage",
38-
"N=10 OS=ubuntu OS_VER=19.10 TYPE=coverity"]
29+
CONFIG: ["TYPE=debug OS=fedora OS_VER=32 PUSH_IMAGE=1",
30+
"TYPE=debug OS=ubuntu OS_VER=20.04 PUSH_IMAGE=1 CHECK_CPP_STYLE=1",
31+
"TYPE=release OS=fedora OS_VER=32 XXX_DISABLE_AUTO_DOC_UPDATE=1",
32+
"TYPE=release OS=ubuntu OS_VER=20.04",
33+
"TYPE=valgrind OS=ubuntu OS_VER=20.04",
34+
"TYPE=memcheck_drd OS=ubuntu OS_VER=20.04",
35+
"TYPE=package OS=fedora OS_VER=32",
36+
"TYPE=package OS=ubuntu OS_VER=20.04",
37+
"TYPE=coverage OS=ubuntu OS_VER=20.04",
38+
"TYPE=coverity OS=ubuntu OS_VER=20.04"]
3939
steps:
4040
- name: Clone the git repo
4141
uses: actions/checkout@v2

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ add_dependencies(check-whitespace check-whitespace-main)
186186
add_custom_target(tests)
187187

188188
if(CHECK_CPP_STYLE)
189-
find_program(CLANG_FORMAT NAMES clang-format clang-format-9.0)
189+
find_program(CLANG_FORMAT NAMES clang-format clang-format-9 clang-format-9.0)
190190
set(CLANG_FORMAT_REQUIRED "9.0")
191191
if(CLANG_FORMAT)
192192
get_program_version_major_minor(${CLANG_FORMAT} CLANG_FORMAT_VERSION)
193193
if(NOT (CLANG_FORMAT_VERSION VERSION_EQUAL CLANG_FORMAT_REQUIRED))
194194
message(FATAL_ERROR "required clang-format version is ${CLANG_FORMAT_REQUIRED} (found version: ${CLANG_FORMAT_VERSION})")
195195
endif()
196196
else()
197-
message(WARNING "clang-format not found - C++ sources will not be checked (required version: ${CLANG_FORMAT_REQUIRED})")
197+
message(FATAL_ERROR "CHECK_CPP_STYLE=ON, but clang-format not found (required version: ${CLANG_FORMAT_REQUIRED})")
198198
endif()
199199
endif()
200200

doc/libpmemobj++.Doxyfile.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ HIDE_UNDOC_CLASSES = YES
7373
# standard output by doxygen. If QUIET is set to YES this implies that the
7474
# messages are off.
7575

76-
QUIET = YES
76+
QUIET = NO
77+
78+
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
79+
# in which the alphabetical index list will be split.
80+
81+
COLS_IN_ALPHA_INDEX = 1
7782

7883
#---------------------------------------------------------------------------
7984
# Configuration options related to the input files

include/libpmemobj++/container/concurrent_hash_map.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,8 +2831,14 @@ class concurrent_hash_map
28312831
}
28322832

28332833
size_t max_index = mask().load(std::memory_order_acquire);
2834-
size_t start_index = (start_percent * max_index) / 100;
2835-
size_t end_index = (end_percent * max_index) / 100;
2834+
size_t start_index =
2835+
static_cast<size_t>((start_percent * max_index) / 100);
2836+
size_t end_index =
2837+
static_cast<size_t>((end_percent * max_index) / 100);
2838+
2839+
/* Make sure we do not use too big index, even in case of
2840+
* rounding errors. */
2841+
end_index = (std::min)(end_index, max_index);
28362842

28372843
#if LIBPMEMOBJ_CPP_VG_HELGRIND_ENABLED
28382844
ANNOTATE_HAPPENS_AFTER(&(this->my_mask));

travis.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ env:
1212
- GITHUB_REPO=pmem/libpmemobj-cpp
1313
- DOCKERHUB_REPO=pmem/libpmemobj-cpp
1414
matrix:
15-
- OS=ubuntu OS_VER=19.10 TYPE=debug PUSH_IMAGE=1
16-
- OS=fedora OS_VER=31 TYPE=debug PUSH_IMAGE=1
17-
- OS=ubuntu OS_VER=19.10 TYPE=release
18-
- OS=fedora OS_VER=31 TYPE=release AUTO_DOC_UPDATE=1
19-
- OS=ubuntu OS_VER=19.10 TYPE=valgrind
20-
- OS=ubuntu OS_VER=19.10 TYPE=memcheck_drd
21-
- OS=ubuntu OS_VER=19.10 TYPE=package
22-
- OS=fedora OS_VER=31 TYPE=package
23-
- OS=ubuntu OS_VER=19.10 TYPE=coverage
24-
- OS=ubuntu OS_VER=19.10 TYPE=coverity
15+
- TYPE=debug OS=fedora OS_VER=32 PUSH_IMAGE=1
16+
- TYPE=debug OS=ubuntu OS_VER=20.04 PUSH_IMAGE=1 CHECK_CPP_STYLE=1
17+
- TYPE=release OS=fedora OS_VER=32 AUTO_DOC_UPDATE=1
18+
- TYPE=release OS=ubuntu OS_VER=20.04
19+
- TYPE=valgrind OS=ubuntu OS_VER=20.04
20+
- TYPE=memcheck_drd OS=ubuntu OS_VER=20.04
21+
- TYPE=package OS=fedora OS_VER=32
22+
- TYPE=package OS=ubuntu OS_VER=20.04
23+
- TYPE=coverage OS=ubuntu OS_VER=20.04
24+
- TYPE=coverity OS=ubuntu OS_VER=20.04
2525

2626
before_install:
2727
- echo $TRAVIS_COMMIT_RANGE

utils/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ docker run --privileged=true --name=$containerName -i $TTY \
128128
--env GITHUB_TOKEN=$GITHUB_TOKEN \
129129
--env COVERITY_SCAN_TOKEN=$COVERITY_SCAN_TOKEN \
130130
--env COVERITY_SCAN_NOTIFICATION_EMAIL=$COVERITY_SCAN_NOTIFICATION_EMAIL \
131-
--env CHECK_CPP_STYLE=${CHECK_CPP_STYLE:-ON} \
131+
--env CHECK_CPP_STYLE=${CHECK_CPP_STYLE:-OFF} \
132132
--env TESTS_LONG=${TESTS_LONG:-OFF} \
133133
--env TESTS_TBB=${TESTS_TBB:-ON} \
134134
--env TZ='Europe/Warsaw' \
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#
88

99
# Pull base image
10-
FROM fedora:31
10+
FROM fedora:32
1111
1212

1313
# Set required environment variables
1414
ENV OS fedora
15-
ENV OS_VER 31
15+
ENV OS_VER 32
1616
ENV PACKAGE_MANAGER rpm
1717
ENV NOTTY 1
1818

@@ -32,6 +32,7 @@ RUN dnf update -y \
3232
daxctl-devel \
3333
doxygen \
3434
gcc \
35+
gcc-c++ \
3536
gdb \
3637
git \
3738
hub \
@@ -47,6 +48,7 @@ RUN dnf update -y \
4748
ndctl-devel \
4849
open-sans-fonts \
4950
pandoc \
51+
passwd \
5052
perl-Text-Diff \
5153
rpm-build \
5254
rpm-build-libs \

utils/docker/images/Dockerfile.ubuntu-19.10 renamed to utils/docker/images/Dockerfile.ubuntu-20.04

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#
88

99
# Pull base image
10-
FROM ubuntu:19.10
10+
FROM ubuntu:20.04
1111
1212

1313
# Set required environment variables
1414
ENV OS ubuntu
15-
ENV OS_VER 19.10
15+
ENV OS_VER 20.04
1616
ENV PACKAGE_MANAGER deb
1717
ENV NOTTY 1
1818

@@ -28,7 +28,7 @@ RUN apt-get update \
2828
asciidoc \
2929
autoconf \
3030
clang \
31-
clang-format \
31+
clang-format-9 \
3232
cmake \
3333
curl \
3434
debhelper \

utils/docker/images/Dockerfile.ubuntu-rolling

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN apt-get update \
2828
asciidoc \
2929
autoconf \
3030
clang \
31-
clang-format \
31+
clang-format-9 \
3232
cmake \
3333
curl \
3434
debhelper \

utils/docker/images/build-image.sh

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,36 @@
1313

1414
set -e
1515

16-
OS_VER=$1
17-
1816
function usage {
17+
echo
1918
echo "Usage:"
2019
echo " build-image.sh <OS-VER>"
2120
echo "where <OS-VER>, for example, can be 'fedora-31', provided " \
2221
"a Dockerfile named 'Dockerfile.fedora-31' exists in the " \
2322
"current directory."
2423
}
24+
OS__OS_VER=${1}
2525

26-
# Check if the argument is not empty
27-
if [[ -z "$1" ]]; then
26+
echo "Check if the argument is not empty"
27+
if [[ -z "${OS__OS_VER}" ]]; then
2828
usage
2929
exit 1
3030
fi
3131

32-
# Check if the file Dockerfile.OS-VER exists
33-
if [[ ! -f "Dockerfile.$OS_VER" ]]; then
34-
echo "Error: Dockerfile.$OS_VER does not exist."
35-
echo
32+
if [[ -z "${DOCKERHUB_REPO}" ]]; then
33+
echo "DOCKERHUB_REPO environment variable is not set"
34+
exit 1
35+
fi
36+
37+
echo "Check if the file Dockerfile.${OS__OS_VER} exists"
38+
if [[ ! -f "Dockerfile.${OS__OS_VER}" ]]; then
39+
echo "Error: Dockerfile.${OS__OS_VER} does not exist."
3640
usage
3741
exit 1
3842
fi
3943

40-
# Build a Docker image tagged with ${DOCKERHUB_REPO}:1.10-OS-VER
41-
docker build -t ${DOCKERHUB_REPO}:1.10-${OS_VER} \
44+
echo "Build a Docker image tagged with ${DOCKERHUB_REPO}:1.10-${OS__OS_VER}"
45+
docker build -t ${DOCKERHUB_REPO}:1.10-${OS__OS_VER} \
4246
--build-arg http_proxy=$http_proxy \
4347
--build-arg https_proxy=$https_proxy \
44-
-f Dockerfile.${OS_VER} .
48+
-f Dockerfile.${OS__OS_VER} .

0 commit comments

Comments
 (0)