aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorNecip Fazil Yildiran <necip@google.com>2020-08-10 14:43:38 +0000
committerDmitry Vyukov <dvyukov@google.com>2020-08-13 13:50:25 +0200
commitf5442bde55872d703f184f8617329f706bad8149 (patch)
tree14e121020d6aacd857b80351f01546818f19a74b /sys
parentee7cb8b69583db417b187b53f4765c3a403cd4cf (diff)
pkg, prog: add per-field direction attribute
Diffstat (limited to 'sys')
-rw-r--r--sys/test/test.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/sys/test/test.txt b/sys/test/test.txt
index ac2612768..523c3ee71 100644
--- a/sys/test/test.txt
+++ b/sys/test/test.txt
@@ -814,3 +814,46 @@ resource disabled_resource[int32]
disabled0() (disabled)
disabled1() disabled_resource (disabled)
disabled2(a disabled_resource) (disabled)
+
+# Struct/union field direction attribute (overrides ptr dir)
+
+resource r100[int32]
+resource r101[int32]
+resource r102[int32]
+resource r103[int32]
+resource r104[int32]
+
+test$r100_consumer(a r100)
+test$r101_consumer(a r101)
+test$r102_consumer_recur(a ptr[out, syz_r102_in_recur0])
+test$r103_consumer(a r103)
+test$r104_producer(a ptr[out, r104])
+test$r100_producer(a ptr[in, syz_r100_out])
+test$r101_producer_recur(a ptr[in, syz_r101_out_recur0])
+test$r102_producer(a ptr[out, r102])
+test$r103_producer_r104_consumer(a ptr[inout, syz_r103_r104])
+
+syz_r100_out {
+ f0 r100 (out)
+}
+
+syz_r101_out_recur0 {
+ f0 ptr[in, syz_r101_out_recur1]
+}
+
+syz_r101_out_recur1 {
+ f0 r101 (out)
+}
+
+syz_r102_in_recur0 {
+ f0 ptr[out, syz_r102_in_recur1]
+}
+
+syz_r102_in_recur1 {
+ f0 r102 (in)
+}
+
+syz_r103_r104 [
+ opt0 r103 (out)
+ opt1 r104 (in)
+]