Definitely some review worthy stuff here.
Changes committed to git://git.pcp.io/kenj/pcp master
Ken McDonell (5):
pmda.h: refine PMDA_PMID macro
PM_ERR_BADSTORE: second round of cosmetic changes
src/perl/PMDA/cvalue.c: another PM_ERR_* place
src/perl/PMDA/Makefile.PL: Perl voodoo so that test.pl runs OK
qa/771: (new) exercise test.pl/cvalue.c from the perl PMDA bindings
qa/771 | 36 ++++++++++++++++++++++++++++++++++++
qa/GNUmakefile | 2 +-
qa/group | 1 +
qa/perl/GNUmakefile | 26 ++++++++++++++++++++++++++
qa/perl/GNUmakefile.install | 1 +
qa/perl/Makefile | 2 ++
src/include/pcp/pmda.h | 8 ++++++--
src/libpcp/src/err.c | 15 ++++++++++++++-
src/perl/PMDA/Makefile.PL | 17 +++++++++++++++++
src/perl/PMDA/PMDA.pm | 26 ++++++++++++++++----------
src/perl/PMDA/cvalue.c | 44 +++++++++++++++++++++++++++++++-------------
src/python/pmapi.c | 18 +++++++++++-------
12 files changed, 162 insertions(+), 34 deletions(-)
Details ...
commit 3884040a45e6a55e6fd8a4895847602fa391785c
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu May 7 17:13:13 2015 +1000
qa/771: (new) exercise test.pl/cvalue.c from the perl PMDA bindings
Need to reach across to the src directory to get the test.pl and
cvalue.c bits (in the build), then execute the test in the (new)
perl subdirectory.
commit b1aaca27ffba17b49069e233c3d86fcc0ff618c8
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu May 7 09:58:59 2015 +1000
src/perl/PMDA/Makefile.PL: Perl voodoo so that test.pl runs OK
Really obscure MakeMaker hack needed to allow
make -f Makefile test
to actually work, rather than dying as in ...
kenj@bozo-vm:~/src/pcp/src/perl/PMDA$ make -f Makefile test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..4
Can't load 'blib/arch/auto/PCP/PMDA/PMDA.so' for module PCP::PMDA:
blib/arch/auto/PCP/PMDA/PMDA.so: undefined symbol: clearHV at
/usr/lib/perl/5.14/DynaLoader.pm line 184.
at test.pl line 21
Compilation failed in require at test.pl line 21.
commit 453459a12cb76d19bcb8d3f94a8e20d3cbcf86a8
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu May 7 09:56:19 2015 +1000
src/perl/PMDA/cvalue.c: another PM_ERR_* place
1. fix ordering of error code tests here to match pmerr -l order
2. make ids() more data driven
3. extend ids() to check PMDA_PMID() and pmid_build() return the
same value ... really a pmda.h test rather than a perl test
but fits conveniently here
commit 40b1c6f3b979b2a747545bfaebef3a7c8dd04cbd
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu May 7 09:26:24 2015 +1000
PM_ERR_BADSTORE: second round of cosmetic changes
In the places where we enumerate PM_ERR_* values and need to keep
them in sync (Perl and Python bindings in particular), make the
order the same as pmerr -l to ease maintenance. And document this
goal in all 3 places.
Note the order in pmapi.h is different, but that serves a different
purpose and is OK to be different.
commit 056c9d30fe109e858755f856a374e9ef7fad258e
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu May 7 09:22:36 2015 +1000
pmda.h: refine PMDA_PMID macro
In some unrelated testing I discovered that PMDA_PMID(x,y) and
build_pmid(0,x,y) don't return the same values for some choices
of x and y!
In particular if the arguments to PMDA_PMID() are negative (!) or
larger than the corresponding field widths the PMDA_PMID() value
is clearly wrong.
Add some masking to limit x (cluster) to 12 bits and y (item) to
10 bits.
|