From d646e21ff436cd2a40b23314436cd53f21ae9500 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 5 Jan 2020 12:44:49 +0100 Subject: prog: fix tests for string enforcement String value enforcement broke a number of tests where we use different values. Be more string as to what string values we use in tests. Required to add tmpfs descriptions to test syz_mount_image. Also special-casing AF_ALG algorithms as these are auto-generated. --- prog/encoding.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'prog/encoding.go') diff --git a/prog/encoding.go b/prog/encoding.go index f288dbc93..7c5dab10f 100644 --- a/prog/encoding.go +++ b/prog/encoding.go @@ -542,7 +542,9 @@ func (p *parser) parseArgString(t Type) (Arg, error) { data = append(data, make([]byte, diff)...) } data = data[:size] - if typ.Kind == BufferString && len(typ.Values) != 0 { + if typ.Kind == BufferString && len(typ.Values) != 0 && + // AUTOGENERATED will be padded by 0's. + !strings.HasPrefix(typ.Values[0], "AUTOGENERATED") { matched := false for _, val := range typ.Values { if string(data) == val { -- cgit mrf-deployment