Skip to content

Commit 7fd29b7

Browse files
committed
tests/fetch-usdts.awk: use base + offset to identify a semaphore
The semaphore offsets between different binaries may coincide, which leads to incorrect matching of USDTs by test scripts. Use base + offset string to identify a semaphore for the purpose of USDT spec comparison. This way the probability of a collision is much lower. Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
1 parent 5b75b31 commit 7fd29b7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/fetch-usdts.awk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ function print_entry()
1616
if (base != 0 && !(base in basemap)) {
1717
basemap[base] = ++base_cnt;
1818
}
19-
if (sema != 0 && !(sema in semamap)) {
20-
semamap[sema] = ++sema_cnt;
19+
if (sema != 0) {
20+
sema = base "+" sema;
21+
if (!(sema in semamap)) {
22+
semamap[sema] = ++sema_cnt;
23+
}
2124
}
2225
base_stub = (base == 0) ? "0" : sprintf("BASE%d", basemap[base]);
2326
sema_stub = (sema == 0) ? "0" : sprintf("SEMA%d", semamap[sema]);

0 commit comments

Comments
 (0)