Hi Hoang Vo,
ACK , with following ,tested.
use directly the macro `#MDS_DIRECT_BUF_MAXSIZE (65535 - (57 +
_POSIX_HOST_NAME_MAX))`
src/mds/mds_papi.h , so that in further change in MDS header will not
effect the test case .
-AVM
On 3/6/2017 1:20 PM, Hoang Vo wrote:
> src/mds/apitest/mdstipc_api.c | 8 ++++++--
> src/mds/apitest/mdstipc_conf.c | 9 +++++++++
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
>
> mdstest return failed in following cases:
> - 13 14: message length
> - 11 5, 9 5 and so on
>
> actions:
> - correct test case following new update
> - wait for vdest_change_role() apply result before processing to next test
> step
>
> diff --git a/src/mds/apitest/mdstipc_api.c b/src/mds/apitest/mdstipc_api.c
> --- a/src/mds/apitest/mdstipc_api.c
> +++ b/src/mds/apitest/mdstipc_api.c
> @@ -1,6 +1,7 @@
> /* OpenSAF
> *
> * (C) Copyright 2008 The OpenSAF Foundation
> + * Copyright Ericsson AB 2017 - All Rights Reserved.
> *
> * This program is distributed in the hope that it will be useful, but
> * WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY
> @@ -8982,7 +8983,6 @@ void tet_direct_just_send_tp_14()
> {
> int FAIL=0;
> MDS_SVC_ID svcids[]={NCSMDS_SVC_ID_EXTERNAL_MIN};
> - char big_message[8000];
>
> /*start up*/
> if(tet_initialise_setup(false))
> @@ -9010,7 +9010,9 @@ void tet_direct_just_send_tp_14()
> }
> printf("\nTest Case 14: Not able to send a message of size
> >(MDS_DIRECT_BUF_MAXSIZE) to 2000\n");
>
> - memset(big_message, 's', 8000);
> + char * big_message = (char*)malloc(65224);
> + memset(big_message, 's', 65224);
> + *(big_message + 65223) = 0;
> if(mds_direct_send_message(gl_tet_adest.mds_pwe1_hdl,
> NCSMDS_SVC_ID_EXTERNAL_MIN,
> NCSMDS_SVC_ID_EXTERNAL_MIN,1,
> @@ -9024,6 +9026,8 @@ void tet_direct_just_send_tp_14()
> else
> printf("\nSuccess\n");
>
> + free(big_message);
> +
> printf("\nCancel subscription\n");
> if(mds_service_cancel_subscription(gl_tet_adest.mds_pwe1_hdl,
> NCSMDS_SVC_ID_EXTERNAL_MIN,1,
> diff --git a/src/mds/apitest/mdstipc_conf.c b/src/mds/apitest/mdstipc_conf.c
> --- a/src/mds/apitest/mdstipc_conf.c
> +++ b/src/mds/apitest/mdstipc_conf.c
> @@ -1,6 +1,7 @@
> /* OpenSAF
> *
> * (C) Copyright 2008 The OpenSAF Foundation
> + * Copyright Ericsson AB 2017 - All Rights Reserved.
> *
> * This program is distributed in the hope that it will be useful, but
> * WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY
> @@ -21,6 +22,7 @@
> #include "mdstipc.h"
> #include "base/osaf_poll.h"
> extern int fill_syncparameters(int);
> +extern uint32_t mds_vdest_tbl_get_role(MDS_VDEST_ID vdest_id, V_DEST_RL
> *role);
> /****************** ADEST WRAPPERS ***********************/
> uint32_t adest_get_handle(void)
> {
> @@ -273,6 +275,13 @@ uint32_t vdest_change_role(MDS_DEST vdes
>
> if(ncsvda_api(&vda_info)==NCSCC_RC_SUCCESS)
> {
> + /*Making sure vdest change role done*/
> + V_DEST_RL role = 0;
> + mds_vdest_tbl_get_role(vdest, &role);
> + while(role != new_role) {
> + sleep(1);
> + mds_vdest_tbl_get_role(vdest, &role);
> + }
> printf("\nVDEST_CHANGE ROLE to %d is SUCCESSFULL",new_role);
> return NCSCC_RC_SUCCESS;
> }
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel