|
From: Chris B. <buc...@us...> - 2012-02-29 22:24:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SFCB - Small Footprint CIM Broker".
The branch, master has been updated
via 74cc8e1c1a06715cc771969683cbfb98276c0539 (commit)
via f4126559da38d12f69ca099101e81bbc22688d6d (commit)
via 6b4723acedd91cf702876db782a5eb2a23a0de94 (commit)
via 640d608fa0b0601df86124ba0078777993e31551 (commit)
via 61def9cbb352449968ee527106089dfd1a9b3788 (commit)
from c14fdc6674ac4982b1cf5a5219ab89ad0e8126f9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 74cc8e1c1a06715cc771969683cbfb98276c0539
Merge: f412655 c14fdc6
Author: buccella <buc...@li...>
Date: Wed Feb 29 17:24:40 2012 -0500
merging helerda commit
commit f4126559da38d12f69ca099101e81bbc22688d6d
Author: buccella <buc...@li...>
Date: Wed Feb 29 17:13:12 2012 -0500
[ 3495806 ] isChild() can cause a provider mismatch
commit 6b4723acedd91cf702876db782a5eb2a23a0de94
Author: buccella <buc...@li...>
Date: Wed Feb 29 16:32:10 2012 -0500
[ 3495804 ] Cleanup: httpProcId still defined, wrong define in cimXmlGen
commit 640d608fa0b0601df86124ba0078777993e31551
Author: buccella <buc...@li...>
Date: Wed Feb 29 15:32:15 2012 -0500
[ 3495789 ] Makefile improvements for test suite
commit 61def9cbb352449968ee527106089dfd1a9b3788
Author: buccella <buc...@li...>
Date: Wed Feb 29 15:18:03 2012 -0500
[ 3493493 ] Add sfcbsem
-----------------------------------------------------------------------
Summary of changes:
diff --git a/ChangeLog b/ChangeLog
index 1bd0619..e047138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2012-02-29 Chris Buccella <buc...@li...>
+
+ * providerMgr.c:
+ [ 3495806 ] isChild() can cause a provider mismatch
+ (patch by Viktor Mihajlovski)
+
+ * msgqueue.h, msgqueue.c, cimXmlGen.h:
+ [ 3495804 ] Cleanup: httpProcId still defined, wrong define in cimXmlGen
+
+ * Makefile.am, test/Makefile.am,
+ test/TestProviders/tests/IndRetryTest.sh,
+ test/TestProviders/tests/Makefile.am,
+ test/TestProviders/tests/xmltest.sh,
+ test/commands/Makefile.am, test/commands/sfcbdump.sh,
+ test/unittest/Makefile.am, test/xmltest/Makefile.am,
+ test/xmltest/xmltest.sh:
+ [ 3495789 ] Makefile improvements for test suite
+ (code by Viktor Mihajlovski)
+
2012-02-29 Dave Heller <hel...@us...>
* cimslpSLP.c:
@@ -10,6 +29,10 @@
2012-02-28 Chris Buccella <buc...@li...>
+ * sfcbsem.c, Makefile.am:
+ [ 3493493 ] Add sfcbsem
+ (code by Viktor Mihajlovski)
+
* interopServerProvider.c
[ 3416164 ] Don't write CIM_IndicationService to disk
diff --git a/Makefile.am b/Makefile.am
index d4c85dc..c50bf30 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -524,7 +524,7 @@ install-data-local:
fi;
$(INSTALL_DATA) $(srcdir)/10_interop.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop
if INDICATIONS
- $(INSTALL_DATA) $(srcdir)/20_indication.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop
+ $(INSTALL_DATA) 20_indication.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop
$(INSTALL_DATA) $(srcdir)/indication.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs
endif
if ACCOUNT_PASSTHRU
@@ -613,5 +613,5 @@ pretty:
postinstall: install-cimschema create-sslkeys
test -f $(DESTDIR)$(sfcbstatedir)/registration/providerRegister || $(INSTALL_DATA) $(DESTDIR)$(sfcbstatedir)/stage/default.reg $(DESTDIR)$(sfcbstatedir)/registration/providerRegister
if TEST_ENABLED
- ./test/stageschema.sh -d test/schema -p $(prefix)
+ $(srcdir)/test/stageschema.sh -d $(srcdir)/test/schema -p $(prefix)
endif
diff --git a/NEWS b/NEWS
index 2507d07..724f91a 100644
--- a/NEWS
+++ b/NEWS
@@ -6,9 +6,8 @@ Everything in 1.3.13 and 1.3.14, plus:
New features:
- 3441679 Add a feature to validate CMPI types
-Bugs fixed:
-- 3495343 Bad pointer references in trace statements
-- 3495801 Correction to 3495343
+Bugs fixed:
+- 3495804 Cleanup: httpProcId still defined, wrong define in cimXmlGen
Changes in 1.4.2
================
@@ -89,6 +88,10 @@ Everything in 1.3.10, plus:
Changes in 1.3.14
=================
+New Features:
+
+- 3493493 Add sfcbsem
+
Bugs Fixed:
- 3414700 assocClass ignored for assoc upcalls
@@ -96,6 +99,10 @@ Bugs Fixed:
- 3416167 CIM_InstDeletion not in class repo by default
- 3422650 Associators calls to IndicationService depends on cmpi-base
- 3416164 Don't write CIM_IndicationService to disk
+- 3495789 Makefile improvements for test suite
+- 3495806 isChild() can cause a provider mismatch
+- 3495343 Bad pointer references in trace statements
+- 3495801 Correction to 3495343
Changes in 1.3.13
=================
diff --git a/cimXmlGen.h b/cimXmlGen.h
index dfc9edc..fb76691 100644
--- a/cimXmlGen.h
+++ b/cimXmlGen.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef array_h
-#define array_h
+#ifndef cimXmlGen_h
+#define cimXmlGen_h
#include "cimRequest.h"
#include "cimXmlParser.h"
diff --git a/msgqueue.c b/msgqueue.c
index 6573b83..0ab0ee0 100644
--- a/msgqueue.c
+++ b/msgqueue.c
@@ -46,7 +46,6 @@ int ptBase,
stBase,
htMax,
stMax;
-int httpProcId;
int currentProc = 0;
int noProvPause = 0;
char *provPauseStr = NULL;
diff --git a/msgqueue.h b/msgqueue.h
index e51df94..0949d30 100644
--- a/msgqueue.h
+++ b/msgqueue.h
@@ -201,7 +201,6 @@ extern int ptBase,
stBase,
htMax,
stMax;
-extern int httpProcId;
extern void stopLocalConnectServer();
extern void localConnectServer();
diff --git a/providerMgr.c b/providerMgr.c
index b9e4024..f75a212 100644
--- a/providerMgr.c
+++ b/providerMgr.c
@@ -1665,30 +1665,59 @@ localInvokeMethod(BinRequestContext * binCtx,
int
isChild(const char *ns, const char *parent, const char *child)
{
+ CMPIObjectPath *path;
+ CMPIStatus rc;
+ InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod,5);
+ BinResponseHdr *resp=NULL;
+ BinRequestContext binCtx;
+
+ OperationHdr req = { OPS_InvokeMethod, 2 };
+ CMPIArgs *in;
+ int irc;
+
_SFCB_ENTER(TRACE_PROVIDERMGR, "isChild");
- CMPIObjectPath *path;
- BinRequestContext binCtx;
- OperationHdr req = { OPS_InvokeMethod, 1 };
- CMPIArgs *in = NewCMPIArgs(NULL);
- CMPIStatus rc;
- int irc;
+ path = TrackedCMPIObjectPath(ns, parent, &rc);
+ sreq.principal = setCharsMsgSegment("$$");
+ sreq.objectPath = setObjectPathMsgSegment(path);
- memset(&binCtx, 0, sizeof(BinRequestContext));
+ in = TrackedCMPIArgs(&rc);
CMAddArg(in, "child", child, CMPI_chars);
- path = NewCMPIObjectPath(ns, parent, &rc);
+ sreq.in = setArgsMsgSegment(in);
+ sreq.out = setArgsMsgSegment(NULL);
+ sreq.method = setCharsMsgSegment("isChild");
req.nameSpace = setCharsMsgSegment((char *) ns);
- req.className = setCharsMsgSegment("$ClassProvider$");
+ req.className = setCharsMsgSegment((char *) "$ClassProvider$");
- irc = _methProvider(&binCtx, &req);
+ memset(&binCtx,0,sizeof(BinRequestContext));
+ binCtx.oHdr = &req;
+ binCtx.bHdr = &sreq.hdr;
+ binCtx.bHdrSize = sizeof(sreq);
+ binCtx.chunkedMode=binCtx.xmlAs=binCtx.noResp=0;
+
+ lockUpCall(Broker);
+
+ irc = getProviderContext(&binCtx);
if (irc == MSG_X_PROVIDER) {
- localInvokeMethod(&binCtx, path, "ischild", in, NULL, &rc, 0);
- irc = (rc.rc == CMPI_RC_OK);
- } else
+ _SFCB_TRACE(1, ("--- Invoking Provider"));
+ resp = invokeProvider(&binCtx);
+ resp->rc--;
+ irc = (resp->rc == CMPI_RC_OK);
+ }
+ else {
+ mlogf(M_ERROR,M_SHOW,"-- no provider context isChild(%s:%s:%s)\n",
+ ns, parent, child);
irc = 0;
- CMRelease(path);
- CMRelease(in);
+ }
+
+ unlockUpCall(Broker);
+
+ if(resp) free(resp);
+ if(!localMode){
+ close(binCtx.provA.socket);
+ }
+ closeProviderContext(&binCtx);
_SFCB_RETURN(irc);
}
diff --git a/test/Makefile.am b/test/Makefile.am
index c0f56b1..c68a08d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -23,7 +23,8 @@
MAINTAINERCLEANFILES = Makefile.in
# Make this base dir available to testcases
-TESTS_ENVIRONMENT = SFCBTDIR=`pwd`
+#TESTS_ENVIRONMENT = SFCBTDIR=`pwd`
+TESTS_ENVIRONMENT = SFCBTDIR=$(srcdir)
if TEST_ENABLED
SUBDIRS = $(TEST_SUBDIRS)
diff --git a/test/TestProviders/tests/IndRetryTest.sh b/test/TestProviders/tests/IndRetryTest.sh
index d28edc1..bc21ca5 100755
--- a/test/TestProviders/tests/IndRetryTest.sh
+++ b/test/TestProviders/tests/IndRetryTest.sh
@@ -65,13 +65,13 @@ odir () {
}
cleanup () {
# Cleanup created objects and files
- sendxml IndTest5DeleteSubscription.xml /dev/null
- sendxml IndTest6DeleteHandler.xml /dev/null
- sendxml IndTest7DeleteFilter.xml /dev/null
+ sendxml $SRCDIR/IndTest5DeleteSubscription.xml /dev/null
+ sendxml $SRCDIR/IndTest6DeleteHandler.xml /dev/null
+ sendxml $SRCDIR/IndTest7DeleteFilter.xml /dev/null
odir clean
- if [ -f RIModIS.XML ]
+ if [ -f ./RIModIS.XML ]
then
- rm RIModIS.XML
+ rm ./RIModIS.XML
fi
}
@@ -85,10 +85,10 @@ sendInd () {
then
echo -n " initial ..."
# Invoke method to generate the indication
- sendxml IndTest4CallMethod.xml /dev/null
+ sendxml $SRCDIR/IndTest4CallMethod.xml /dev/null
sleep 5; # Wait due to deadlock prevention in localmode (indCIMXMLHandler.c)
else
- sendxml IndTest4CallMethod.xml /dev/null
+ sendxml $SRCDIR/IndTest4CallMethod.xml /dev/null
fi
# Check if it was sent
if [ -f $ODIR/SFCB_Listener.txt ]
@@ -100,9 +100,9 @@ sendInd () {
}
init () {
# Create Filter, Handler, Sub to setup indication
- sendxml IndTest1CreateFilter.xml /dev/null
- sendxml RICreateHandler.XML /dev/null
- sendxml IndTest3CreateSubscription.xml /dev/null
+ sendxml $SRCDIR/IndTest1CreateFilter.xml /dev/null
+ sendxml $SRCDIR/RICreateHandler.XML /dev/null
+ sendxml $SRCDIR/IndTest3CreateSubscription.xml /dev/null
}
###
@@ -116,7 +116,7 @@ cleanup
init
# Get the IndicationService that GenMI.pl will use
-sendxml RIEnumIS.XML ./RIEnumIS.result
+sendxml $SRCDIR/RIEnumIS.XML ./RIEnumIS.result
if [ $? -ne 0 ]
then
echo " Failed to get IndicationService"
@@ -128,13 +128,13 @@ fi
###
echo -n " Disabled indication retries: "
-./GenMI.pl 1 0 300 1
+$SRCDIR/GenMI.pl 1 0 300 1
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
# No odir, so initial should fail
odir clean
@@ -163,13 +163,13 @@ fi
###
echo -n " Enabled indication retries: "
-./GenMI.pl 1 5 300 1
+$SRCDIR/GenMI.pl 1 5 300 1
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1;
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
# No odir, so initial should fail
odir clean
@@ -200,13 +200,13 @@ cleanup
init
echo -n " Subscription disable: "
-./GenMI.pl 1 5 2 3
+$SRCDIR/GenMI.pl 1 5 2 3
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1;
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
# No odir, so initial should fail
odir clean
@@ -219,7 +219,7 @@ else
# Still no odir, so keeps failing, and should disable sub
echo -n " disable ..."
sleep 10
- sendxml RIGetSub.XML ./RIGetSubDisable.result
+ sendxml $SRCDIR/RIGetSub.XML ./RIGetSubDisable.result
grep -A1 '"SubscriptionState"' ./RIGetSubDisable.result | grep '<VALUE>4</VALUE>' >/dev/null 2>&1
if [ $? -eq 1 ]
then
@@ -239,13 +239,13 @@ cleanup
init
echo -n " Subscription Removal: "
-./GenMI.pl 1 5 2 2
+$SRCDIR/GenMI.pl 1 5 2 2
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1;
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
# No odir, so initial should fail
odir clean
@@ -258,7 +258,7 @@ else
# Still no odir, so keeps failing, and should remove sub
echo -n " remove ..."
sleep 10
- sendxml RIGetSub.XML ./RIGetSubRemove.result
+ sendxml $SRCDIR/RIGetSub.XML ./RIGetSubRemove.result
grep '<VALUE>' ./RIGetSubRemove.result >/dev/null 2>&1
if [ $? -eq 0 ]
then
@@ -276,13 +276,13 @@ fi
cleanup
init
echo -n " Indication flood: "
-./GenMI.pl 10 3 300 1
+$SRCDIR/GenMI.pl 10 3 300 1
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1;
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
i=0
j=0
@@ -341,12 +341,12 @@ fi
###
cleanup
# Set Indication_Service back to the defaults
-./GenMI.pl 20 3 2592000 2
+$SRCDIR/GenMI.pl 20 3 2592000 2
if [ $? -ne 0 ]
then
echo " GenMI.pl FAILED"
exit 1;
fi
-sendxml RIModIS.XML /dev/null
+sendxml ./RIModIS.XML /dev/null
rm RIEnumIS.result
exit $RC
diff --git a/test/TestProviders/tests/Makefile.am b/test/TestProviders/tests/Makefile.am
index 13fe7af..e89ab6d 100644
--- a/test/TestProviders/tests/Makefile.am
+++ b/test/TestProviders/tests/Makefile.am
@@ -31,4 +31,5 @@ else
endif
#Some wbemcat tests
-TESTS = xmltest.sh IndRetryTest.sh
+export SRCDIR=$(srcdir)
+TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh
diff --git a/test/TestProviders/tests/xmltest.sh b/test/TestProviders/tests/xmltest.sh
index d8f32e4..b023e9d 100755
--- a/test/TestProviders/tests/xmltest.sh
+++ b/test/TestProviders/tests/xmltest.sh
@@ -35,12 +35,12 @@ if ! touch ./testfile > /dev/null; then
fi
rm -f ./testfile
-for xmlfile in `ls *xml`
+for xmlfile in `ls $SRCDIR/*xml`
do
_TEST=${xmlfile%.xml}
_TESTOK=$_TEST.OK
_TESTLINES=$_TEST.lines
- _TESTRESULT=$_TEST.result
+ _TESTRESULT=$(basename _TEST).result
_TESTPREREQ=$_TEST.prereq
_TESTNAME=$_TEST
diff --git a/test/commands/Makefile.am b/test/commands/Makefile.am
index ee2e688..6b8e972 100644
--- a/test/commands/Makefile.am
+++ b/test/commands/Makefile.am
@@ -23,4 +23,5 @@
MAINTAINERCLEANFILES = Makefile.in
#Some wbemcat tests
+export SRCDIR=$(srcdir)
TESTS = cmdusage.sh sfcbdump.sh
diff --git a/test/commands/sfcbdump.sh b/test/commands/sfcbdump.sh
index fa08991..59d7c38 100755
--- a/test/commands/sfcbdump.sh
+++ b/test/commands/sfcbdump.sh
@@ -1,6 +1,6 @@
#!/bin/sh
RC=0
-if ! sfcbdump classSchemas | grep Linux_CSProcessor > /dev/null
+if ! sfcbdump $SRCDIR/classSchemas | grep Linux_CSProcessor > /dev/null
then
RC=1
fi
diff --git a/test/unittest/Makefile.am b/test/unittest/Makefile.am
index f0ddf7a..d9a754f 100644
--- a/test/unittest/Makefile.am
+++ b/test/unittest/Makefile.am
@@ -22,6 +22,7 @@
MAINTAINERCLEANFILES = Makefile.in
+AM_CPPFLAGS=-I$(top_srcdir)
AM_LDFLAGS=-L"$(top_builddir)/.libs"
TESTS_ENVIRONMENT = SFCB_TRACE_FILE="/tmp/sfcbtracetest"
diff --git a/test/xmltest/Makefile.am b/test/xmltest/Makefile.am
index df6b313..b30cd14 100644
--- a/test/xmltest/Makefile.am
+++ b/test/xmltest/Makefile.am
@@ -31,4 +31,5 @@ else
endif
#Some wbemcat tests
+export SRCDIR=$(srcdir)
TESTS = xmltest.sh
diff --git a/test/xmltest/xmltest.sh b/test/xmltest/xmltest.sh
index 084c44f..105c378 100755
--- a/test/xmltest/xmltest.sh
+++ b/test/xmltest/xmltest.sh
@@ -35,12 +35,12 @@ if ! touch ./testfile > /dev/null; then
fi
rm -f ./testfile
-for xmlfile in `ls *xml`
+for xmlfile in `ls $SRCDIR/*xml`
do
_TEST=${xmlfile%.xml}
_TESTOK=$_TEST.OK
_TESTLINES=$_TEST.lines
- _TESTRESULT=$_TEST.result
+ _TESTRESULT=$(basename _TEST).result
_TESTPREREQ=$_TEST.prereq
_TESTNAME=$_TEST
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|