Summary: smf: Validation error for rollback CCB and a related core dump [#2858] Review request for Ticket(s): 2858 Peer Reviewer(s): nguyen.tk....@dektech.com.au Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-2858 Base revision: 1c4c6ad57fdf44b228ec83f777ae957e878f1d61 Personal repository: git://git.code.sf.net/u/elunlen/review
-------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services y OpenSAF services n Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- The lists of IMM operations that are created in many places may contain object create operations for objects that already exists in the IMM model. The lists may also contain more than one create operation for the same object. If a create operation for any of the duplicates is added to the CCB, ERR_EXSIST will be returned. To avoid this it must be checked for each create operation if the IMM model already contains the object and also that the same object create is not added twice to the CCB. Also if a duplicate object to create is found the rollbackData that is created for all IMM operations must be deleted if the corresponding operation is a duplicate. See doImmOperations() in SmfUtil.cc The patch contains a new class that is used to check if an object to be created exist in the IMM model. This class can be found in the new SmfUtils_ObjExist.* files. A test program for the class is created and can be found in .../imm_modify_demo/test_objexist.cc. A shell command, test_objexist, is created and installed if --enble-tests is used with the configure script. To make sure duplicate object create requests is not added the ccb descriptor is updated so that a duplicate create descriptor is not added. The ccb decriptor AddCreate() method will also return false if a create descriptor is not added. See ../imm_modify_config/immccb.h revision cf93518e220de4e0b9053d46850d926ef0293f33 Author: Lennart Lund <lennart.l...@ericsson.com> Date: Tue, 29 May 2018 15:47:05 +0200 smf: Validation error for rollback CCB and a related core dump [#2858] SMF imm operation lists may contain duplicate create operations. Fix, rollback data shall not be stored for duplicate operations and duplicate operations shall not be added to the CCB. Fix, crash in SmfUtil::doImmoperation if the CCB fails Added Files: ------------ src/smf/smfd/imm_modify_demo/test_objexist.cc src/smf/smfd/SmfUtils_ObjExist.cc src/smf/smfd/SmfUtils_ObjExist.h Complete diffstat: ------------------ opensaf.spec.in | 3 +- src/smf/Makefile.am | 42 ++- src/smf/smfd/SmfUtils.cc | 72 ++++- src/smf/smfd/SmfUtils_ObjExist.cc | 290 +++++++++++++++++++++ src/smf/smfd/SmfUtils_ObjExist.h | 68 +++++ .../smfd/imm_modify_config/add_operation_to_ccb.cc | 5 +- src/smf/smfd/imm_modify_config/immccb.h | 53 +++- .../{ccbhdl_test.cc => test_ccbhdl.cc} | 0 src/smf/smfd/imm_modify_demo/test_objexist.cc | 127 +++++++++ 9 files changed, 633 insertions(+), 27 deletions(-) Testing Commands: ----------------- *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** Testing, Expected Results: -------------------------- *** PASTE COMMAND OUTPUTS / TEST RESULTS *** Conditions of Submission: ------------------------- *** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC *** Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 n n powerpc n n powerpc64 n n Reviewer Checklist: ------------------- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. ------------------------------------------------------------------------------ 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