Skip to content

Commit

Permalink
Fix the ./testsimple crash in MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
acetcom committed May 6, 2019
1 parent 2d74383 commit ab81e38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
13 changes: 7 additions & 6 deletions test/complex/attach_test.c
Expand Up @@ -369,8 +369,6 @@ static void attach_test1(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, recvbuf);
ogs_pkbuf_free(recvbuf);

ogs_msleep(300);

/* Send Detach Request */
rv = tests1ap_build_detach_request(&sendbuf, msgindex);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
Expand Down Expand Up @@ -444,6 +442,7 @@ static void attach_test1(abts_case *tc, void *data)
rv = testenb_gtpu_close(gtpu);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

ogs_msleep(300);
return;

#if IT_WILL_BE_REMOVED
Expand Down Expand Up @@ -706,8 +705,6 @@ static void attach_test2(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, recvbuf);
ogs_pkbuf_free(recvbuf);

ogs_msleep(300);

/*****************************************************************
* Attach Request : IMSI, Integrity Protected, MAC Matched
* Send Initial-UE Message + Attach Request + PDN Connectivity */
Expand Down Expand Up @@ -751,8 +748,6 @@ static void attach_test2(abts_case *tc, void *data)
/*****************************************************************
* Attach Request : Unknown IMSI, Integrity Protected
* Send Initial-UE Message + Attach Request + PDN Connectivity */
ogs_msleep(300);

rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+2);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
rv = testenb_s1ap_send(sock, sendbuf);
Expand Down Expand Up @@ -815,6 +810,8 @@ static void attach_test2(abts_case *tc, void *data)
/* eNB disonncect from MME */
rv = testenb_s1ap_close(sock);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

ogs_msleep(300);
}

/**************************************************************
Expand Down Expand Up @@ -1350,6 +1347,8 @@ static void attach_test4(abts_case *tc, void *data)
/* eNB disonncect from SGW */
rv = testenb_gtpu_close(gtpu);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

ogs_msleep(300);
}

static void attach_test5(abts_case *tc, void *data)
Expand Down Expand Up @@ -1687,6 +1686,8 @@ static void attach_test5(abts_case *tc, void *data)
/* eNB disonncect from MME */
rv = testenb_s1ap_close(sock);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

ogs_msleep(300);
}

abts_suite *test_attach(abts_suite *suite)
Expand Down
16 changes: 1 addition & 15 deletions test/simple/mnc3-test.c
Expand Up @@ -229,8 +229,6 @@ static void test1_func(abts_case *tc, void *data)
ABTS_TRUE(tc, memcmp(recvbuf->data+32, tmp+32, 20) == 0);
ogs_pkbuf_free(recvbuf);

ogs_msleep(300);

/* Send GTP-U ICMP Packet */
rv = testgtpu_build_ping(&sendbuf, "45.45.0.2", "45.45.0.1");
ABTS_INT_EQUAL(tc, OGS_OK, rv);
Expand All @@ -242,16 +240,6 @@ static void test1_func(abts_case *tc, void *data)
ABTS_PTR_NOTNULL(tc, recvbuf);
ogs_pkbuf_free(recvbuf);

ogs_msleep(300);

/* eNB disonncect from MME */
rv = testenb_s1ap_close(sock);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

/* eNB disonncect from SGW */
rv = testenb_gtpu_close(gtpu);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

/********** Remove Subscriber in Database */
doc = BCON_NEW("imsi", BCON_UTF8("310014987654004"));
ABTS_PTR_NOTNULL(tc, doc);
Expand All @@ -261,8 +249,6 @@ static void test1_func(abts_case *tc, void *data)

mongoc_collection_destroy(collection);

ogs_msleep(300);

/* eNB disonncect from MME */
rv = testenb_s1ap_close(sock);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
Expand All @@ -271,7 +257,7 @@ static void test1_func(abts_case *tc, void *data)
rv = testenb_gtpu_close(gtpu);
ABTS_INT_EQUAL(tc, OGS_OK, rv);

return;
ogs_msleep(300);
}

abts_suite *test_mnc3(abts_suite *suite)
Expand Down

0 comments on commit ab81e38

Please sign in to comment.