Skip to content

Commit ab920f0

Browse files
Change expected rmw GID array size to 16 bytes (#138)
The size changed from 24 to 16 bytes in ros2/rmw#345. The same size is defined in `tracetools`, and it was never updated. In practice, reading 24-16=8 random extra bytes didn't change much, since nothing is currently relying on the GID values, at least not relying on getting the same GID for the same object from two different systems, because it doesn't work with `rmw_cyclonedds`, see ros2/rmw_cyclonedds#377. Signed-off-by: Christophe Bedard <[email protected]>
1 parent 57e6ede commit ab920f0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: test_tracetools/test/test_generic_subscription.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_all(self):
6666

6767
for event in rmw_sub_init_events:
6868
self.assertValidHandle(event, ['rmw_subscription_handle'])
69-
self.assertValidStaticArray(event, 'gid', int, 24)
69+
self.assertValidStaticArray(event, 'gid', int, 16)
7070
for event in rcl_sub_init_events:
7171
self.assertValidHandle(
7272
event,

Diff for: test_tracetools/test/test_publisher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_all(self):
4747
rmw_pub_init_events = self.get_events_with_name(tp.rmw_publisher_init)
4848
for event in rmw_pub_init_events:
4949
self.assertValidHandle(event, ['rmw_publisher_handle'])
50-
self.assertValidStaticArray(event, 'gid', int, 24)
50+
self.assertValidStaticArray(event, 'gid', int, 16)
5151
pub_init_events = self.get_events_with_name(tp.rcl_publisher_init)
5252
for event in pub_init_events:
5353
self.assertValidHandle(

Diff for: test_tracetools/test/test_subscription.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_all(self):
6565

6666
for event in rmw_sub_init_events:
6767
self.assertValidHandle(event, ['rmw_subscription_handle'])
68-
self.assertValidStaticArray(event, 'gid', int, 24)
68+
self.assertValidStaticArray(event, 'gid', int, 16)
6969
for event in rcl_sub_init_events:
7070
self.assertValidHandle(
7171
event,

Diff for: tracetools/include/tracetools/tp_call.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "tracetools/version.h"
3636

3737
/// See RMW_GID_STORAGE_SIZE in rmw.
38-
#define TRACETOOLS_GID_STORAGE_SIZE 24u
38+
#define TRACETOOLS_GID_STORAGE_SIZE 16u
3939

4040
#ifdef __clang__
4141
# pragma clang diagnostic push

0 commit comments

Comments
 (0)