aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test
diff options
context:
space:
mode:
authorFlorent Revest <revest@chromium.org>2023-07-04 17:59:04 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-02-01 10:12:21 +0000
commit810241190102eaf849f5744ca7eeb68ad34f01d7 (patch)
tree941d2616ff4038ae1e4198ecbaa5fd708fd845eb /sys/test
parentc40f278e4d854c3b6341ec272dd3eb9b84fcff54 (diff)
pkg/csource: annotate syscall() args with their pretty-printed values
This factorizes const arguments into the shortest flags OR bitmask possible so they are easy to read. E.g: /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul
Diffstat (limited to 'sys/test')
-rw-r--r--sys/test/csource.txt3
-rw-r--r--sys/test/csource.txt.const4
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/test/csource.txt b/sys/test/csource.txt
index 1f524da89..4efdebb2f 100644
--- a/sys/test/csource.txt
+++ b/sys/test/csource.txt
@@ -5,6 +5,8 @@
resource fd0[int32]
+bitmask = BIT_0, BIT_1, BIT_0_AND_1
+
csource0(num int32) fd0
csource1(fd fd0)
csource2(buf ptr[in, array[int8]])
@@ -12,3 +14,4 @@ csource3(buf ptr[in, array[const[0, int8], 10]])
csource4(buf ptr[in, array[const[0x30, int8], 10]])
csource5(buf ptr[in, array[const[0x3130, int16], 5]])
csource6(buf ptr[in, array[const[0x3130, int16be], 6]])
+csource7(flag flags[bitmask])
diff --git a/sys/test/csource.txt.const b/sys/test/csource.txt.const
new file mode 100644
index 000000000..2c90daac7
--- /dev/null
+++ b/sys/test/csource.txt.const
@@ -0,0 +1,4 @@
+arches = 32_fork_shmem, 32_shmem, 64, 64_fork
+BIT_0 = 1
+BIT_1 = 2
+BIT_0_AND_1 = 3