From 3da9017c17c7d2432c4b76345c4d2efbeedd2935 Mon Sep 17 00:00:00 2001 From: Joey Jiaojg Date: Wed, 26 May 2021 19:38:04 +0800 Subject: pkg/compiler: add glob type * all: add new typename dirname The current way to check files under sysfs or proc is: - define a string to represent each file - open the file - pass the fd to write / read / close The issues above are: - Need to know what file present on target device - Need to write openat for each file With dirname added, which will open one file in the directory randomly and then pass the fd to write/read/close. * all: use typename glob to match filename Fixes #481 --- pkg/compiler/testdata/all.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/compiler/testdata/all.txt') diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt index 17b7c838d..b1adf2321 100644 --- a/pkg/compiler/testdata/all.txt +++ b/pkg/compiler/testdata/all.txt @@ -252,6 +252,9 @@ foo_templ9(a ptr[in, templ_base3[int64]]) foo_templ10(a ptr[in, templ_base4[int8]]) foo_templ11(a ptr[in, templ_base5[42, int8]]) +foo_glob0(a ptr[in, glob["/sys/"]]) +foo_glob1(a ptr[in, glob["/sys/**/*"]]) + # Structs. s0 { -- cgit mrf-deployment