From afb08bdd3c3c1ad00599e438fcc86318451d64cb Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 7 Oct 2016 13:43:43 +0200 Subject: prog: fix serialized program in a test Also test at least deserialization of these programs in short mode. --- prog/mutation_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'prog') diff --git a/prog/mutation_test.go b/prog/mutation_test.go index 92b87c6bb..5d189e938 100644 --- a/prog/mutation_test.go +++ b/prog/mutation_test.go @@ -47,9 +47,6 @@ next: } func TestMutateTable(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } tests := [][2]string{ // Insert calls. { @@ -120,11 +117,11 @@ func TestMutateTable(t *testing.T) { // Extend an array. { "r0 = open(&(0x7f0000001000)=\"2e2f66696c653000\", 0x22c0, 0x1)\n" + - "readv(r0, &(0x7f0000000000)={{&(0x7f0000001000)=nil, 0x1}, {&(0x7f0000002000)=nil, 0x2}}, 0x2)\n", + "readv(r0, &(0x7f0000000000)=[{&(0x7f0000001000)=nil, 0x1}, {&(0x7f0000002000)=nil, 0x2}], 0x2)\n", "mmap(&(0x7f0000000000)=nil, (0x1000), 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "r0 = open(&(0x7f0000001000)=\"2e2f66696c653000\", 0x22c0, 0x1)\n" + - "readv(r0, &(0x7f0000000000)={{&(0x7f0000001000)=nil, 0x1}, {&(0x7f0000002000)=nil, 0x2}, {&(0x7f0000000000)=nil, 0x3}}, 0x3)\n", + "readv(r0, &(0x7f0000000000)=[{&(0x7f0000001000)=nil, 0x1}, {&(0x7f0000002000)=nil, 0x2}, {&(0x7f0000000000)=nil, 0x3}], 0x3)\n", }, } rs, _ := initTest(t) @@ -134,6 +131,9 @@ nextTest: if err != nil { t.Fatalf("failed to deserialize original program: %v", err) } + if testing.Short() { + continue + } for i := 0; i < 1e6; i++ { p1 := p.Clone() p1.Mutate(rs, 30, nil) -- cgit mrf-deployment