Skip to content

Commit 8e4f0be

Browse files
author
codebot
committed
Update main
# Conflicts: # CMakeLists.txt # include/srsran/adt/detail/has_member.h # include/srsran/adt/detail/tuple_utils.h # include/srsran/adt/ranges/filter_view.h # include/srsran/ngap/ngap_reset.h # include/srsran/support/executors/concurrent_metrics_executor.h # include/srsran/support/memory_pool/bounded_queue_object_pool.h # lib/cu_up/routines/initial_cu_up_setup_routine.cpp # lib/du/du_high/du_manager/procedures/initial_du_setup_procedure.cpp # lib/phy/upper/signal_processors/signal_processor_factories.cpp # tests/unittests/adt/filter_view_test.cpp # tests/unittests/phy/lower/modulation/ofdm_prach_demodulator_test_data.tar.gz # tests/unittests/phy/upper/channel_coding/short/short_block_detector_test_data.tar.gz # tests/unittests/phy/upper/channel_processors/prach_detector_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/channel_estimator/port_channel_estimator_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/nzp_csi_rs/nzp_csi_rs_generator_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/pdcch/dmrs_pdcch_processor_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/pdsch/dmrs_pdsch_processor_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/pucch/dmrs_pucch_estimator_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/pusch/dmrs_pusch_estimator_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/srs/srs_estimator_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/ssb/dmrs_pbch_processor_test_data.tar.gz
2 parents cdc93a6 + b918f8d commit 8e4f0be

File tree

977 files changed

+21282
-7533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

977 files changed

+21282
-7533
lines changed

.gdbinit

Lines changed: 67 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@
2222
# Pretty-Printers
2323
############################################
2424

25+
# If you add a pretty printer, please create the corresponding test in
26+
# tests/utils/gdb/pretty_printers
27+
2528
python
2629

2730
import struct
2831

2932
###### static_vector<T, N> ########
3033

3134
class StaticVectorPrinter(object):
35+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_static_vector_test.cpp
36+
3237
def __init__(self, val):
3338
self.val = val
3439
self.value_type = self.val.type.template_argument(0)
@@ -58,25 +63,27 @@ gdb.pretty_printers.append(make_static_vector)
5863
###### bounded_bitset<N, reversed> ########
5964

6065
class BoundedBitsetPrinter(object):
61-
def __init__(self, val):
62-
self.val = val
63-
64-
def to_string(self):
65-
length = int(self.val['cur_size'])
66-
capacity = int(self.val.type.template_argument(0))
67-
buffer = self.val['buffer']['_M_elems']
68-
bitstring = ''
69-
nof_words = (length + 63) // 64
70-
nof_bits_in_word = 64
71-
for idx in reversed(range(nof_words)):
72-
bitstring += '{:064b}'.format(int(buffer[idx]))
73-
# last word might have a lower number of bits
74-
last_word_nof_bits = length % 64
75-
bitstring = bitstring[64-last_word_nof_bits::]
76-
return f'bounded_bitset of length {length}, capacity {capacity} = {bitstring}'
77-
78-
def display_hint(self):
79-
return 'string'
66+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_bounded_bitset_test.cpp
67+
68+
def __init__(self, val):
69+
self.val = val
70+
71+
def to_string(self):
72+
length = int(self.val['cur_size'])
73+
capacity = int(self.val.type.template_argument(0))
74+
buffer = self.val['buffer']['_M_elems']
75+
bitstring = ''
76+
nof_words = (length + 63) // 64
77+
nof_bits_in_word = 64
78+
for idx in reversed(range(nof_words)):
79+
bitstring += '{:064b}'.format(int(buffer[idx]))
80+
# last word might have a lower number of bits
81+
last_word_nof_bits = length % 64
82+
bitstring = bitstring[64-last_word_nof_bits::]
83+
return f'bounded_bitset of length {length}, capacity {capacity} = {bitstring}'
84+
85+
def display_hint(self):
86+
return 'array'
8087

8188

8289
def make_bounded_bitset(val):
@@ -86,40 +93,11 @@ def make_bounded_bitset(val):
8693

8794
gdb.pretty_printers.append(make_bounded_bitset)
8895

89-
###### optional<T> #######
90-
91-
class OptionalPrinter(object):
92-
def __init__(self, val):
93-
self.val = val
94-
self.value_type = self.val.type.strip_typedefs().template_argument(0)
95-
96-
def children(self):
97-
has_val = bool(self.val['storage']['has_val'])
98-
if has_val:
99-
payload = self.val['storage']['payload']['val']
100-
yield '[0]', payload
101-
102-
def to_string(self):
103-
has_val = bool(self.val['storage']['has_val'])
104-
if has_val:
105-
return 'optional (present)'
106-
return 'optional (empty)'
107-
108-
def display_hint(self):
109-
return 'string'
110-
111-
112-
def make_optional(val):
113-
s = str(val.type.strip_typedefs())
114-
if s.startswith('srsran::optional<') and s.endswith('>'):
115-
return OptionalPrinter(val)
116-
117-
gdb.pretty_printers.append(make_optional)
118-
119-
12096
###### tiny_optional<T> #######
12197

12298
class TinyOptionalPrinter(object):
99+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_tiny_optional_test.cpp
100+
123101
def __init__(self, val):
124102
self.val = val
125103
self.has_val = TinyOptionalPrinter.get_has_value(self.val)
@@ -134,15 +112,15 @@ class TinyOptionalPrinter(object):
134112
return 'tiny_optional (empty)'
135113

136114
def display_hint(self):
137-
return 'string'
115+
return 'array'
138116

139117
@staticmethod
140118
def get_has_value(gdb_val):
141119
fields = gdb_val.type.strip_typedefs().fields()
142120
assert len(fields) > 0
143121
f_type_str = str(fields[0].type.strip_typedefs())
144-
if f_type_str.startswith('srsran::optional<'):
145-
return bool(gdb_val['storage']['has_val'])
122+
if f_type_str.startswith('std::optional<'):
123+
return gdb_val['_M_payload']['_M_engaged']
146124
if 'std::unique_ptr<' in str(gdb_val['val'].type):
147125
val_str = str(gdb_val['val'])
148126
val_str = val_str[val_str.find('get() = ') + len('get() = ')::]
@@ -155,8 +133,8 @@ class TinyOptionalPrinter(object):
155133
def get_value(gdb_val):
156134
fields = gdb_val.type.strip_typedefs().fields()
157135
f_type_str = str(fields[0].type.strip_typedefs())
158-
if f_type_str.startswith('srsran::optional<'):
159-
return gdb_val['storage']['payload']['val']
136+
if f_type_str.startswith('std::optional<'):
137+
return gdb_val['_M_payload']['_M_payload']['_M_value']
160138
return gdb_val['val']
161139

162140

@@ -170,23 +148,31 @@ gdb.pretty_printers.append(make_tiny_optional)
170148
###### slotted_array<T, N> #######
171149

172150
class SlotArrayPrinter(object):
173-
def __init__(self, val):
174-
self.val = val
175-
self.value_type = self.val.type.strip_typedefs().template_argument(0)
176-
self.capacity = int(self.val.type.strip_typedefs().template_argument(1))
177-
self.nof_elems = int(self.val['nof_elems'])
151+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_slotted_array_test.cpp
152+
153+
def __init__(self, val):
154+
self.val = val
155+
self.value_type = self.val.type.strip_typedefs().template_argument(0)
156+
self.capacity = int(self.val.type.strip_typedefs().template_argument(1))
157+
self.nof_elems = int(self.val['nof_elems'])
178158

179-
def children(self):
180-
vec = self.val['vec']['_M_elems']
181-
for idx in range(self.capacity):
182-
if TinyOptionalPrinter.get_has_value(vec[idx]):
183-
yield f'[{idx}]', TinyOptionalPrinter.get_value(vec[idx])
159+
def children(self):
160+
opt_value = gdb.lookup_type(f'srsran::tiny_optional<{self.value_type}>')
161+
vec_size = self.val['vec']['sz']
162+
vec = self.val['vec']['array']['_M_elems'].cast(opt_value.pointer())
163+
count = 0
164+
for idx in range(vec_size):
165+
if TinyOptionalPrinter.get_has_value(vec[idx]):
166+
yield f'{count}', f'{idx}'
167+
count += 1
168+
yield f'{count}', TinyOptionalPrinter.get_value(vec[idx])
169+
count += 1
184170

185-
def to_string(self):
186-
return f'slotted_array of {self.nof_elems} elements, capacity {self.capacity}'
171+
def to_string(self):
172+
return f'slotted_array of {self.nof_elems} elements, capacity {self.capacity}'
187173

188-
def display_hint(self):
189-
return 'string'
174+
def display_hint(self):
175+
return 'map'
190176

191177
def make_slotted_array(val):
192178
s = str(val.type.strip_typedefs())
@@ -198,6 +184,8 @@ gdb.pretty_printers.append(make_slotted_array)
198184
###### slotted_vector<T> #######
199185

200186
class SlotVectorPrinter(object):
187+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_slotted_vector_test.cpp
188+
201189
def __init__(self, val):
202190
self.val = val
203191
self.value_type = self.val.type.strip_typedefs().template_argument(0)
@@ -210,15 +198,19 @@ class SlotVectorPrinter(object):
210198
max_int = 2**64 - 1
211199
indexmapper_ptr = indexmapper['_M_impl']['_M_start']
212200
object_ptr = self.objects['_M_impl']['_M_start']
201+
count = 0
213202
for idx in range(nof_idxs):
214203
if int(indexmapper_ptr[idx]) != max_int:
215-
yield f'[{idx}]', object_ptr[indexmapper_ptr[idx]]
204+
yield f'{count}', f'{idx}'
205+
count += 1
206+
yield f'{count}', object_ptr[indexmapper_ptr[idx]]
207+
count += 1
216208

217209
def to_string(self):
218210
return f'slotted_vector of {self.nof_elems} elements'
219211

220212
def display_hint(self):
221-
return 'string'
213+
return 'map'
222214

223215
def make_slotted_vector(val):
224216
s = str(val.type.strip_typedefs())
@@ -230,6 +222,8 @@ gdb.pretty_printers.append(make_slotted_vector)
230222
###### Brain Floating Point 16 (bf16_t) ######
231223

232224
class BFloat16(object):
225+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_bf16_test.cpp
226+
233227
def __init__(self, val):
234228
self.__val = val
235229

@@ -250,6 +244,8 @@ def make_bf16_t(val):
250244
gdb.pretty_printers.append(make_bf16_t)
251245

252246
class BFloat16Complex(object):
247+
# Test: tests/utils/gdb/pretty_printers/pretty_printer_cbf16_test.cpp
248+
253249
def __init__(self, val):
254250
self.__val = val
255251

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ plugin nightly:
334334
## Static
335335
################################################################################
336336
headers:
337-
image: ubuntu
337+
image: ubuntu:24.04
338338
stage: static
339339
variables:
340340
GIT_LFS_SKIP_SMUDGE: 1

.gitlab/ci-shared/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ variables:
6262
ENABLE_RTSAN: "" # Empty for cmake default
6363
ENABLE_WERROR: "" # Empty for cmake default
6464
ENABLE_PLUGINS: "" # Empty for cmake default
65+
TEST_GDB_PRINTERS: "" # Empty for cmake default
6566
FORCE_DEBUG_INFO: "" # Empty for cmake default
6667
MARCH: "" # Empty for cmake default
6768
MTUNE: "" # Empty for cmake default
@@ -93,8 +94,8 @@ variables:
9394
ENABLE_UHD ENABLE_DPDK ENABLE_ZEROMQ \
9495
ENABLE_ASAN ENABLE_TSAN ENABLE_GCOV \
9596
ENABLE_UBSAN ENABLE_UBSAN_MIN ENABLE_RTSAN \
96-
ENABLE_WERROR ENABLE_PLUGINS FORCE_DEBUG_INFO \
97-
MARCH MTUNE \
97+
ENABLE_WERROR ENABLE_PLUGINS TEST_GDB_PRINTERS \
98+
FORCE_DEBUG_INFO MARCH MTUNE \
9899
; do
99100
if [ -n "${!var}" ]; then
100101
BUILD_ARGS="-D${var}=${!var} ${BUILD_ARGS}"

.gitlab/ci-shared/e2e.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ variables:
5252

5353
.load retina variables:
5454
stage: ci
55+
image: ubuntu:24.04
5556
variables:
5657
GIT_LFS_SKIP_SMUDGE: 1
5758
retry: 2
@@ -194,17 +195,19 @@ variables:
194195
echo "*******************************************************************************************************************************"
195196
# Artifact transfer
196197
- |
197-
# Saving artifacts to the FTP server
198-
# Verify if SSH connection is active
199-
if ! nc -z -v "$FTP_SERVER_IP" 22 >/dev/null 2>&1; then
200-
echo "Error: SSH server ${FTP_SERVER_IP}:22 is not active or is not reachable."
201-
exit 1
198+
if [ "$CLUSTER" = "new-retina-e2e-amd64" ]; then
199+
# Saving artifacts to the FTP server
200+
# Verify if SSH connection is active
201+
if ! nc -z -v "$FTP_SERVER_IP" 22 >/dev/null 2>&1; then
202+
echo "Error: SSH server ${FTP_SERVER_IP}:22 is not active or is not reachable."
203+
exit 1
204+
fi
205+
artifacts_dir="${SRSRANDIR}/tests/e2e/log"
206+
compressed_artifact="artifacts_${CI_JOB_NAME_SLUG}_${CI_JOB_ID}.zip"
207+
remote_path="E:/artifacts/"
208+
# Compress the artifacts
209+
zip -q -r "${compressed_artifact}" "${artifacts_dir}"
210+
# Send the artifacts to the server
211+
sshpass -p "${SSH_PASS}" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P 22 "${compressed_artifact}" "${SSH_USER}@${FTP_SERVER_IP}:${remote_path}" >/dev/null 2>&1
212+
echo "Artifacts saved at ${FTP_SERVER_IP}:${remote_path}/${compressed_artifact}"
202213
fi
203-
artifacts_dir="${SRSRANDIR}/tests/e2e/log"
204-
compressed_artifact="artifacts_${CI_JOB_NAME_SLUG}_${CI_JOB_ID}.zip"
205-
remote_path="E:/artifacts/"
206-
# Compress the artifacts
207-
zip -q -r "${compressed_artifact}" "${artifacts_dir}"
208-
# Send the artifacts to the server
209-
sshpass -p "${SSH_PASS}" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P 22 "${compressed_artifact}" "${SSH_USER}@${FTP_SERVER_IP}:${remote_path}" >/dev/null 2>&1
210-
echo "Artifacts saved at ${FTP_SERVER_IP}:${remote_path}/${compressed_artifact}"

0 commit comments

Comments
 (0)