prog: remove unexpected resource generation calls whitelist

I think resource being a part of a variable length array or a union option
is an acceptable usecase.
I've started hitting this panic with some SCTP setsockopts after making
SCTP assoc_id a resource.
This commit is contained in:
Andrey Konovalov 2017-05-17 15:48:16 +02:00
parent 209dba0111
commit 1813bf304a

View File

@ -448,12 +448,6 @@ func (r *randGen) createResource(s *state, res *sys.ResourceType) (arg *Arg, cal
arg := resultArg(res, allres[r.Intn(len(allres))])
return arg, calls
}
switch meta.Name {
// Return resources in a variable-length array (length can be 0).
case "getgroups", "ioctl$DRM_IOCTL_RES_CTX":
default:
panic(fmt.Sprintf("unexpected call failed to create a resource %v: %v", kind, meta.Name))
}
// Discard unsuccessful calls.
for _, c := range calls {
foreachArg(c, func(arg, _ *Arg, _ *[]*Arg) {