diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-12-21 14:51:54 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-12-21 14:53:37 +0100 |
| commit | bfdfc2603c187447d32ecbc8b5a378df53af5734 (patch) | |
| tree | cff7440626d57bf7453634c4de4f8e89fc8fc4a6 /prog/encoding_test.go | |
| parent | bc5869180f69e2ad6c6b823e129e08a8e523d800 (diff) | |
prog: don't fail decoding on non-default out args
We get them in cross-compilation test where an out const
arg has different values in different archs.
No reason to fail deserialization in that case, replace with default
arg instead.
Diffstat (limited to 'prog/encoding_test.go')
| -rw-r--r-- | prog/encoding_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/prog/encoding_test.go b/prog/encoding_test.go index f828123db..ba7fe3329 100644 --- a/prog/encoding_test.go +++ b/prog/encoding_test.go @@ -267,6 +267,11 @@ func TestDeserialize(t *testing.T) { input: `test$blob0(&AUTO="3031000a0d7022273a01")`, output: `test$blob0(&(0x7f0000000040)="3031000a0d7022273a01")`, }, + { + input: `test$out_const(&(0x7f0000000000)=0x2)`, + output: `test$out_const(&(0x7f0000000000))`, + strictErr: regexp.MustCompile(`out arg const\[1, const\] has non-default value: 2`), + }, } buf := make([]byte, ExecBufferSize) for _, test := range tests { |
