annotate test/call_suite/rand-sig.lua @ 356:2f64957d6a46
- fix to dynload to build with musl libc (latter has dlinfo but not RTLD_SELF, so fallback to dl_iterate_phdr if on ELF targets)
author |
Tassilo Philipp |
date |
Tue, 25 Feb 2020 16:07:45 +0100 |
parents |
3e629dc19168 |
children |
1cb8a65ea27f |
rev |
line source |
0
|
1 require"config"
|
|
2
|
|
3 rtypes = "v"..types
|
|
4
|
|
5 math.randomseed(2342)
|
|
6 local sigs = { }
|
|
7 local id
|
|
8 for i = 1, ncases do
|
|
9 id = math.random(#rtypes)
|
|
10 local nargs = math.random(minargs,maxargs)
|
|
11 local sig = { rtypes:sub(id,id)}
|
|
12 for j = 1, nargs do
|
|
13 id = math.random(#types)
|
|
14 sig[#sig+1] = types:sub(id,id)
|
|
15 end
|
|
16 io.write(table.concat(sig))
|
|
17 io.write("\n")
|
|
18 end
|
|
19
|