From f5442bde55872d703f184f8617329f706bad8149 Mon Sep 17 00:00:00 2001 From: Necip Fazil Yildiran Date: Mon, 10 Aug 2020 14:43:38 +0000 Subject: pkg, prog: add per-field direction attribute --- sys/test/test.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'sys') 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) +] -- cgit mrf-deployment