Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add runtime tests for regression bugs
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# https://github.com/iovisor/bpftrace/pull/566#issuecomment-487295113 | ||
NAME codegen_struct_save_nested | ||
RUN bpftrace -e 'struct Foo { int m; struct { int x; int y; } bar; int n; } BEGIN { @foo = (Foo)0; @bar = @foo.bar; @x = @foo.bar.x; printf("done\n"); exit(); }' | ||
EXPECT done | ||
TIMEOUT 1 | ||
|
||
# https://github.com/iovisor/bpftrace/issues/759 | ||
# Update test once https://github.com/iovisor/bpftrace/pull/781 lands | ||
# NAME ntop_map_printf | ||
# RUN bpftrace -v -e 'union ip { char v4[4]; char v6[16]; } uprobe:./testprogs/ntop:test_ntop { @a = ntop(2, ((union ip*)arg0)->v4); printf("v4: %s; ", @a); @b = ntop(10, ((union ip*)arg1)->v6); exit() } END { printf("v6: %s", @b); clear(@a); clear(@b) }' | ||
# AFTER ./testprogs/ntop | ||
# EXPECT v4: 127.0.0.1; v6: ffee:ffee:ddcc:ddcc:bbaa:bbaa:c0a8:1 | ||
# TIMEOUT 1 |