Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
b8ee622f
Commit
b8ee622f
authored
Aug 30, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for F1 DU Configuration Update Acknowledge lib
parent
b91e1b0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
openair2/F1AP/tests/f1ap_lib_test.c
openair2/F1AP/tests/f1ap_lib_test.c
+47
-0
No files found.
openair2/F1AP/tests/f1ap_lib_test.c
View file @
b8ee622f
...
...
@@ -431,6 +431,52 @@ static void test_f1ap_du_configuration_update(void)
free_f1ap_du_configuration_update
(
&
orig
);
}
/**
* @brief Test F1 gNB-DU Configuration Update Acknowledge
*/
static
void
test_f1ap_du_configuration_update_acknowledge
(
void
)
{
// Create message
f1ap_gnb_du_configuration_update_acknowledge_t
orig
=
{
.
transaction_id
=
5
,
.
num_cells_to_activate
=
1
,
.
cells_to_activate
=
{{
.
nr_cellid
=
987654321
,
.
nrpci
=
50
,
.
plmn
=
{.
mcc
=
001
,
.
mnc
=
01
,
.
mnc_digit_length
=
2
},
.
num_SI
=
1
,
.
SI_msg
=
{{
.
SI_type
=
7
,
.
SI_container_length
=
10
,
.
SI_container
=
malloc
(
sizeof
(
uint8_t
)
*
10
),
}},
}},
};
for
(
int
i
=
0
;
i
<
orig
.
cells_to_activate
[
0
].
SI_msg
[
0
].
SI_container_length
;
i
++
)
{
orig
.
cells_to_activate
[
0
].
SI_msg
[
0
].
SI_container
[
i
]
=
i
;
}
// ASN.1 enc/dec
F1AP_F1AP_PDU_t
*
f1enc
=
encode_f1ap_du_configuration_update_acknowledge
(
&
orig
);
F1AP_F1AP_PDU_t
*
f1dec
=
f1ap_encode_decode
(
f1enc
);
f1ap_msg_free
(
f1enc
);
// Decoding
f1ap_gnb_du_configuration_update_acknowledge_t
decoded
=
{
0
};
bool
ret
=
decode_f1ap_du_configuration_update_acknowledge
(
f1dec
,
&
decoded
);
AssertFatal
(
ret
,
"decode_f1ap_du_configuration_update_acknowledge(): could not decode message
\n
"
);
f1ap_msg_free
(
f1dec
);
// Equality check
ret
=
eq_f1ap_du_configuration_update_acknowledge
(
&
orig
,
&
decoded
);
AssertFatal
(
ret
,
"eq_f1ap_du_configuration_update_acknowledge(): decoded message doesn't match
\n
"
);
free_f1ap_du_configuration_update_acknowledge
(
&
decoded
);
// Deep copy
f1ap_gnb_du_configuration_update_acknowledge_t
cp
=
cp_f1ap_du_configuration_update_acknowledge
(
&
orig
);
ret
=
eq_f1ap_du_configuration_update_acknowledge
(
&
orig
,
&
cp
);
AssertFatal
(
ret
,
"eq_f1ap_du_configuration_update_acknowledge(): copied message doesn't match
\n
"
);
// Free
free_f1ap_du_configuration_update_acknowledge
(
&
cp
);
free_f1ap_du_configuration_update_acknowledge
(
&
orig
);
}
/**
* @brief Test F1 gNB-CU Configuration Update
*/
...
...
@@ -513,5 +559,6 @@ int main()
test_f1ap_du_configuration_update
();
test_f1ap_cu_configuration_update
();
test_f1ap_cu_configuration_update_acknowledge
();
test_f1ap_du_configuration_update_acknowledge
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment