----- Original Message -----
> On 11/28/2012 09:34 PM, Nathan Scott wrote:
> > This actually raises another interesting twist on the QA config
> > issue - this passes for me with some PCP_VER_3611 variants (ie.
> > built --without-secure-sockets) but fails otherwise.
> Yeah. __pmSetDataIPC is currently only used by the secure sockets
> implementation.
> > Suggests
> > we need to consider doing something more sophisticated for the
> > QA tests with NSS/NSPR dependencies - pkg-config(1) for PCP?
> Can you elaborate? I'm not sure what you're getting at.
Oh I just meant that the way we're using "if [ $PCP_VER -lt 3611 ]"
is not good enough to figure out what the expected output of the test
should be.
Kens suggested looking at the fault injection stuff, which does this:
- conditionally builds QA sources if <pcp/fault.h> found
- tests check for the presence of a QA binary, _notrun if not found
- the QA source also makes a call to __pmFaultInject, which is setup
in libpcp (if built-in) to exit(1) if not enabled in the build (keyed
on #ifdef PM_FAULT_INJECTION).
Noticed theres a second similar case which is even more like the NSS
case in some ways - the multi-threading support. It has a configure
option too and is transparent in libpcp to the caller. The approach
here is similar to NSS currently - e.g. in the qa/src/GNUlocaldefs
"ifeq ($(shell test $(PCP_VER) -ge 3600 && echo 1), 1)" ... so, only
build the test source if we know the new code is there. The source
also has a runtime test though - __pmMultiThreaded() in this case,
which returns zero if PM_MULTI_THREAD was not set during the build
of libpcp.
So, approach used so far is to add the sort of tests we have now
(PCP version based) as an initial "will this compile at all" check,
then a subsequent "dynamic" check is done via a call into a libpcp
routine that was added at the time of the initial feature commit.
There's pros and cons. NSS doesn't actually have a routine like
this and we'd have to add something. Need to think further on the
best option I think - maybe adding in a feature-test interface to
libpcp (analogous to sysconf(3), but less int-based) and also a
helper tool (something like getconf(1), for QA)?
Another option would be to use the pkg-config tool I guess. Or we
continue on the query-interface-per-feature path, which works too.
Does anyone have any other suggestions or strong preferences? In
terms of features coming up ... Dave's mentioned IPv6 is next on
his hit list (building on NSS), and there's per-user auth pending
(also building on NSS). Thats the short term stuff anyway that I
think will have to do similar version querying from QA tests.
cheers.
--
Nathan
|