Hi, Ack. See my comments below tagged [Lennart]
Thanks Lennart > -----Original Message----- > From: ratnamala <ratnam...@hasolutions.in> > Sent: den 21 augusti 2018 15:46 > To: Lennart Lund <lennart.l...@ericsson.com>; Vu Minh Nguyen > <vu.m.ngu...@dektech.com.au> > Cc: opensaf-devel@lists.sourceforge.net; ratnamala > <ratnam...@hasolutions.in> > Subject: [PATCH 1/1] log: add new test case of API saLogInitialize() of > apitest > [#2915] > > --- > src/log/apitest/tet_saLogInitialize.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/log/apitest/tet_saLogInitialize.c > b/src/log/apitest/tet_saLogInitialize.c > index 3d31c8e..68c965d 100644 > --- a/src/log/apitest/tet_saLogInitialize.c > +++ b/src/log/apitest/tet_saLogInitialize.c > @@ -108,6 +108,12 @@ void saLogInitialize_11(void) > test_validate(rc, SA_AIS_OK); > } > [Lennart] Add information about what's tested. All test cases should have a description telling WHAT is tested. Note that a function like this where it is quite obvious what it is doing normally do not need a specific description but test cases is an exception. You should also give the test case a descriptive name (will document the test case where it is called) Unfortunately most test cases are poorly documented and any big effort to fix this may not be worth the effort but it should be done for new and updated test cases. Suggest that you do something like this: // Test that SA_AIS_ERR_INVALID_PARAM is returned if version parameter is set to a NULL pointer > -void saLogInitialize_12(void) + void saLogInitialize_version_NULL_pointer_error(void) > +{ > + rc = saLogInitialize(&logHandle, &logCallbacks, NULL); > + logFinalize(); > + test_validate(rc, SA_AIS_ERR_INVALID_PARAM); > +} > extern void saLogSelectionObjectGet_01(void); > extern void saLogSelectionObjectGet_02(void); > extern void saLogFinalize_01(void); > @@ -139,6 +145,8 @@ __attribute__((constructor)) static void > saLibraryLifeCycle_constructor(void) > "saLogInitialize() with minor version is set bigger than supported > version"); > test_case_add(1, saLogInitialize_11, > "saLogInitialize() with minor version is not set"); > + test_case_add(1, saLogInitialize_12, > + "saLogInitialize() with valid handle,valid callbacks and version > as NULL"); > test_case_add(1, saLogSelectionObjectGet_01, > "saLogSelectionObjectGet() OK"); > test_case_add(1, saLogSelectionObjectGet_02, > -- > 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel