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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
spbro
OpenXG-RAN
Commits
073812ca
Commit
073812ca
authored
Jun 28, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-test-asan-errors' into integration_2024_w26b
parents
7264f9e0
7a86e36c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
14 deletions
+20
-14
ci-scripts/docker/Dockerfile.unittest.ubuntu22
ci-scripts/docker/Dockerfile.unittest.ubuntu22
+1
-1
common/utils/threadPool/test/test_thread-pool.c
common/utils/threadPool/test/test_thread-pool.c
+12
-2
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+3
-1
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
+4
-10
No files found.
ci-scripts/docker/Dockerfile.unittest.ubuntu22
View file @
073812ca
...
...
@@ -37,4 +37,4 @@ WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug .. && ninja tests
RUN cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug
-DSANITIZE_ADDRESS=True
.. && ninja tests
common/utils/threadPool/test/test_thread-pool.c
View file @
073812ca
...
...
@@ -46,7 +46,7 @@ void displayList(notifiedFIFO_t *nf)
struct
testData
{
int
id
;
int
sleepTime
;
char
txt
[
3
0
];
char
txt
[
5
0
];
};
void
processing
(
void
*
arg
)
...
...
@@ -64,21 +64,27 @@ int main()
logInit
();
notifiedFIFO_t
myFifo
;
initNotifiedFIFO
(
&
myFifo
);
int
num_elements_on_queue
=
0
;
pushNotifiedFIFO
(
&
myFifo
,
newNotifiedFIFO_elt
(
sizeof
(
struct
testData
),
1234
,
NULL
,
NULL
));
num_elements_on_queue
++
;
for
(
int
i
=
10
;
i
>
1
;
i
--
)
{
pushNotifiedFIFO
(
&
myFifo
,
newNotifiedFIFO_elt
(
sizeof
(
struct
testData
),
1000
+
i
,
NULL
,
NULL
));
num_elements_on_queue
++
;
}
displayList
(
&
myFifo
);
notifiedFIFO_elt_t
*
tmp
=
pullNotifiedFIFO
(
&
myFifo
);
printf
(
"pulled: %lu
\n
"
,
tmp
->
key
);
displayList
(
&
myFifo
);
delNotifiedFIFO_elt
(
tmp
);
tmp
=
pullNotifiedFIFO
(
&
myFifo
);
num_elements_on_queue
--
;
printf
(
"pulled: %lu
\n
"
,
tmp
->
key
);
displayList
(
&
myFifo
);
pushNotifiedFIFO
(
&
myFifo
,
newNotifiedFIFO_elt
(
sizeof
(
struct
testData
),
12345678
,
NULL
,
NULL
));
displayList
(
&
myFifo
);
delNotifiedFIFO_elt
(
tmp
);
do
{
tmp
=
pollNotifiedFIFO
(
&
myFifo
);
...
...
@@ -86,9 +92,12 @@ int main()
if
(
tmp
)
{
printf
(
"pulled: %lu
\n
"
,
tmp
->
key
);
displayList
(
&
myFifo
);
delNotifiedFIFO_elt
(
tmp
);
num_elements_on_queue
--
;
}
else
printf
(
"Empty list
\n
"
);
}
while
(
tmp
);
}
while
(
num_elements_on_queue
>
0
);
AssertFatal
(
pollNotifiedFIFO
(
&
myFifo
)
==
NULL
,
"Unexpected extra element on queue
\n
"
);
tpool_t
pool
;
char
params
[]
=
"1,2,3,4,5"
;
...
...
@@ -129,5 +138,6 @@ int main()
dur
/
1000
,
cumulProcessTime
/
1000
,
(
dur
-
cumulProcessTime
)
/
(
1000
*
nb_jobs
));
abortTpool
(
&
pool
);
return
0
;
}
common/utils/threadPool/thread-pool.h
View file @
073812ca
...
...
@@ -336,7 +336,9 @@ static inline int abortTpool(tpool_t *t) {
thread
=
t
->
allthreads
;
while
(
thread
!=
NULL
)
{
pthread_cancel
(
thread
->
threadID
);
thread
=
thread
->
next
;
struct
one_thread
*
next
=
thread
->
next
;
free
(
thread
);
thread
=
next
;
}
return
nbRemoved
;
...
...
openair2/LAYER2/nr_rlc/nr_rlc_entity.c
View file @
073812ca
...
...
@@ -110,11 +110,8 @@ nr_rlc_entity_t *new_nr_rlc_entity_am(
ret
->
max_retx_threshold
=
max_retx_threshold
;
ret
->
sn_field_length
=
sn_field_length
;
if
(
!
(
sn_field_length
==
12
||
sn_field_length
==
18
))
{
LOG_E
(
RLC
,
"%s:%d:%s: wrong SN field_lenght (%d), must be 12 or 18
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
sn_field_length
);
exit
(
1
);
}
AssertFatal
(
sn_field_length
==
12
||
sn_field_length
==
18
,
"Wrong SN field_length (%d), must be 12 or 18
\n
"
,
sn_field_length
);
ret
->
sn_modulus
=
1
<<
ret
->
sn_field_length
;
ret
->
window_size
=
ret
->
sn_modulus
/
2
;
...
...
@@ -172,11 +169,8 @@ nr_rlc_entity_t *new_nr_rlc_entity_um(
ret
->
t_reassembly
=
t_reassembly
;
ret
->
sn_field_length
=
sn_field_length
;
if
(
!
(
sn_field_length
==
6
||
sn_field_length
==
12
))
{
LOG_E
(
RLC
,
"%s:%d:%s: wrong SN field_lenght (%d), must be 6 or 12
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
sn_field_length
);
exit
(
1
);
}
AssertFatal
(
sn_field_length
==
6
||
sn_field_length
==
12
,
"Wrong SN field_length (%d), must be 6 or 12
\n
"
,
sn_field_length
);
ret
->
sn_modulus
=
1
<<
ret
->
sn_field_length
;
ret
->
window_size
=
ret
->
sn_modulus
/
2
;
...
...
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