From 14dae29c2abebd8886909c7a09c5795ffdd11515 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 26 Feb 2018 15:00:46 +0100 Subject: executor: use proper default values for resources We currently use -1 as default value for resources when the actual value is not available. -1 is good for fd's, but is not the right default value for pointers/keys/etc. Pass from prog and use in executor proper default value for resources. --- prog/minimization_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'prog/minimization_test.go') diff --git a/prog/minimization_test.go b/prog/minimization_test.go index 5979ce7a2..70137fa65 100644 --- a/prog/minimization_test.go +++ b/prog/minimization_test.go @@ -20,7 +20,7 @@ func TestMinimize(t *testing.T) { { "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "sched_yield()\n" + - "pipe2(&(0x7f0000000000)={0x0, 0x0}, 0x0)\n", + "pipe2(&(0x7f0000000000), 0x0)\n", 2, func(p *Prog, callIndex int) bool { if len(p.Calls) == 0 { @@ -47,7 +47,7 @@ func TestMinimize(t *testing.T) { return len(p.Calls) == 2 && p.Calls[0].Meta.Name == "mmap" && p.Calls[1].Meta.Name == "pipe2" }, "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" + - "pipe2(&(0x7f0000000000)={0xffffffffffffffff, 0xffffffffffffffff}, 0x0)\n", + "pipe2(&(0x7f0000000000), 0x0)\n", 1, }, // Remove two dependent calls. -- cgit mrf-deployment