Menu

#2505 ntf: Test cases fail on SC nodes

5.17.07
fixed
nobody
None
defect
ntf
tests
minor
False
2017-07-27
2017-06-20
elunlen
No

The following code is not correct. The rdegetrole command can be found on all nodes. However if it is used on a PL node it will report Fail insted of ACTIVE or STANDBY

On PL node:

rdegetrole
rda_get_role failed

In file tet_ntf_clm.c:

// Add these test cases on other than active controller.
int rc = 0;
char role[80];
rc = system("which rdegetrole");
if (rc == 0) {
printf("This is a controller node\n");
// Command rdegetrole exists means a controller.
memset(buffer, '\0', sizeof(buffer));
memset(role, '\0', sizeof(role));
strcpy(buffer, "rdegetrole");
fp = popen(buffer, "r");
if (fgets(role, sizeof(role), fp) != NULL) {
if ((ptr = strchr(role, '\n')) != NULL)
ptr = '\0';
if (!strcmp((char
)role, "ACTIVE")) {
// printf("Active controller node\n");
pclose(fp);
return;
}
}
pclose(fp);
} else {
printf("This is a payload node\n");
}

Related

Tickets: #2506
Wiki: ChangeLog-5.17.07

Discussion

  • elunlen

    elunlen - 2017-06-20
    • status: unassigned --> accepted
    • assigned_to: elunlen
     
  • elunlen

    elunlen - 2017-06-22

    Test cases did not fail because of this problem. CLM tests cannot be executed on the active and the test for this actually works. Text written when running test cases is misleading.
    I have created a fix for this and will send it for review/push even if it just fix the misleading printout

     
  • elunlen

    elunlen - 2017-06-26
    • Priority: major --> minor
     
  • elunlen

    elunlen - 2017-06-26

    The meaning of this code is to not load test suite 40 if ntf test is excuted on an active SC node.
    Thsi si actually working but comments in the code and prontouts to the user is misleading e.g. when running on a payload note the printout says that it is running on a SC node but wit "some luck" the check that it is not active works.
    Since this problem does not make any tests fail I have changed priority to minor.

     
  • elunlen

    elunlen - 2017-06-26
    • status: accepted --> review
     
  • elunlen

    elunlen - 2017-06-30
    • status: review --> fixed
    • assigned_to: elunlen --> nobody
     
  • elunlen

    elunlen - 2017-06-30

    commit 35bbc53c10ebb37d7d792895db4849ab67f3792b
    Author: Lennart Lund lennart.lund@ericsson.com
    Date: Fri Jun 30 12:13:06 2017 +0200

     

Log in to post a comment.