You can subscribe to this list here.
| 2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(442) |
May
(1532) |
Jun
(148) |
Jul
(178) |
Aug
(165) |
Sep
(196) |
Oct
(265) |
Nov
(230) |
Dec
(312) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2014 |
Jan
(328) |
Feb
(254) |
Mar
(141) |
Apr
(378) |
May
(441) |
Jun
(374) |
Jul
(235) |
Aug
(349) |
Sep
(396) |
Oct
(238) |
Nov
(138) |
Dec
(109) |
| 2015 |
Jan
(86) |
Feb
(81) |
Mar
(250) |
Apr
(180) |
May
(159) |
Jun
(106) |
Jul
(211) |
Aug
(248) |
Sep
(516) |
Oct
(297) |
Nov
(194) |
Dec
(196) |
| 2016 |
Jan
(232) |
Feb
(328) |
Mar
(422) |
Apr
(244) |
May
(281) |
Jun
(210) |
Jul
(211) |
Aug
(563) |
Sep
(440) |
Oct
(317) |
Nov
(405) |
Dec
(224) |
| 2017 |
Jan
(207) |
Feb
(399) |
Mar
(373) |
Apr
(206) |
May
(213) |
Jun
(215) |
Jul
(81) |
Aug
(151) |
Sep
(126) |
Oct
(336) |
Nov
(179) |
Dec
(149) |
| 2018 |
Jan
(194) |
Feb
(118) |
Mar
(234) |
Apr
(190) |
May
(103) |
Jun
(100) |
Jul
(162) |
Aug
(139) |
Sep
(140) |
Oct
(140) |
Nov
(181) |
Dec
(54) |
| 2019 |
Jan
(94) |
Feb
(76) |
Mar
(49) |
Apr
(46) |
May
(52) |
Jun
(79) |
Jul
(43) |
Aug
(97) |
Sep
(88) |
Oct
(138) |
Nov
(104) |
Dec
(66) |
| 2020 |
Jan
(85) |
Feb
(107) |
Mar
(68) |
Apr
(61) |
May
(52) |
Jun
(23) |
Jul
(118) |
Aug
(67) |
Sep
(27) |
Oct
(33) |
Nov
(41) |
Dec
(24) |
| 2021 |
Jan
(19) |
Feb
(11) |
Mar
(47) |
Apr
(39) |
May
(51) |
Jun
(18) |
Jul
(19) |
Aug
(16) |
Sep
(35) |
Oct
(15) |
Nov
(10) |
Dec
(21) |
| 2022 |
Jan
(12) |
Feb
(11) |
Mar
(30) |
Apr
(6) |
May
(10) |
Jun
(12) |
Jul
(13) |
Aug
(10) |
Sep
(3) |
Oct
(4) |
Nov
(24) |
Dec
(25) |
| 2023 |
Jan
(3) |
Feb
(3) |
Mar
(11) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(2) |
| 2024 |
Jan
(9) |
Feb
(1) |
Mar
(2) |
Apr
(8) |
May
(8) |
Jun
(5) |
Jul
(6) |
Aug
(3) |
Sep
(3) |
Oct
(3) |
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
(6) |
Dec
(12) |
| 2026 |
Jan
(3) |
Feb
(5) |
Mar
(2) |
Apr
(19) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Thien H. <thi...@en...> - 2026-05-15 08:43:22
|
Previously, only sought and matched attributes were logged, which was
insufficient for debugging. It was unclear which attributes were missing
in the cluster.
This commit adds logging to explicitly show missing attributes, making
debugging more straightforward.
---
src/imm/immnd/ImmModel.cc | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
index d0add57d8..d79e7a5be 100644
--- a/src/imm/immnd/ImmModel.cc
+++ b/src/imm/immnd/ImmModel.cc
@@ -18,6 +18,7 @@
*/
#include <set>
+#include <list>
#include <algorithm>
#include <time.h>
@@ -12439,10 +12440,22 @@ SaAisErrorT ImmModel::accessorGet(const ImmsvOmSearchInit* req,
if ((searchOptions & SA_IMM_SEARCH_GET_SOME_ATTR) &&
(matchedAttributes != soughtAttributes)) {
+ std::string attributeNames;
+ ImmsvAttrNameList* list = req->attributeNames;
+ while (list) {
+ size_t sz = strnlen((char*)list->name.buf, (size_t)list->name.size);
+ std::string attName((const char*)list->name.buf, sz);
+ if (obj->mAttrValueMap.find(attName) == obj->mAttrValueMap.end()) {
+ if (!attributeNames.empty()) attributeNames += ", ";
+ attributeNames += attName;
+ }
+ list = list->next;
+ }
LOG_NO(
- "ERR_NOT_EXIST: Some attributeNames did not exist in Object '%s' "
- "(nrof names:%u matched:%u)",
- objectName.c_str(), soughtAttributes, matchedAttributes);
+ "ERR_NOT_EXIST: Some attributeNames '%s' did not exist in Object '%s' "
+ "(nrof names:%d matched:%d)",
+ attributeNames.c_str(), objectName.c_str(), soughtAttributes,
+ matchedAttributes);
err = SA_AIS_ERR_NOT_EXIST;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-05-15 08:43:21
|
Summary: imm: log missing attribute when it does not exist [#3379] Review request for Ticket(s): 3379 Peer Reviewer(s): Dat, Tai Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3379 Base revision: ea0c7cce3fa4593f556016fa3506126c6d3f5c21 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services y Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 79b58b51950f922634110965da132fdcf75ddf66 Author: Thien Minh Huynh <thi...@en...> Date: Fri, 15 May 2026 06:17:14 +0200 imm: log missing attribute when it does not exist [#3379] Previously, only sought and matched attributes were logged, which was insufficient for debugging. It was unclear which attributes were missing in the cluster. This commit adds logging to explicitly show missing attributes, making debugging more straightforward. Complete diffstat: ------------------ src/imm/immnd/ImmModel.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewers Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-05-14 05:58:46
|
When avd_csi_config_get returns SA_AIS_ERR_NOT_EXIST on a standby
node, the SI is deleted but execution falls through to the else
branch causing an unnecessary goto done2. Add continue to skip
to the next iteration after deleting the SI.
---
src/amf/amfd/si.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/amf/amfd/si.cc b/src/amf/amfd/si.cc
index 28ab0ccae..8efc16cb9 100644
--- a/src/amf/amfd/si.cc
+++ b/src/amf/amfd/si.cc
@@ -832,6 +832,7 @@ SaAisErrorT avd_si_config_get(AVD_APP *app) {
if ((rc = avd_csi_config_get(si_str, si)) != SA_AIS_OK) {
if ((rc == SA_AIS_ERR_NOT_EXIST) && (avd_cb->is_active() == false)) {
avd_si_delete(si);
+ continue;
} else {
goto done2;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-05-14 05:58:45
|
Fix potential memory leaks in imm_loader.cc, imm_cfg.c, and
imm_import.cc where the result of realloc() was assigned directly
to the original pointer. If realloc() fails and returns NULL, the
original memory is leaked.
Use a temporary variable to hold the realloc() result, check for
NULL, and only then assign back to the original pointer. Also add
missing NULL checks and proper cleanup on failure paths.
---
src/imm/immloadd/imm_loader.cc | 17 +++++++++----
src/imm/tools/imm_cfg.c | 46 +++++++++++++++++++++++++++-------
src/imm/tools/imm_import.cc | 19 ++++++++++----
3 files changed, 63 insertions(+), 19 deletions(-)
diff --git a/src/imm/immloadd/imm_loader.cc b/src/imm/immloadd/imm_loader.cc
index 2ab3ae768..f1199f7ba 100644
--- a/src/imm/immloadd/imm_loader.cc
+++ b/src/imm/immloadd/imm_loader.cc
@@ -1344,12 +1344,13 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
/* Copy the distinguished name */
if (state->objectName) {
- state->objectName = (char *)realloc(
+ char *object_name = (char *)realloc(
state->objectName, strlen(state->objectName) + len + 1);
- if (state->objectName == NULL) {
+ if (object_name == NULL) {
LOG_ER("Failed to realloc state->objectName");
exit(1);
}
+ state->objectName = object_name;
strncat(state->objectName, (const char *)chars, (size_t)len);
} else {
state->objectName = (char *)malloc((size_t)len + 1);
@@ -1373,12 +1374,13 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
strncpy(state->attrName, (const char *)chars, (size_t)len);
state->attrName[len] = '\0';
} else {
- state->attrName =
+ char *attr_name =
(char *)realloc(state->attrName, strlen(state->attrName) + len + 1);
- if (state->attrName == NULL) {
+ if (attr_name == NULL) {
LOG_ER("Failed to realloc state->attrName");
exit(1);
}
+ state->attrName = attr_name;
strncat(state->attrName, (const char *)chars, len);
}
@@ -1485,8 +1487,13 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
* call for same value */
assert(state->attrDefaultValueSet);
int newlen = strlen(state->attrDefaultValueBuffer) + len;
- state->attrDefaultValueBuffer = (char *)realloc(
+ char *default_value = (char *)realloc(
(void *)state->attrDefaultValueBuffer, (size_t)newlen + 1);
+ if (default_value == NULL) {
+ LOG_ER("Failed to realloc state->attrDefaultValueBuffer");
+ exit(1);
+ }
+ state->attrDefaultValueBuffer = default_value;
strncat(state->attrDefaultValueBuffer, (const char *)chars,
(size_t)len);
state->attrDefaultValueBuffer[newlen] = '\0';
diff --git a/src/imm/tools/imm_cfg.c b/src/imm/tools/imm_cfg.c
index b4972c874..d5f847dd9 100644
--- a/src/imm/tools/imm_cfg.c
+++ b/src/imm/tools/imm_cfg.c
@@ -574,11 +574,17 @@ int object_create(const SaNameT **objectNames, const SaImmClassNameT className,
while (attrValues[j]) {
if (!strcmp(attrValue->attrName,
attrValues[j]->attrName)) {
- attrValues[j]->attrValues = realloc(
- attrValues[j]->attrValues,
- (attrValues[j]->attrValuesNumber +
- 1) *
- sizeof(SaImmAttrValueT *));
+ SaImmAttrValueT *tmp_attr_values =
+ realloc(attrValues[j]->attrValues,
+ (attrValues[j]->attrValuesNumber +
+ 1) *
+ sizeof(SaImmAttrValueT *));
+ if (tmp_attr_values == NULL) {
+ fprintf(stderr, "realloc() error\n");
+ free_attr_values(attrValue);
+ goto done;
+ }
+ attrValues[j]->attrValues = tmp_attr_values;
attrValues[j]->attrValues
[attrValues[j]->attrValuesNumber] =
attrValue->attrValues[0];
@@ -613,8 +619,15 @@ int object_create(const SaNameT **objectNames, const SaImmClassNameT className,
attrAdded = false;
}
- attrValues =
- realloc(attrValues, (attr_len + 1) * sizeof(SaImmAttrValuesT_2 *));
+ {
+ SaImmAttrValuesT_2 **tmp_attr_values = realloc(
+ attrValues, (attr_len + 1) * sizeof(SaImmAttrValuesT_2 *));
+ if (tmp_attr_values == NULL) {
+ fprintf(stderr, "realloc() error\n");
+ goto done;
+ }
+ attrValues = tmp_attr_values;
+ }
attrValues[attr_len] = NULL;
if (ccbHandle == -1) {
@@ -1477,9 +1490,17 @@ static char *readinput(char *prompt)
if (line[len - 1] == '\\') {
line[len - 1] = 0;
if (rdlen) {
- rdline = realloc(rdline, rdlen + len);
+ char *tmp = realloc(rdline, rdlen + len);
+ if (tmp == NULL) {
+ free(line);
+ if (rdline)
+ free(rdline);
+ return NULL;
+ }
+ rdline = tmp;
strncat(rdline, line, len + 1);
rdlen += len - 1;
+ free(line);
} else {
rdline = line;
rdlen = len;
@@ -1487,8 +1508,15 @@ static char *readinput(char *prompt)
pmt = NULL;
} else {
if (rdline) {
- rdline = realloc(rdline, rdlen + len + 1);
+ char *tmp = realloc(rdline, rdlen + len + 1);
+ if (tmp == NULL) {
+ free(line);
+ free(rdline);
+ return NULL;
+ }
+ rdline = tmp;
strncat(rdline, line, len + 1);
+ free(line);
} else
rdline = line;
diff --git a/src/imm/tools/imm_import.cc b/src/imm/tools/imm_import.cc
index 861c761bd..896fed7fa 100644
--- a/src/imm/tools/imm_import.cc
+++ b/src/imm/tools/imm_import.cc
@@ -1783,14 +1783,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
}
if (state->objectName) {
- state->objectName = (char *)realloc(
+ char *object_name = (char *)realloc(
state->objectName, strlen(state->objectName) + len + 1);
- if (state->objectName == NULL) {
+ if (object_name == NULL) {
LOG_ER("Failed to realloc state->objectName");
stopParser(state);
state->parsingStatus = 1;
return;
}
+ state->objectName = object_name;
strncat(state->objectName, (const char *)chars, (size_t)len);
} else {
state->objectName = (char *)malloc((size_t)len + 1);
@@ -1818,14 +1819,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
strncpy(state->attrName, (const char *)chars, (size_t)len);
state->attrName[len] = '\0';
} else {
- state->attrName =
+ char *attr_name =
(char *)realloc(state->attrName, strlen(state->attrName) + len + 1);
- if (state->attrName == NULL) {
+ if (attr_name == NULL) {
LOG_ER("Failed to realloc state->attrName");
stopParser(state);
state->parsingStatus = 1;
return;
}
+ state->attrName = attr_name;
strncat(state->attrName, (const char *)chars, len);
}
@@ -1943,8 +1945,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
* call for same value */
assert(state->attrDefaultValueSet);
int newlen = strlen(state->attrDefaultValueBuffer) + len;
- state->attrDefaultValueBuffer = (char *)realloc(
+ char *default_value = (char *)realloc(
(void *)state->attrDefaultValueBuffer, (size_t)newlen + 1);
+ if (default_value == NULL) {
+ LOG_ER("Failed to realloc state->attrDefaultValueBuffer");
+ stopParser(state);
+ state->parsingStatus = 1;
+ return;
+ }
+ state->attrDefaultValueBuffer = default_value;
strncat(state->attrDefaultValueBuffer, (const char *)chars,
(size_t)len);
state->attrDefaultValueBuffer[newlen] = '\0';
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-05-14 05:58:43
|
Summary: amfd: add continue after avd_si_delete on standby node [#3398] Review request for Ticket(s): 3398 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3398 Base revision: ea0c7cce3fa4593f556016fa3506126c6d3f5c21 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services y Core libraries n Samples n Tests n Other y NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision cb432c7a24078bfc870da1cc84dcba859b7ecf85 Author: Thien Minh Huynh <thi...@en...> Date: Thu, 14 May 2026 04:55:05 +0200 imm: fix realloc failure handling in XML import [#3398] Fix potential memory leaks in imm_loader.cc, imm_cfg.c, and imm_import.cc where the result of realloc() was assigned directly to the original pointer. If realloc() fails and returns NULL, the original memory is leaked. Use a temporary variable to hold the realloc() result, check for NULL, and only then assign back to the original pointer. Also add missing NULL checks and proper cleanup on failure paths. revision b484b6237e7efe68d29c056adfa56bafa9d9ee39 Author: Thien Minh Huynh <thi...@en...> Date: Tue, 12 May 2026 04:24:01 +0200 amfd: add continue after avd_si_delete on standby node [#3398] When avd_csi_config_get returns SA_AIS_ERR_NOT_EXIST on a standby node, the SI is deleted but execution falls through to the else branch causing an unnecessary goto done2. Add continue to skip to the next iteration after deleting the SI. Complete diffstat: ------------------ src/amf/amfd/si.cc | 1 + src/imm/immloadd/imm_loader.cc | 17 +++++++++++----- src/imm/tools/imm_cfg.c | 46 +++++++++++++++++++++++++++++++++--------- src/imm/tools/imm_import.cc | 19 ++++++++++++----- 4 files changed, 64 insertions(+), 19 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewers Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-05-12 08:39:43
|
Fix potential memory leaks in imm_loader.cc, imm_cfg.c, and
imm_import.cc where the result of realloc() was assigned directly
to the original pointer. If realloc() fails and returns NULL, the
original memory is leaked.
Use a temporary variable to hold the realloc() result, check for
NULL, and only then assign back to the original pointer. Also add
missing NULL checks and proper cleanup on failure paths.
---
src/imm/immloadd/imm_loader.cc | 23 +++++++++++++----
src/imm/tools/imm_cfg.c | 47 +++++++++++++++++++++++++++-------
src/imm/tools/imm_import.cc | 19 ++++++++++----
3 files changed, 70 insertions(+), 19 deletions(-)
diff --git a/src/imm/immloadd/imm_loader.cc b/src/imm/immloadd/imm_loader.cc
index 2ab3ae768..c19911ace 100644
--- a/src/imm/immloadd/imm_loader.cc
+++ b/src/imm/immloadd/imm_loader.cc
@@ -1344,12 +1344,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
/* Copy the distinguished name */
if (state->objectName) {
- state->objectName = (char *)realloc(
+ char *object_name = (char *)realloc(
state->objectName, strlen(state->objectName) + len + 1);
- if (state->objectName == NULL) {
+ if (object_name == NULL) {
LOG_ER("Failed to realloc state->objectName");
+ free(state->objectName);
+ state->objectName = NULL;
exit(1);
}
+ state->objectName = object_name;
strncat(state->objectName, (const char *)chars, (size_t)len);
} else {
state->objectName = (char *)malloc((size_t)len + 1);
@@ -1373,12 +1376,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
strncpy(state->attrName, (const char *)chars, (size_t)len);
state->attrName[len] = '\0';
} else {
- state->attrName =
+ char *attr_name =
(char *)realloc(state->attrName, strlen(state->attrName) + len + 1);
- if (state->attrName == NULL) {
+ if (attr_name == NULL) {
LOG_ER("Failed to realloc state->attrName");
+ free(state->attrName);
+ state->attrName = NULL;
exit(1);
}
+ state->attrName = attr_name;
strncat(state->attrName, (const char *)chars, len);
}
@@ -1485,8 +1491,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
* call for same value */
assert(state->attrDefaultValueSet);
int newlen = strlen(state->attrDefaultValueBuffer) + len;
- state->attrDefaultValueBuffer = (char *)realloc(
+ char *default_value = (char *)realloc(
(void *)state->attrDefaultValueBuffer, (size_t)newlen + 1);
+ if (default_value == NULL) {
+ LOG_ER("Failed to realloc state->attrDefaultValueBuffer");
+ free(state->attrDefaultValueBuffer);
+ state->attrDefaultValueBuffer = NULL;
+ exit(1);
+ }
+ state->attrDefaultValueBuffer = default_value;
strncat(state->attrDefaultValueBuffer, (const char *)chars,
(size_t)len);
state->attrDefaultValueBuffer[newlen] = '\0';
diff --git a/src/imm/tools/imm_cfg.c b/src/imm/tools/imm_cfg.c
index b4972c874..f25cf49c5 100644
--- a/src/imm/tools/imm_cfg.c
+++ b/src/imm/tools/imm_cfg.c
@@ -574,11 +574,17 @@ int object_create(const SaNameT **objectNames, const SaImmClassNameT className,
while (attrValues[j]) {
if (!strcmp(attrValue->attrName,
attrValues[j]->attrName)) {
- attrValues[j]->attrValues = realloc(
- attrValues[j]->attrValues,
- (attrValues[j]->attrValuesNumber +
- 1) *
- sizeof(SaImmAttrValueT *));
+ SaImmAttrValueT *tmp_attr_values =
+ realloc(attrValues[j]->attrValues,
+ (attrValues[j]->attrValuesNumber +
+ 1) *
+ sizeof(SaImmAttrValueT *));
+ if (tmp_attr_values == NULL) {
+ fprintf(stderr, "realloc() error\n");
+ free_attr_values(attrValue);
+ goto done;
+ }
+ attrValues[j]->attrValues = tmp_attr_values;
attrValues[j]->attrValues
[attrValues[j]->attrValuesNumber] =
attrValue->attrValues[0];
@@ -613,8 +619,15 @@ int object_create(const SaNameT **objectNames, const SaImmClassNameT className,
attrAdded = false;
}
- attrValues =
- realloc(attrValues, (attr_len + 1) * sizeof(SaImmAttrValuesT_2 *));
+ {
+ SaImmAttrValuesT_2 **tmp_attr_values = realloc(
+ attrValues, (attr_len + 1) * sizeof(SaImmAttrValuesT_2 *));
+ if (tmp_attr_values == NULL) {
+ fprintf(stderr, "realloc() error\n");
+ goto done;
+ }
+ attrValues = tmp_attr_values;
+ }
attrValues[attr_len] = NULL;
if (ccbHandle == -1) {
@@ -1477,9 +1490,17 @@ static char *readinput(char *prompt)
if (line[len - 1] == '\\') {
line[len - 1] = 0;
if (rdlen) {
- rdline = realloc(rdline, rdlen + len);
+ char *tmp = realloc(rdline, rdlen + len);
+ if (tmp == NULL) {
+ free(line);
+ if (rdline)
+ free(rdline);
+ return NULL;
+ }
+ rdline = tmp;
strncat(rdline, line, len + 1);
rdlen += len - 1;
+ free(line);
} else {
rdline = line;
rdlen = len;
@@ -1487,8 +1508,16 @@ static char *readinput(char *prompt)
pmt = NULL;
} else {
if (rdline) {
- rdline = realloc(rdline, rdlen + len + 1);
+ char *tmp = realloc(rdline, rdlen + len + 1);
+ if (tmp == NULL) {
+ free(line);
+ if (rdline)
+ free(rdline);
+ return NULL;
+ }
+ rdline = tmp;
strncat(rdline, line, len + 1);
+ free(line);
} else
rdline = line;
diff --git a/src/imm/tools/imm_import.cc b/src/imm/tools/imm_import.cc
index 861c761bd..896fed7fa 100644
--- a/src/imm/tools/imm_import.cc
+++ b/src/imm/tools/imm_import.cc
@@ -1783,14 +1783,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
}
if (state->objectName) {
- state->objectName = (char *)realloc(
+ char *object_name = (char *)realloc(
state->objectName, strlen(state->objectName) + len + 1);
- if (state->objectName == NULL) {
+ if (object_name == NULL) {
LOG_ER("Failed to realloc state->objectName");
stopParser(state);
state->parsingStatus = 1;
return;
}
+ state->objectName = object_name;
strncat(state->objectName, (const char *)chars, (size_t)len);
} else {
state->objectName = (char *)malloc((size_t)len + 1);
@@ -1818,14 +1819,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
strncpy(state->attrName, (const char *)chars, (size_t)len);
state->attrName[len] = '\0';
} else {
- state->attrName =
+ char *attr_name =
(char *)realloc(state->attrName, strlen(state->attrName) + len + 1);
- if (state->attrName == NULL) {
+ if (attr_name == NULL) {
LOG_ER("Failed to realloc state->attrName");
stopParser(state);
state->parsingStatus = 1;
return;
}
+ state->attrName = attr_name;
strncat(state->attrName, (const char *)chars, len);
}
@@ -1943,8 +1945,15 @@ static void charactersHandler(void *userData, const xmlChar *chars, int len) {
* call for same value */
assert(state->attrDefaultValueSet);
int newlen = strlen(state->attrDefaultValueBuffer) + len;
- state->attrDefaultValueBuffer = (char *)realloc(
+ char *default_value = (char *)realloc(
(void *)state->attrDefaultValueBuffer, (size_t)newlen + 1);
+ if (default_value == NULL) {
+ LOG_ER("Failed to realloc state->attrDefaultValueBuffer");
+ stopParser(state);
+ state->parsingStatus = 1;
+ return;
+ }
+ state->attrDefaultValueBuffer = default_value;
strncat(state->attrDefaultValueBuffer, (const char *)chars,
(size_t)len);
state->attrDefaultValueBuffer[newlen] = '\0';
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-05-12 08:39:41
|
When avd_csi_config_get returns SA_AIS_ERR_NOT_EXIST on a standby
node, the SI is deleted but execution falls through to the else
branch causing an unnecessary goto done2. Add continue to skip
to the next iteration after deleting the SI.
---
src/amf/amfd/si.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/amf/amfd/si.cc b/src/amf/amfd/si.cc
index 28ab0ccae..8efc16cb9 100644
--- a/src/amf/amfd/si.cc
+++ b/src/amf/amfd/si.cc
@@ -832,6 +832,7 @@ SaAisErrorT avd_si_config_get(AVD_APP *app) {
if ((rc = avd_csi_config_get(si_str, si)) != SA_AIS_OK) {
if ((rc == SA_AIS_ERR_NOT_EXIST) && (avd_cb->is_active() == false)) {
avd_si_delete(si);
+ continue;
} else {
goto done2;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-05-12 08:39:40
|
Summary: amfd: add continue after avd_si_delete on standby node [#3398] Review request for Ticket(s): 3398 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3398 Base revision: ea0c7cce3fa4593f556016fa3506126c6d3f5c21 Personal repository: git://git.code.sf.net/u/thienhuynh/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 y NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 62eb2d53ac34fa9f73c810ac80dcabe3944eb44e Author: Thien Minh Huynh <thi...@en...> Date: Tue, 12 May 2026 04:25:22 +0200 imm: fix realloc failure handling in XML import [#3398] Fix potential memory leaks in imm_loader.cc, imm_cfg.c, and imm_import.cc where the result of realloc() was assigned directly to the original pointer. If realloc() fails and returns NULL, the original memory is leaked. Use a temporary variable to hold the realloc() result, check for NULL, and only then assign back to the original pointer. Also add missing NULL checks and proper cleanup on failure paths. revision b484b6237e7efe68d29c056adfa56bafa9d9ee39 Author: Thien Minh Huynh <thi...@en...> Date: Tue, 12 May 2026 04:24:01 +0200 amfd: add continue after avd_si_delete on standby node [#3398] When avd_csi_config_get returns SA_AIS_ERR_NOT_EXIST on a standby node, the SI is deleted but execution falls through to the else branch causing an unnecessary goto done2. Add continue to skip to the next iteration after deleting the SI. Complete diffstat: ------------------ src/amf/amfd/si.cc | 1 + src/imm/immloadd/imm_loader.cc | 23 ++++++++++++++++----- src/imm/tools/imm_cfg.c | 47 ++++++++++++++++++++++++++++++++++-------- src/imm/tools/imm_import.cc | 19 ++++++++++++----- 4 files changed, 71 insertions(+), 19 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewers Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-24 05:07:16
|
---
src/mds/apitest/mdstipc.h | 2 +
src/mds/apitest/mdstipc_api.c | 175 +++++++++++++++++++++++++++++++++-
2 files changed, 175 insertions(+), 2 deletions(-)
diff --git a/src/mds/apitest/mdstipc.h b/src/mds/apitest/mdstipc.h
index c03824252..cd6673002 100644
--- a/src/mds/apitest/mdstipc.h
+++ b/src/mds/apitest/mdstipc.h
@@ -301,6 +301,8 @@ void tet_svc_subscr_VDEST_12(void);
void tet_svc_subscr_VDEST_13(void);
void tet_svc_subscr_VDEST_14(void);
void tet_svc_subscr_VDEST_15(void);
+void tet_svc_subscr_VDEST_16(void);
+void tet_svc_subscr_VDEST_17(void);
void cleanup_ADEST_srv(void);
void tet_svc_subscr_ADEST_1(void);
void tet_svc_subscr_ADEST_2(void);
diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index 929da2193..0ecf4f0d9 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -1851,9 +1851,9 @@ void tet_svc_subscr_VDEST_10()
printf("\nRetrieve Fail\n");
FAIL = 1;
}
- if ((tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 0,
+ if ((tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 1,
NCSMDS_DOWN)) != 1 ||
- (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 700, 0,
+ (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 700, 2,
NCSMDS_DOWN) != 1)) {
printf("\nFail to verifying for the versions for DOWN event\n");
FAIL = 1;
@@ -2920,6 +2920,171 @@ void tet_svc_subscr_VDEST_15() {
}
}
+void tet_svc_subscr_VDEST_16(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 16: Explicit subscribe replays the"
+ " active UP version after implicit subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed UP event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed UP version\n");
+ if (tet_verify_version(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1, NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
+void tet_svc_subscr_VDEST_17(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 17: Explicit subscribe replays the"
+ " last-active NO_ACTIVE version after implicit"
+ " subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Change the active vdest to standby\n");
+ if (vdest_change_role(200, V_DEST_RL_STANDBY) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ sleep(1);
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit while await-active is running\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed NO_ACTIVE event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed NO_ACTIVE version\n");
+ if (tet_verify_version(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1,
+ NCSMDS_NO_ACTIVE) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
void tet_adest_cancel_thread()
{
MDS_SVC_ID svcids[] = {600, 700};
@@ -15390,6 +15555,12 @@ __attribute__((constructor)) static void mdsTipcAPI_constructor(void)
test_case_add(4, tet_svc_subscr_VDEST_15,
"MxN ACTIVE to STANDBY sends NEW_ACTIVE with "
"replacement active role and version");
+ test_case_add(4, tet_svc_subscr_VDEST_16,
+ "Explicit subscribe replay sends UP with the current "
+ "active version after an implicit subscription");
+ test_case_add(4, tet_svc_subscr_VDEST_17,
+ "Explicit subscribe replay sends NO_ACTIVE with the "
+ "last active version while await-active is running");
test_suite_add(5, "Subscribe ADEST");
test_case_add(
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-24 05:07:15
|
---
src/mds/mds_c_api.c | 3 ++-
src/mds/mds_c_db.c | 19 ++++++++++++-------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/mds/mds_c_api.c b/src/mds/mds_c_api.c
index 4faa69d09..29af170be 100644
--- a/src/mds/mds_c_api.c
+++ b/src/mds/mds_c_api.c
@@ -2087,7 +2087,8 @@ uint32_t mds_mcm_await_active_tmr_expiry(MDS_SVC_HDL svc_hdl,
status = mds_mcm_user_event_callback(
svc_hdl, m_MDS_GET_PWE_ID_FROM_SVC_HDL(svc_hdl), sub_svc_id,
V_DEST_RL_STANDBY, vdest_id, 0, NCSMDS_DOWN,
- active_subtn_result_info->rem_svc_sub_part_ver,
+ active_subtn_result_info->info.active_vdest.active_route_info
+ ->last_active_svc_sub_part_ver,
MDS_SVC_ARCHWORD_TYPE_UNSPECIFIED);
if (status != NCSCC_RC_SUCCESS) {
/* Callback failure */
diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c
index 2213c664b..193378876 100644
--- a/src/mds/mds_c_db.c
+++ b/src/mds/mds_c_db.c
@@ -1480,7 +1480,9 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
->key.vdest_id,
0, NCSMDS_NO_ACTIVE,
temp_subtn_result_info
- ->rem_svc_sub_part_ver,
+ ->info.active_vdest
+ .active_route_info
+ ->last_active_svc_sub_part_ver,
MDS_SVC_ARCHWORD_TYPE_UNSPECIFIED)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Await Active Entry: F, svc_id=%d, subscribed_svc=%d",
@@ -1489,6 +1491,12 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
subscr_svc_id);
}
} else { /* Active entry exist */
+ MDS_SUBSCRIPTION_RESULTS_INFO
+ *next_active_in_turn =
+ temp_subtn_result_info
+ ->info.active_vdest
+ .active_route_info
+ ->next_active_in_turn;
/* Call user callback UP for
* first active */
@@ -1501,15 +1509,12 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
V_DEST_RL_ACTIVE,
temp_subtn_result_info
->key.vdest_id,
- temp_subtn_result_info
- ->info.active_vdest
- .active_route_info
- ->next_active_in_turn
+ next_active_in_turn
->key.adest,
NCSMDS_UP,
- temp_subtn_result_info
+ next_active_in_turn
->rem_svc_sub_part_ver,
- temp_subtn_result_info
+ next_active_in_turn
->rem_svc_arch_word)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Active Entry: F, svc_id=%d, subscribed_svc=%d",
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-24 05:07:14
|
Summary: mds: fix explicit replay callback metadata [#3397] Review request for Ticket(s): 3397 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3397 Base revision: 8ec9b8dbac32390ffb7b97833842007bc6aaef6f Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision ea0c7cce3fa4593f556016fa3506126c6d3f5c21 Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:34:13 +0200 mds: add test case for explicit replay [#3397] revision 6cbda59cf873e54cd7d67334e48dac562b187504 Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:29:09 +0200 mds: fix explicit replay callback metadata [#3397] Complete diffstat: ------------------ src/mds/apitest/mdstipc.h | 2 + src/mds/apitest/mdstipc_api.c | 175 +++++++++++++++++++++++++++++++++++++++++- src/mds/mds_c_api.c | 3 +- src/mds/mds_c_db.c | 19 +++-- 4 files changed, 189 insertions(+), 10 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-23 04:08:49
|
---
src/mds/apitest/mdstipc.h | 2 +
src/mds/apitest/mdstipc_api.c | 175 +++++++++++++++++++++++++++++++++-
2 files changed, 175 insertions(+), 2 deletions(-)
diff --git a/src/mds/apitest/mdstipc.h b/src/mds/apitest/mdstipc.h
index a8628d707..2f8288feb 100644
--- a/src/mds/apitest/mdstipc.h
+++ b/src/mds/apitest/mdstipc.h
@@ -298,6 +298,8 @@ void tet_svc_subscr_VDEST_7(void);
void tet_svc_subscr_VDEST_10(void);
void tet_svc_subscr_VDEST_11(void);
void tet_svc_subscr_VDEST_12(void);
+void tet_svc_subscr_VDEST_16(void);
+void tet_svc_subscr_VDEST_17(void);
void cleanup_ADEST_srv(void);
void tet_svc_subscr_ADEST_1(void);
void tet_svc_subscr_ADEST_2(void);
diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index dbfa00f05..aef50db60 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -1822,9 +1822,9 @@ void tet_svc_subscr_VDEST_10()
printf("\nRetrieve Fail\n");
FAIL = 1;
}
- if ((tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 0,
+ if ((tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 1,
NCSMDS_DOWN)) != 1 ||
- (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 700, 0,
+ (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 700, 2,
NCSMDS_DOWN) != 1)) {
printf("\nFail to verifying for the versions for DOWN event\n");
FAIL = 1;
@@ -2628,6 +2628,171 @@ void tet_svc_subscr_VDEST_14() {
}
}
+void tet_svc_subscr_VDEST_16(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 16: Explicit subscribe replays the"
+ " active UP version after implicit subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed UP event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed UP version\n");
+ if (tet_verify_version(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1, NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
+void tet_svc_subscr_VDEST_17(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 17: Explicit subscribe replays the"
+ " last-active NO_ACTIVE version after implicit"
+ " subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Change the active vdest to standby\n");
+ if (vdest_change_role(200, V_DEST_RL_STANDBY) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ sleep(1);
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit while await-active is running\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed NO_ACTIVE event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed NO_ACTIVE version\n");
+ if (tet_verify_version(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1,
+ NCSMDS_NO_ACTIVE) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
void tet_adest_cancel_thread()
{
MDS_SVC_ID svcids[] = {600, 700};
@@ -15095,6 +15260,12 @@ __attribute__((constructor)) static void mdsTipcAPI_constructor(void)
test_case_add(
4, tet_svc_subscr_VDEST_14,
"Conflict nway active vdests");
+ test_case_add(4, tet_svc_subscr_VDEST_16,
+ "Explicit subscribe replay sends UP with the current "
+ "active version after an implicit subscription");
+ test_case_add(4, tet_svc_subscr_VDEST_17,
+ "Explicit subscribe replay sends NO_ACTIVE with the "
+ "last active version while await-active is running");
test_suite_add(5, "Subscribe ADEST");
test_case_add(
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-23 04:08:48
|
---
src/mds/mds_c_api.c | 3 ++-
src/mds/mds_c_db.c | 19 ++++++++++++-------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/mds/mds_c_api.c b/src/mds/mds_c_api.c
index 4faa69d09..29af170be 100644
--- a/src/mds/mds_c_api.c
+++ b/src/mds/mds_c_api.c
@@ -2087,7 +2087,8 @@ uint32_t mds_mcm_await_active_tmr_expiry(MDS_SVC_HDL svc_hdl,
status = mds_mcm_user_event_callback(
svc_hdl, m_MDS_GET_PWE_ID_FROM_SVC_HDL(svc_hdl), sub_svc_id,
V_DEST_RL_STANDBY, vdest_id, 0, NCSMDS_DOWN,
- active_subtn_result_info->rem_svc_sub_part_ver,
+ active_subtn_result_info->info.active_vdest.active_route_info
+ ->last_active_svc_sub_part_ver,
MDS_SVC_ARCHWORD_TYPE_UNSPECIFIED);
if (status != NCSCC_RC_SUCCESS) {
/* Callback failure */
diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c
index 2213c664b..193378876 100644
--- a/src/mds/mds_c_db.c
+++ b/src/mds/mds_c_db.c
@@ -1480,7 +1480,9 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
->key.vdest_id,
0, NCSMDS_NO_ACTIVE,
temp_subtn_result_info
- ->rem_svc_sub_part_ver,
+ ->info.active_vdest
+ .active_route_info
+ ->last_active_svc_sub_part_ver,
MDS_SVC_ARCHWORD_TYPE_UNSPECIFIED)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Await Active Entry: F, svc_id=%d, subscribed_svc=%d",
@@ -1489,6 +1491,12 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
subscr_svc_id);
}
} else { /* Active entry exist */
+ MDS_SUBSCRIPTION_RESULTS_INFO
+ *next_active_in_turn =
+ temp_subtn_result_info
+ ->info.active_vdest
+ .active_route_info
+ ->next_active_in_turn;
/* Call user callback UP for
* first active */
@@ -1501,15 +1509,12 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
V_DEST_RL_ACTIVE,
temp_subtn_result_info
->key.vdest_id,
- temp_subtn_result_info
- ->info.active_vdest
- .active_route_info
- ->next_active_in_turn
+ next_active_in_turn
->key.adest,
NCSMDS_UP,
- temp_subtn_result_info
+ next_active_in_turn
->rem_svc_sub_part_ver,
- temp_subtn_result_info
+ next_active_in_turn
->rem_svc_arch_word)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Active Entry: F, svc_id=%d, subscribed_svc=%d",
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-23 04:08:47
|
Summary: mds: fix explicit replay callback metadata [#3397] Review request for Ticket(s): 3397 Peer Reviewer(s): Dat, Thang Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3397 Base revision: 8a0101f670badb5743af0ca9d49329ac8bbeb256 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision f72eccdc632c6f0cd6fc13862e1d755bd79179c6 Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:36:44 +0200 mds: add test case for explicit replay [#3397] revision 68c0a6f3151763bdbebdf2c1d651ffaee3b78adb Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:31:48 +0200 mds: fix explicit replay callback metadata [#3397] Complete diffstat: ------------------ src/mds/apitest/mdstipc.h | 2 + src/mds/apitest/mdstipc_api.c | 175 +++++++++++++++++++++++++++++++++++++++++- src/mds/mds_c_api.c | 3 +- src/mds/mds_c_db.c | 19 +++-- 4 files changed, 189 insertions(+), 10 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-23 04:02:29
|
Summary: mds: fix replacement active callback metadata [#3396] Review request for Ticket(s): 3396 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3396 Base revision: 8a0101f670badb5743af0ca9d49329ac8bbeb256 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 8ec9b8dbac32390ffb7b97833842007bc6aaef6f Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:21:47 +0200 mds: fix MxN standby on service operation down [#3396] revision 544764998d9ec61060e8dd1f5a81f2e8bdb7c690 Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:21:37 +0200 mds: add test case for verify replacement active [#3396] revision c99a9e0a8a1bb4c89f5c8af3504558934093f9bc Author: Thien Minh Huynh <thi...@en...> Date: Thu, 23 Apr 2026 05:02:13 +0200 mds: fix replacement active callback metadata [#3396] Complete diffstat: ------------------ src/mds/apitest/mdstipc.h | 3 + src/mds/apitest/mdstipc_api.c | 361 ++++++++++++++++++++++++++++++++++++++---- src/mds/mds_svc_op.c | 43 +++-- 3 files changed, 357 insertions(+), 50 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK fromr reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-23 04:02:26
|
---
src/mds/apitest/mdstipc.h | 3 +
src/mds/apitest/mdstipc_api.c | 361 ++++++++++++++++++++++++++++++----
2 files changed, 331 insertions(+), 33 deletions(-)
diff --git a/src/mds/apitest/mdstipc.h b/src/mds/apitest/mdstipc.h
index a8628d707..c03824252 100644
--- a/src/mds/apitest/mdstipc.h
+++ b/src/mds/apitest/mdstipc.h
@@ -298,6 +298,9 @@ void tet_svc_subscr_VDEST_7(void);
void tet_svc_subscr_VDEST_10(void);
void tet_svc_subscr_VDEST_11(void);
void tet_svc_subscr_VDEST_12(void);
+void tet_svc_subscr_VDEST_13(void);
+void tet_svc_subscr_VDEST_14(void);
+void tet_svc_subscr_VDEST_15(void);
void cleanup_ADEST_srv(void);
void tet_svc_subscr_ADEST_1(void);
void tet_svc_subscr_ADEST_2(void);
diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index dbfa00f05..929da2193 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -1105,12 +1105,12 @@ void tet_svc_install_upto_MAX()
test_validate(FAIL, 0);
}
-static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
- NCSMDS_SVC_ID req_svc_id,
- MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver,
- NCSMDS_CHG change)
+static TET_EVENT_INFO *tet_find_event(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id)
{
- int i, j, k, ret_val = 0;
+ int i, j, k;
+
if (is_service_on_adest(mds_hdl, your_scv_id) == NCSCC_RC_SUCCESS) {
for (i = 0; i < gl_tet_adest.svc_count; i++) {
if (gl_tet_adest.svc[i].svc_id == your_scv_id) {
@@ -1119,18 +1119,9 @@ static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
j++) {
if (gl_tet_adest.svc[i]
.svcevt[j]
- .svc_id == req_svc_id) {
- if ((gl_tet_adest.svc[i]
- .svcevt[j]
- .event == change) &&
- (gl_tet_adest.svc[i]
- .svcevt[j]
- .rem_svc_pvt_ver ==
- svc_pvt_ver))
- ret_val = 1;
- else
- ret_val = 0;
- }
+ .svc_id == req_svc_id)
+ return &gl_tet_adest.svc[i]
+ .svcevt[j];
}
}
}
@@ -1146,28 +1137,66 @@ static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
if (gl_tet_vdest[i]
.svc[j]
.svcevt[k]
- .svc_id == req_svc_id) {
- if ((gl_tet_vdest[i]
- .svc[j]
- .svcevt[k]
- .event ==
- change) &&
- (gl_tet_vdest[i]
- .svc[j]
- .svcevt[k]
- .rem_svc_pvt_ver ==
- svc_pvt_ver))
- ret_val = 1;
- else
- ret_val = 0;
- }
+ .svc_id == req_svc_id)
+ return &gl_tet_vdest[i]
+ .svc[j]
+ .svcevt[k];
}
}
}
}
}
- return ret_val;
+
+ return NULL;
+}
+
+static int tet_verify_version(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id,
+ MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver,
+ NCSMDS_CHG change)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change &&
+ event_info->rem_svc_pvt_ver == svc_pvt_ver);
}
+
+static int tet_verify_event_role(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id, NCSMDS_CHG change,
+ V_DEST_RL role)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change && event_info->role == role);
+}
+
+static int tet_verify_event_role_version(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id,
+ NCSMDS_CHG change, V_DEST_RL role,
+ MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change &&
+ event_info->role == role &&
+ event_info->rem_svc_pvt_ver == svc_pvt_ver);
+}
+
void tet_svc_subscr_VDEST_1()
{
int FAIL = 0;
@@ -2628,6 +2657,269 @@ void tet_svc_subscr_VDEST_14() {
}
}
+void tet_svc_subscr_VDEST_15() {
+ int FAIL = 0;
+ SaUint32T rc;
+ MDS_SVC_ID svc_id_sixhd[] = {600};
+
+ mds_shutdown();
+ pid_t pid = fork();
+ if (pid < 0) {
+ printf("\nFailed to fork process\n");
+ FAIL = 1;
+ test_validate(FAIL, 0);
+ } else if (pid > 0) {
+ // Parent process
+ mds_startup();
+ printf("\nTest case 15: mxn standby transition keeps the"
+ " replacement NEW_ACTIVE\n");
+ printf("\nGet an adest handle\n");
+ if (adest_get_handle() != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ rc = create_vdest(NCS_VDEST_TYPE_MxN, 1001);
+ if (rc != NCSCC_RC_SUCCESS) {
+ printf("\nFailed to create a vdest with id = 1001\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Install the parent active service 600\n");
+ if (mds_service_install(gl_tet_vdest[0].mds_pwe1_hdl, 600, 1,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Change the role of vdest 1001 to active\n");
+ if (vdest_change_role(1001, V_DEST_RL_ACTIVE)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Install the subscriber service 500\n");
+ if (mds_service_install(gl_tet_adest.mds_pwe1_hdl, 500, 1,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Subscribe for the services\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl, 500,
+ NCSMDS_SCOPE_INTRACHASSIS, 1,
+ svc_id_sixhd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the UP event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the initial UP version\n");
+ if (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 1,
+ NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Sleep to wait for the child active"
+ " instance\n");
+ sleep(5);
+
+ printf("\nAction: Change the parent vdest role to standby\n");
+ if (vdest_change_role(1001, V_DEST_RL_STANDBY)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the NO_ACTIVE event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the NO_ACTIVE role from the"
+ " demoted active\n");
+ if (tet_verify_event_role(gl_tet_adest.mds_pwe1_hdl, 500, 600,
+ NCSMDS_NO_ACTIVE,
+ V_DEST_RL_STANDBY) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the NEW_ACTIVE event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replacement NEW_ACTIVE role and"
+ " version\n");
+ if (tet_verify_event_role_version(
+ gl_tet_adest.mds_pwe1_hdl, 500, 600,
+ NCSMDS_NEW_ACTIVE, V_DEST_RL_ACTIVE, 2) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, 500, 1,
+ svc_id_sixhd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Uninstall the subscriber service 500\n");
+ if (mds_service_uninstall(gl_tet_adest.mds_pwe1_hdl, 500) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Uninstall the parent standby service 600\n");
+ if (mds_service_uninstall(gl_tet_vdest[0].mds_pwe1_hdl, 600) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Destroy the vdest 1001\n");
+ rc = destroy_vdest(1001);
+ if (rc != NCSCC_RC_SUCCESS) {
+ printf("\nFail to destroy a vdest with id = 1001\n");
+ FAIL = 1;
+ }
+
+ test_validate(FAIL, 0);
+ } else {
+ // Child process
+ MDS_SVC_ID svc_id_fivehd[] = {500};
+
+ mds_startup();
+ printf("\nChild: Get an adest handle\n");
+ if (adest_get_handle() != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Create a vdest with id = 1001\n");
+ if (create_vdest(NCS_VDEST_TYPE_MxN, 1001) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Install the replacement service 600\n");
+ if (mds_service_install(gl_tet_vdest[0].mds_pwe1_hdl, 600, 2,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Subscribe for the services\n");
+ if (mds_service_subscribe(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ NCSMDS_SCOPE_INTRACHASSIS, 1,
+ svc_id_fivehd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Retrieve the UP event\n");
+ if (wait_vdest_sel_obj(&gl_tet_vdest[0], 600, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Verify the version for UP event\n");
+ if (tet_verify_version(gl_tet_vdest[0].mds_pwe1_hdl, 600, 500,
+ 1, NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Sleep to wait for the parent setup\n");
+ sleep(1);
+
+ printf("\nChild: Change the role of vdest 1001 to active\n");
+ if (vdest_change_role(1001, V_DEST_RL_ACTIVE)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Retrieve the DOWN event\n");
+ if (wait_vdest_sel_obj(&gl_tet_vdest[0], 600, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Verify for the DOWN event\n");
+ if (tet_verify_version(gl_tet_vdest[0].mds_pwe1_hdl, 600, 500,
+ 1, NCSMDS_DOWN) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Cancel the subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_vdest[0].mds_pwe1_hdl, 600, 1,
+ svc_id_fivehd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Uninstall the replacement service 600\n");
+ if (mds_service_uninstall(gl_tet_vdest[0].mds_pwe1_hdl, 600) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Destroy the vdest 1001\n");
+ if (destroy_vdest(1001) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ test_validate(FAIL, 0);
+ }
+}
+
void tet_adest_cancel_thread()
{
MDS_SVC_ID svcids[] = {600, 700};
@@ -15095,6 +15387,9 @@ __attribute__((constructor)) static void mdsTipcAPI_constructor(void)
test_case_add(
4, tet_svc_subscr_VDEST_14,
"Conflict nway active vdests");
+ test_case_add(4, tet_svc_subscr_VDEST_15,
+ "MxN ACTIVE to STANDBY sends NEW_ACTIVE with "
+ "replacement active role and version");
test_suite_add(5, "Subscribe ADEST");
test_case_add(
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-23 04:02:24
|
---
src/mds/mds_svc_op.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mds/mds_svc_op.c b/src/mds/mds_svc_op.c
index f5b07e052..b9b88f00e 100644
--- a/src/mds/mds_svc_op.c
+++ b/src/mds/mds_svc_op.c
@@ -862,7 +862,7 @@ uint32_t mds_svc_op_down(const MCM_SVC_DOWN_INFO *info) {
info->role == V_DEST_RL_ACTIVE) {
ret = mds_svc_op_vdest_mxn_active_delete(info);
} else if (info->vdest_policy == NCS_VDEST_TYPE_MxN &&
- info->role == V_DEST_RL_ACTIVE) {
+ info->role == V_DEST_RL_STANDBY) {
ret = mds_svc_op_vdest_mxn_standby_delete(
info);
} else if (info->role == V_DEST_RL_ACTIVE) {
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-23 04:02:23
|
---
src/mds/mds_svc_op.c | 41 +++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/src/mds/mds_svc_op.c b/src/mds/mds_svc_op.c
index 5ad51eea4..f5b07e052 100644
--- a/src/mds/mds_svc_op.c
+++ b/src/mds/mds_svc_op.c
@@ -1112,14 +1112,21 @@ uint32_t mds_svc_op_vdest_mxn_standby_update(const MCM_SVC_INFO *info) {
}
status = mds_subtn_res_tbl_query_next_active(
- info->local_svc_hdl, info->svc_id, info->vdest,
- subtn_result_info, &next_active_result_info);
+ info->local_svc_hdl, info->svc_id, info->vdest,
+ subtn_result_info, &next_active_result_info);
if (status == NCSCC_RC_SUCCESS) {
+ MCM_SVC_INFO act_info = *info;
+ act_info.adest = next_active_result_info->key.adest;
+ act_info.role = V_DEST_RL_ACTIVE;
+ act_info.sub_part_ver =
+ next_active_result_info->rem_svc_sub_part_ver;
+ act_info.arch_word =
+ next_active_result_info->rem_svc_arch_word;
/* Other active present. Change active entry */
- mds_svc_op_subtn_res_tbl_change_active(info,
- next_active_result_info);
- status = mds_svc_op_user_callback(UP_TAG,
- NCSMDS_NEW_ACTIVE, info);
+ mds_svc_op_subtn_res_tbl_change_active(
+ &act_info, next_active_result_info);
+ status = mds_svc_op_user_callback(
+ UP_TAG, NCSMDS_NEW_ACTIVE, &act_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
@@ -1212,21 +1219,23 @@ uint32_t mds_svc_op_vdest_mxn_active_delete(const MCM_SVC_INFO *info) {
return NCSCC_RC_FAILURE;
}
} else {
- status = mds_svc_op_user_callback(DOWN_TAG,
- NCSMDS_NO_ACTIVE,
- &callback_info);
+ status = mds_svc_op_user_callback(
+ DOWN_TAG, NCSMDS_NO_ACTIVE, &callback_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
- /* Change Active entry */
- mds_svc_op_subtn_res_tbl_change_active(info,
- next_active_result_info);
-
MCM_SVC_INFO act_info = *info;
act_info.adest = next_active_result_info->key.adest;
- status = mds_svc_op_user_callback(DOWN_TAG,
- NCSMDS_NEW_ACTIVE,
- &act_info);
+ act_info.role = V_DEST_RL_ACTIVE;
+ act_info.sub_part_ver =
+ next_active_result_info->rem_svc_sub_part_ver;
+ act_info.arch_word =
+ next_active_result_info->rem_svc_arch_word;
+ /* Change Active entry */
+ mds_svc_op_subtn_res_tbl_change_active(
+ &act_info, next_active_result_info);
+ status = mds_svc_op_user_callback(
+ DOWN_TAG, NCSMDS_NEW_ACTIVE, &act_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-14 10:51:29
|
---
src/mds/apitest/mdstipc_api.c | 171 ++++++++++++++++++++++++++++++++++
1 file changed, 171 insertions(+)
diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index dbfa00f05..505b3a2ad 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -2628,6 +2628,171 @@ void tet_svc_subscr_VDEST_14() {
}
}
+void tet_svc_subscr_VDEST_16(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 16: Explicit subscribe replays the"
+ " active UP version after implicit subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed UP event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed UP version\n");
+ if (tet_verify_version(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1, NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
+void tet_svc_subscr_VDEST_17(void)
+{
+ int FAIL = 0;
+ MDS_SVC_ID svc_id_inthd[] = {NCSMDS_SVC_ID_INTERNAL_MIN};
+ char tmp[] = " Hi Receiver ";
+ TET_MDS_MSG *mesg;
+
+ mesg = (TET_MDS_MSG *)malloc(sizeof(TET_MDS_MSG));
+ memset(mesg, 0, sizeof(TET_MDS_MSG));
+ memcpy(mesg->send_data, tmp, sizeof(tmp));
+ mesg->send_len = sizeof(tmp);
+
+ if (tet_initialise_setup(false)) {
+ printf("\nSetup Initialisation has Failed\n");
+ FAIL = 1;
+ } else {
+ printf("\nTest Case 17: Explicit subscribe replays the"
+ " last-active NO_ACTIVE version after implicit"
+ " subscription\n");
+
+ printf("\nAction: Create the implicit subscription by"
+ " sending to INTMIN on the active vdest\n");
+ if (mds_just_send(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, gl_tet_vdest[1].vdest,
+ MDS_SEND_PRIORITY_LOW, mesg) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Change the active vdest to standby\n");
+ if (vdest_change_role(200, V_DEST_RL_STANDBY) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ sleep(1);
+
+ printf("\nAction: Convert the implicit subscription to"
+ " explicit while await-active is running\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SCOPE_NONE, 1,
+ svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the replayed NO_ACTIVE event\n");
+ if (wait_adest_sel_obj(NCSMDS_SVC_ID_EXTERNAL_MIN, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replayed NO_ACTIVE version\n");
+ if (tet_verify_version(gl_tet_adest.mds_pwe1_hdl,
+ NCSMDS_SVC_ID_EXTERNAL_MIN,
+ NCSMDS_SVC_ID_INTERNAL_MIN, 1,
+ NCSMDS_NO_ACTIVE) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the explicit subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, NCSMDS_SVC_ID_EXTERNAL_MIN,
+ 1, svc_id_inthd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ }
+
+ if (tet_cleanup_setup()) {
+ printf("\nSetup Clean Up has Failed\n");
+ FAIL = 1;
+ }
+
+ free(mesg);
+ test_validate(FAIL, 0);
+}
+
void tet_adest_cancel_thread()
{
MDS_SVC_ID svcids[] = {600, 700};
@@ -15095,6 +15260,12 @@ __attribute__((constructor)) static void mdsTipcAPI_constructor(void)
test_case_add(
4, tet_svc_subscr_VDEST_14,
"Conflict nway active vdests");
+ test_case_add(4, tet_svc_subscr_VDEST_16,
+ "Explicit subscribe replay sends UP with the current "
+ "active version after an implicit subscription");
+ test_case_add(4, tet_svc_subscr_VDEST_17,
+ "Explicit subscribe replay sends NO_ACTIVE with the "
+ "last active version while await-active is running");
test_suite_add(5, "Subscribe ADEST");
test_case_add(
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-14 10:51:28
|
---
src/mds/mds_c_db.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c
index 2213c664b..a8a7222d4 100644
--- a/src/mds/mds_c_db.c
+++ b/src/mds/mds_c_db.c
@@ -1480,7 +1480,9 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
->key.vdest_id,
0, NCSMDS_NO_ACTIVE,
temp_subtn_result_info
- ->rem_svc_sub_part_ver,
+ ->info.active_vdest
+ .active_route_info
+ ->last_active_svc_sub_part_ver,
MDS_SVC_ARCHWORD_TYPE_UNSPECIFIED)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Await Active Entry: F, svc_id=%d, subscribed_svc=%d",
@@ -1508,8 +1510,14 @@ uint32_t mds_subtn_tbl_change_explicit(MDS_SVC_HDL svc_hdl,
->key.adest,
NCSMDS_UP,
temp_subtn_result_info
+ ->info.active_vdest
+ .active_route_info
+ ->next_active_in_turn
->rem_svc_sub_part_ver,
temp_subtn_result_info
+ ->info.active_vdest
+ .active_route_info
+ ->next_active_in_turn
->rem_svc_arch_word)) {
m_MDS_LOG_ERR(
"MDS:DB:mds_mcm_user_event_callback: Active Entry: F, svc_id=%d, subscribed_svc=%d",
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-14 10:50:55
|
Summary: mds: fix explicit replay callback metadata [#3397] Review request for Ticket(s): 3397 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3397 Base revision: 8a0101f670badb5743af0ca9d49329ac8bbeb256 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 7291c7ffcb93b4474cd4cf9f840e0983392a1806 Author: Thien Minh Huynh <thi...@en...> Date: Tue, 14 Apr 2026 12:16:21 +0200 mds: add test case for explicit replay [#3397] revision 65308e95292c8c47967f7c6478961341968072bb Author: Thien Minh Huynh <thi...@en...> Date: Mon, 13 Apr 2026 12:03:25 +0200 mds: fix explicit replay callback metadata [#3397] Complete diffstat: ------------------ src/mds/apitest/mdstipc_api.c | 171 ++++++++++++++++++++++++++++++++++++++++++ src/mds/mds_c_db.c | 10 ++- 2 files changed, 180 insertions(+), 1 deletion(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-14 10:04:32
|
---
src/mds/apitest/mdstipc_api.c | 361 ++++++++++++++++++++++++++++++----
1 file changed, 328 insertions(+), 33 deletions(-)
diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
index dbfa00f05..248e4b09c 100644
--- a/src/mds/apitest/mdstipc_api.c
+++ b/src/mds/apitest/mdstipc_api.c
@@ -1105,12 +1105,12 @@ void tet_svc_install_upto_MAX()
test_validate(FAIL, 0);
}
-static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
- NCSMDS_SVC_ID req_svc_id,
- MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver,
- NCSMDS_CHG change)
+static TET_EVENT_INFO *tet_find_event(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id)
{
- int i, j, k, ret_val = 0;
+ int i, j, k;
+
if (is_service_on_adest(mds_hdl, your_scv_id) == NCSCC_RC_SUCCESS) {
for (i = 0; i < gl_tet_adest.svc_count; i++) {
if (gl_tet_adest.svc[i].svc_id == your_scv_id) {
@@ -1119,18 +1119,9 @@ static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
j++) {
if (gl_tet_adest.svc[i]
.svcevt[j]
- .svc_id == req_svc_id) {
- if ((gl_tet_adest.svc[i]
- .svcevt[j]
- .event == change) &&
- (gl_tet_adest.svc[i]
- .svcevt[j]
- .rem_svc_pvt_ver ==
- svc_pvt_ver))
- ret_val = 1;
- else
- ret_val = 0;
- }
+ .svc_id == req_svc_id)
+ return &gl_tet_adest.svc[i]
+ .svcevt[j];
}
}
}
@@ -1146,28 +1137,66 @@ static int tet_verify_version(MDS_HDL mds_hdl, NCSMDS_SVC_ID your_scv_id,
if (gl_tet_vdest[i]
.svc[j]
.svcevt[k]
- .svc_id == req_svc_id) {
- if ((gl_tet_vdest[i]
- .svc[j]
- .svcevt[k]
- .event ==
- change) &&
- (gl_tet_vdest[i]
- .svc[j]
- .svcevt[k]
- .rem_svc_pvt_ver ==
- svc_pvt_ver))
- ret_val = 1;
- else
- ret_val = 0;
- }
+ .svc_id == req_svc_id)
+ return &gl_tet_vdest[i]
+ .svc[j]
+ .svcevt[k];
}
}
}
}
}
- return ret_val;
+
+ return NULL;
+}
+
+static int tet_verify_version(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id,
+ MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver,
+ NCSMDS_CHG change)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change &&
+ event_info->rem_svc_pvt_ver == svc_pvt_ver);
}
+
+static int tet_verify_event_role(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id, NCSMDS_CHG change,
+ V_DEST_RL role)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change && event_info->role == role);
+}
+
+static int tet_verify_event_role_version(MDS_HDL mds_hdl,
+ NCSMDS_SVC_ID your_scv_id,
+ NCSMDS_SVC_ID req_svc_id,
+ NCSMDS_CHG change, V_DEST_RL role,
+ MDS_SVC_PVT_SUB_PART_VER svc_pvt_ver)
+{
+ TET_EVENT_INFO *event_info =
+ tet_find_event(mds_hdl, your_scv_id, req_svc_id);
+
+ if (event_info == NULL)
+ return 0;
+
+ return (event_info->event == change &&
+ event_info->role == role &&
+ event_info->rem_svc_pvt_ver == svc_pvt_ver);
+}
+
void tet_svc_subscr_VDEST_1()
{
int FAIL = 0;
@@ -2628,6 +2657,269 @@ void tet_svc_subscr_VDEST_14() {
}
}
+void tet_svc_subscr_VDEST_15() {
+ int FAIL = 0;
+ SaUint32T rc;
+ MDS_SVC_ID svc_id_sixhd[] = {600};
+
+ mds_shutdown();
+ pid_t pid = fork();
+ if (pid < 0) {
+ printf("\nFailed to fork process\n");
+ FAIL = 1;
+ test_validate(FAIL, 0);
+ } else if (pid > 0) {
+ // Parent process
+ mds_startup();
+ printf("\nTest case 15: mxn standby transition keeps the"
+ " replacement NEW_ACTIVE payload\n");
+ printf("\nGet an adest handle\n");
+ if (adest_get_handle() != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ rc = create_vdest(NCS_VDEST_TYPE_MxN, 1001);
+ if (rc != NCSCC_RC_SUCCESS) {
+ printf("\nFailed to create a vdest with id = 1001\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Install the parent active service 600\n");
+ if (mds_service_install(gl_tet_vdest[0].mds_pwe1_hdl, 600, 1,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Change the role of vdest 1001 to active\n");
+ if (vdest_change_role(1001, V_DEST_RL_ACTIVE)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Install the subscriber service 500\n");
+ if (mds_service_install(gl_tet_adest.mds_pwe1_hdl, 500, 1,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Subscribe for the services\n");
+ if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl, 500,
+ NCSMDS_SCOPE_INTRACHASSIS, 1,
+ svc_id_sixhd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the UP event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the initial UP version\n");
+ if (tet_verify_version(gl_tet_adest.mds_pwe1_hdl, 500, 600, 1,
+ NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Sleep to wait for the child active"
+ " instance\n");
+ sleep(5);
+
+ printf("\nAction: Change the parent vdest role to standby\n");
+ if (vdest_change_role(1001, V_DEST_RL_STANDBY)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the NO_ACTIVE event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the NO_ACTIVE role from the"
+ " demoted active\n");
+ if (tet_verify_event_role(gl_tet_adest.mds_pwe1_hdl, 500, 600,
+ NCSMDS_NO_ACTIVE,
+ V_DEST_RL_STANDBY) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Retrieve the NEW_ACTIVE event\n");
+ if (wait_adest_sel_obj(500, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Verify the replacement NEW_ACTIVE role and"
+ " version\n");
+ if (tet_verify_event_role_version(
+ gl_tet_adest.mds_pwe1_hdl, 500, 600,
+ NCSMDS_NEW_ACTIVE, V_DEST_RL_ACTIVE, 2) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Cancel the subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_adest.mds_pwe1_hdl, 500, 1,
+ svc_id_sixhd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Uninstall the subscriber service 500\n");
+ if (mds_service_uninstall(gl_tet_adest.mds_pwe1_hdl, 500) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Uninstall the parent standby service 600\n");
+ if (mds_service_uninstall(gl_tet_vdest[0].mds_pwe1_hdl, 600) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nAction: Destroy the vdest 1001\n");
+ rc = destroy_vdest(1001);
+ if (rc != NCSCC_RC_SUCCESS) {
+ printf("\nFail to destroy a vdest with id = 1001\n");
+ FAIL = 1;
+ }
+
+ test_validate(FAIL, 0);
+ } else {
+ // Child process
+ MDS_SVC_ID svc_id_fivehd[] = {500};
+
+ mds_startup();
+ printf("\nChild: Get an adest handle\n");
+ if (adest_get_handle() != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Create a vdest with id = 1001\n");
+ if (create_vdest(NCS_VDEST_TYPE_MxN, 1001) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Install the replacement service 600\n");
+ if (mds_service_install(gl_tet_vdest[0].mds_pwe1_hdl, 600, 2,
+ NCSMDS_SCOPE_INTRACHASSIS, true,
+ false) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Subscribe for the services\n");
+ if (mds_service_subscribe(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ NCSMDS_SCOPE_INTRACHASSIS, 1,
+ svc_id_fivehd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Retrieve the UP event\n");
+ if (wait_vdest_sel_obj(&gl_tet_vdest[0], 600, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Verify the version for UP event\n");
+ if (tet_verify_version(gl_tet_vdest[0].mds_pwe1_hdl, 600, 500,
+ 1, NCSMDS_UP) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Sleep to wait for the parent setup\n");
+ sleep(1);
+
+ printf("\nChild: Change the role of vdest 1001 to active\n");
+ if (vdest_change_role(1001, V_DEST_RL_ACTIVE)
+ != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Retrieve the DOWN event\n");
+ if (wait_vdest_sel_obj(&gl_tet_vdest[0], 600, 10)) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+ if (mds_service_retrieve(gl_tet_vdest[0].mds_pwe1_hdl, 600,
+ SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
+ printf("\nRetrieve fail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Verify for the DOWN event\n");
+ if (tet_verify_version(gl_tet_vdest[0].mds_pwe1_hdl, 600, 500,
+ 1, NCSMDS_DOWN) != 1) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Cancel the subscription\n");
+ if (mds_service_cancel_subscription(
+ gl_tet_vdest[0].mds_pwe1_hdl, 600, 1,
+ svc_id_fivehd) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Uninstall the replacement service 600\n");
+ if (mds_service_uninstall(gl_tet_vdest[0].mds_pwe1_hdl, 600) !=
+ NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ printf("\nChild: Destroy the vdest 1001\n");
+ if (destroy_vdest(1001) != NCSCC_RC_SUCCESS) {
+ printf("\nFail\n");
+ FAIL = 1;
+ }
+
+ test_validate(FAIL, 0);
+ }
+}
+
void tet_adest_cancel_thread()
{
MDS_SVC_ID svcids[] = {600, 700};
@@ -15095,6 +15387,9 @@ __attribute__((constructor)) static void mdsTipcAPI_constructor(void)
test_case_add(
4, tet_svc_subscr_VDEST_14,
"Conflict nway active vdests");
+ test_case_add(4, tet_svc_subscr_VDEST_15,
+ "MxN ACTIVE to STANDBY sends NEW_ACTIVE with "
+ "replacement active role and version");
test_suite_add(5, "Subscribe ADEST");
test_case_add(
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-14 10:04:31
|
---
src/mds/mds_svc_op.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mds/mds_svc_op.c b/src/mds/mds_svc_op.c
index f5b07e052..b9b88f00e 100644
--- a/src/mds/mds_svc_op.c
+++ b/src/mds/mds_svc_op.c
@@ -862,7 +862,7 @@ uint32_t mds_svc_op_down(const MCM_SVC_DOWN_INFO *info) {
info->role == V_DEST_RL_ACTIVE) {
ret = mds_svc_op_vdest_mxn_active_delete(info);
} else if (info->vdest_policy == NCS_VDEST_TYPE_MxN &&
- info->role == V_DEST_RL_ACTIVE) {
+ info->role == V_DEST_RL_STANDBY) {
ret = mds_svc_op_vdest_mxn_standby_delete(
info);
} else if (info->role == V_DEST_RL_ACTIVE) {
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|
|
From: Thien H. <thi...@en...> - 2026-04-14 09:47:47
|
Summary: mds: fix replacement active callback payload [#3396] Review request for Ticket(s): 3396 Peer Reviewer(s): Thang, Dat Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3396 Base revision: 8a0101f670badb5743af0ca9d49329ac8bbeb256 Personal repository: git://git.code.sf.net/u/thienhuynh/review -------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries y Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 13521e4b00fe636226afd49fcb724159475e6a55 Author: Thien Minh Huynh <thi...@en...> Date: Tue, 14 Apr 2026 11:29:04 +0200 mds: fix MxN standby on service operation down [#3396] revision 0234fe79886ea35faf7198882f937e94761b2b0c Author: Thien Minh Huynh <thi...@en...> Date: Tue, 14 Apr 2026 11:28:56 +0200 mds: add test case for verify replacement active [#3396] revision 85a914b0fc5623a37084a307f49879bf21e7f213 Author: Thien Minh Huynh <thi...@en...> Date: Mon, 13 Apr 2026 11:44:34 +0200 mds: fix replacement active callback payload [#3396] Complete diffstat: ------------------ src/mds/apitest/mdstipc_api.c | 361 ++++++++++++++++++++++++++++++++++++++---- src/mds/mds_svc_op.c | 43 +++-- 2 files changed, 354 insertions(+), 50 deletions(-) Testing Commands: ----------------- N/A Testing, Expected Results: -------------------------- N/A Conditions of Submission: ------------------------- ACK from reviewer Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y 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. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection. Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions. |
|
From: Thien H. <thi...@en...> - 2026-04-14 09:47:46
|
---
src/mds/mds_svc_op.c | 41 +++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/src/mds/mds_svc_op.c b/src/mds/mds_svc_op.c
index 5ad51eea4..f5b07e052 100644
--- a/src/mds/mds_svc_op.c
+++ b/src/mds/mds_svc_op.c
@@ -1112,14 +1112,21 @@ uint32_t mds_svc_op_vdest_mxn_standby_update(const MCM_SVC_INFO *info) {
}
status = mds_subtn_res_tbl_query_next_active(
- info->local_svc_hdl, info->svc_id, info->vdest,
- subtn_result_info, &next_active_result_info);
+ info->local_svc_hdl, info->svc_id, info->vdest,
+ subtn_result_info, &next_active_result_info);
if (status == NCSCC_RC_SUCCESS) {
+ MCM_SVC_INFO act_info = *info;
+ act_info.adest = next_active_result_info->key.adest;
+ act_info.role = V_DEST_RL_ACTIVE;
+ act_info.sub_part_ver =
+ next_active_result_info->rem_svc_sub_part_ver;
+ act_info.arch_word =
+ next_active_result_info->rem_svc_arch_word;
/* Other active present. Change active entry */
- mds_svc_op_subtn_res_tbl_change_active(info,
- next_active_result_info);
- status = mds_svc_op_user_callback(UP_TAG,
- NCSMDS_NEW_ACTIVE, info);
+ mds_svc_op_subtn_res_tbl_change_active(
+ &act_info, next_active_result_info);
+ status = mds_svc_op_user_callback(
+ UP_TAG, NCSMDS_NEW_ACTIVE, &act_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
@@ -1212,21 +1219,23 @@ uint32_t mds_svc_op_vdest_mxn_active_delete(const MCM_SVC_INFO *info) {
return NCSCC_RC_FAILURE;
}
} else {
- status = mds_svc_op_user_callback(DOWN_TAG,
- NCSMDS_NO_ACTIVE,
- &callback_info);
+ status = mds_svc_op_user_callback(
+ DOWN_TAG, NCSMDS_NO_ACTIVE, &callback_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
- /* Change Active entry */
- mds_svc_op_subtn_res_tbl_change_active(info,
- next_active_result_info);
-
MCM_SVC_INFO act_info = *info;
act_info.adest = next_active_result_info->key.adest;
- status = mds_svc_op_user_callback(DOWN_TAG,
- NCSMDS_NEW_ACTIVE,
- &act_info);
+ act_info.role = V_DEST_RL_ACTIVE;
+ act_info.sub_part_ver =
+ next_active_result_info->rem_svc_sub_part_ver;
+ act_info.arch_word =
+ next_active_result_info->rem_svc_arch_word;
+ /* Change Active entry */
+ mds_svc_op_subtn_res_tbl_change_active(
+ &act_info, next_active_result_info);
+ status = mds_svc_op_user_callback(
+ DOWN_TAG, NCSMDS_NEW_ACTIVE, &act_info);
if (status != NCSCC_RC_SUCCESS) {
return NCSCC_RC_FAILURE;
}
--
2.34.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|