Skip to content

Commit

Permalink
Merge branch 'main' of github.com:performancecopilot/pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
natoscott committed Sep 14, 2021
2 parents f0a870f + 37e0179 commit 944f44c
Show file tree
Hide file tree
Showing 12 changed files with 162 additions and 14 deletions.
11 changes: 9 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3240,6 +3240,7 @@ fi



gcc_debug=true
target_distro=$target_os
if test $target_os = linux
then
Expand Down Expand Up @@ -3355,6 +3356,10 @@ $as_echo "#define IS_OPENBSD 1" >>confdefs.h
export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE"
pcp_platform_paths='/usr/local/bin'
pcp_ps_all_flags=auxww
if test "$target_cpu" = "i386" -a "$host_os" = "openbsd6.8"
then
gcc_debug=false
fi
else
echo
echo "FATAL ERROR: need platform-specific customization for \"$target_os\""
Expand All @@ -3366,9 +3371,11 @@ fi

if test "$use_optimization" = no
then
optimization="-O0 -g"
optimization="-O0"
$gcc_debug && optimization="$optimization -g"
else
optimization="-O2 -g"
optimization="-O2"
$gcc_debug && optimization="$optimization -g"
fi


Expand Down
14 changes: 11 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ AC_SUBST(cross_compiling)
dnl CFLAGS setting is a co-dependency between here and PCFLAGS in
dnl src/include/builddefs.in ... need to be the same in both places

gcc_debug=true
target_distro=$target_os
if test $target_os = linux
then
Expand Down Expand Up @@ -376,6 +377,11 @@ then
export CFLAGS="-fPIC -fno-strict-aliasing -D_GNU_SOURCE"
pcp_platform_paths='/usr/local/bin'
pcp_ps_all_flags=auxww
if test "$target_cpu" = "i386" -a "$host_os" = "openbsd6.8"
then
dnl build with -g are broken here due to a gcc bug
gcc_debug=false
fi
else
echo
echo "FATAL ERROR: need platform-specific customization for \"$target_os\""
Expand All @@ -385,12 +391,14 @@ fi
AC_SUBST(pcp_platform_paths)
AC_SUBST(pcp_ps_all_flags)

dnl default C and C++ compiler optimization to -O2 -g
dnl default C and C++ compiler optimization to -O2 -g (latter depends on $gcc_debug)
if test "$use_optimization" = no
then
optimization="-O0 -g"
optimization="-O0"
$gcc_debug && optimization="$optimization -g"
else
optimization="-O2 -g"
optimization="-O2"
$gcc_debug && optimization="$optimization -g"
fi
AC_SUBST(optimization)

Expand Down
2 changes: 2 additions & 0 deletions qa/364
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ _filter_openbsd()
-e '/^disk\.all\.blkread .* Unknown metric name/d' \
-e '/^disk\.all\.blkwrite .* Unknown metric name/d' \
-e '/^disk\.dev\.avactive .* Unknown metric name/d' \
-e '/^disk\.dev\.aveq .* Unknown metric name/d' \
-e '/^disk\.dev\.total_rawactive .* Unknown metric name/d' \
-e '/^disk\.partitions\..* Unknown metric name/d' \
-e '/^filesys.* Unknown metric name/d' \
-e '/^hinv\.cpu\.clock .* Unknown metric name/d' \
Expand Down
6 changes: 3 additions & 3 deletions qa/699.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sample.seconds
Semantics: counter Units: sec
--- pmlogrewrite, expect failure ---
__pmLogNewFile: "TMP.out.index" already exists, not over-written
pmlogrewrite: Error: __pmLogCreate(TMP.out,v2): File exists
pmlogrewrite: Error: __pmLogCreate(TMP.out): File exists
--- check archives after ---

sample.seconds
Expand All @@ -25,7 +25,7 @@ sample.seconds
=== removed output archive .meta file ===
--- pmlogrewrite, expect failure ---
__pmLogNewFile: "TMP.out.index" already exists, not over-written
pmlogrewrite: Error: __pmLogCreate(TMP.out,v2): File exists
pmlogrewrite: Error: __pmLogCreate(TMP.out): File exists
--- check archives after ---

sample.seconds
Expand All @@ -41,7 +41,7 @@ TMP.out.2: no change
=== removed output archive .index file ===
--- pmlogrewrite, expect failure ---
__pmLogNewFile: "TMP.out.0" already exists, not over-written
pmlogrewrite: Error: __pmLogCreate(TMP.out,v2): File exists
pmlogrewrite: Error: __pmLogCreate(TMP.out): File exists
--- check archives after ---

sample.seconds
Expand Down
4 changes: 2 additions & 2 deletions qa/README.vm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Debian

Ubuntu
https://wiki.ubuntu.com/Releases
13 Sep 2021: 20.04 LTS (Focal), 18.04 (Bionic) 16.04 LTS (Xenial), 14.04 LTS (Trusty)
04 Jun 2018: 18.04 (Bionic) 17.10 (Artful), 16.04 LTS (Xenial),
14.04.3 LTS (Trusty),
# which packages are installed
Expand Down Expand Up @@ -371,9 +372,8 @@ OpenIndiana

OpenBSD
https://en.wikipedia.org/wiki/OpenBSD_version_history
26 Oct 2018: 6.2, 6.3, 6.4
24 Oct 2019: 6.4, 6.5, 6.6
24 Aug 2020: 6.6, 6.7
13 Sep 2021: 6.8, 6.9
# package search recipe (name only, not info or description)
$ pkg_info -Q <pattern>
# which package installs a file/directory
Expand Down
2 changes: 1 addition & 1 deletion qa/admin/other-packages/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ rpm? /usr/lib*/dri/swrast_dri.so [mesa-dri-drivers (QA optional)]
urpmi? swrast_dri.so [? (QA optional)]
emerge? swrast_dri.so [? (QA optional)]
pkgin? swrast_dri.so [? (QA optional)]
pkg_add? swrast_dri.so [? (QA optional)]
pkg_add? swrast_dri.so [base OpenBSD install (QA optional)]
F_pkg? swrast_dri.so [? (QA optional)]
S_pkg? swrast_dri.so [? (QA optional)]
slackpkg? swrast_dri.so [? (QA optional)]
Expand Down
1 change: 1 addition & 0 deletions qa/admin/package-lists/OpenBSD+6.7+amd64
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ curl
cyrus-sasl
gawk
git
gdiff
gmake
gtar
icu4c
Expand Down
59 changes: 59 additions & 0 deletions qa/admin/package-lists/OpenBSD+6.8+i386
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# PCP required package list for OpenBSD 6.8 i386
# created by kenj on vm33.localdomain Tue Sep 14 07:02:39 AEST 2021
#
LWP::UserAgent cpan
Spreadsheet::Read cpan
Spreadsheet::ReadSXC cpan
Spreadsheet::XLSX cpan
XML::TokeParser cpan
autoconf
avahi
bash
bison
cppcheck
curl
cyrus-sasl
gawk
gdb
gdiff
git
gmake
gtar
icu4c
libmad
libuv
mariadb-client
memcached
metaauto
nmap
nspr
nss
p5-DBD-mysql
p5-File-Slurp
p5-JSON
p5-List-MoreUtils
p5-Net-SNMP
p5-Spreadsheet-WriteExcel
p5-Text-CSV_XS
p5-Time-TimeDate
p5-XML-LibXML
p5-YAML-XS
p5-libwww
pkglocatedb
postgresql-client
pstree
py-six
py3-Pillow
py3-defusedxml
py3-elasticsearch
py3-requests
py3-setuptools
py3-six
python
readline
rrdtool
socat
smartmontools
sqlite3
xz
zabbix-agent
59 changes: 59 additions & 0 deletions qa/admin/package-lists/OpenBSD+6.9+amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# PCP required package list for OpenBSD 6.9 amd64
# created by kenj on vm37.localdomain Wed Sep 15 06:49:54 AEST 2021
#
LWP::UserAgent cpan
Spreadsheet::Read cpan
Spreadsheet::XLSX cpan
autoconf
avahi
bash
bison
cppcheck
curl
cyrus-sasl
gawk
gdb
gdiff
git
gmake
gtar
icu4c
libmad
libuv
mariadb-client
memcached
metaauto
nmap
nspr
nss
p5-DBD-mysql
p5-File-Slurp
p5-JSON
p5-List-MoreUtils
p5-Net-SNMP
p5-Spreadsheet-WriteExcel
p5-Text-CSV_XS
p5-Time-TimeDate
p5-XML-LibXML
p5-YAML-XS
p5-libwww
pkglocatedb
postgresql-client
pstree
py-six
py3-defusedxml
py3-elasticsearch
py3-openpyxl
py3-requests
py3-setuptools
py3-six
py3-Pillow
python
readline
rrdtool
smartmontools
socat
sqlite3
valgrind
xz
zabbix-agent
12 changes: 12 additions & 0 deletions qa/qt/setup-executables
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ else
. "$PCP_DIR"/etc/pcp.env
fi

# Don't bother if we're not building libraries that depend on Qt
#
if [ -f ../../src/include/builddefs ]
then
eval `sed -n -e '/^ENABLE_QT[ ]*=/s/[ ]//gp' ../../src/include/builddefs`
[ "$ENABLE_QT" = false ] && exit 0
elif [ -f $PCP_INC_DIR/builddefs ]
then
eval `sed -n -e '/^ENABLE_QT[ ]*=/s/[ ]//gp' $PCP_INC_DIR/builddefs`
[ "$ENABLE_QT" = false ] && exit 0
fi

builddir=''
for builddir in ../../build/deb/pcp-$PCP_VERSION/qa/qt $PCP_VAR_DIR/testsuite/qt ''
do
Expand Down
2 changes: 1 addition & 1 deletion src/libpcp/src/check-statics
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ in
fi
;;

freebsd|netbsd|openbsd|solaris)
freebsd|netbsd|solaris)
;;
*)
echo "Warning: check-statics skipped for PCP_PLATFORM=$PCP_PLATFORM"
Expand Down
4 changes: 2 additions & 2 deletions src/libpcp/src/fetchgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,13 @@ __pmStuffDoubleValue(double val, pmAtomValue *oval, int otype)
oval->ul = val;
break;
case PM_TYPE_64:
if (val > LLONG_MAX || val < LLONG_MIN)
if ((long long)val > LLONG_MAX || (long long)val < LLONG_MIN)
sts = PM_ERR_TRUNC;
else
oval->ll = val;
break;
case PM_TYPE_U64:
if (val > ULLONG_MAX)
if ((long long)val > ULLONG_MAX)
sts = PM_ERR_TRUNC;
else if (val < 0.0)
sts = PM_ERR_SIGN;
Expand Down

0 comments on commit 944f44c

Please sign in to comment.