aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/init_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-22 14:23:35 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-24 08:43:00 +0100
commit2ab437bb1e9f9f34d2e080ad11c944464a8bd944 (patch)
tree568bcf0cdf14d2df812018ab48277eaff0f21632 /sys/linux/init_test.go
parentef871b2e4ff7b6a8f84a6a0a0fd3e9c3ed8e67b4 (diff)
prog: improve TestDeserializeHelper
1. Allow to not provide Out if it's the same as In. 2. Always check Out.
Diffstat (limited to 'sys/linux/init_test.go')
-rw-r--r--sys/linux/init_test.go24
1 files changed, 8 insertions, 16 deletions
diff --git a/sys/linux/init_test.go b/sys/linux/init_test.go
index fb3068295..ba6dd9462 100644
--- a/sys/linux/init_test.go
+++ b/sys/linux/init_test.go
@@ -21,8 +21,7 @@ func TestNeutralize(t *testing.T) {
Out: `syslog(0x9, 0x0, 0x0)`,
},
{
- In: `syslog(0x1, 0x0, 0x0)`,
- Out: `syslog(0x1, 0x0, 0x0)`,
+ In: `syslog(0x1, 0x0, 0x0)`,
},
{
@@ -34,16 +33,14 @@ func TestNeutralize(t *testing.T) {
Out: `ptrace$peek(0xffffffffffffffff, 0x0, &(0x7f0000000000))`,
},
{
- In: `ptrace(0x1, 0x0)`,
- Out: `ptrace(0x1, 0x0)`,
+ In: `ptrace(0x1, 0x0)`,
},
{
In: `arch_prctl$ARCH_SET_GS(0xf00000001002, 0x0)`,
Out: `arch_prctl$ARCH_SET_GS(0x1001, 0x0)`,
},
{
- In: `arch_prctl$ARCH_SET_GS(0x1003, 0x0)`,
- Out: `arch_prctl$ARCH_SET_GS(0x1003, 0x0)`,
+ In: `arch_prctl$ARCH_SET_GS(0x1003, 0x0)`,
},
{
In: `ioctl(0x0, 0x200000c0045877, 0x0)`,
@@ -58,32 +55,27 @@ func TestNeutralize(t *testing.T) {
Out: `fanotify_mark(0x1, 0x2, 0x4078e029, 0x3, 0x0)`,
},
{
- In: `fanotify_mark(0xffffffffffffffff, 0xffffffffffffffff, 0xfffffffffff8ffff, 0xffffffffffffffff, 0x0)`,
- Out: `fanotify_mark(0xffffffffffffffff, 0xffffffffffffffff, 0xfffffffffff8ffff, 0xffffffffffffffff, 0x0)`,
+ In: `fanotify_mark(0xffffffffffffffff, 0xffffffffffffffff, 0xfffffffffff8ffff, 0xffffffffffffffff, 0x0)`,
},
{
In: `syz_init_net_socket$bt_hci(0x1, 0x0, 0x0)`,
Out: `syz_init_net_socket$bt_hci(0xffffffffffffffff, 0x0, 0x0)`,
},
{
- In: `syz_init_net_socket$bt_hci(0x27, 0x0, 0x0)`,
- Out: `syz_init_net_socket$bt_hci(0x27, 0x0, 0x0)`,
+ In: `syz_init_net_socket$bt_hci(0x27, 0x0, 0x0)`,
},
{
- In: `syz_init_net_socket$bt_hci(0x1a, 0x0, 0x0)`,
- Out: `syz_init_net_socket$bt_hci(0x1a, 0x0, 0x0)`,
+ In: `syz_init_net_socket$bt_hci(0x1a, 0x0, 0x0)`,
},
{
- In: `syz_init_net_socket$bt_hci(0x1f, 0x0, 0x0)`,
- Out: `syz_init_net_socket$bt_hci(0x1f, 0x0, 0x0)`,
+ In: `syz_init_net_socket$bt_hci(0x1f, 0x0, 0x0)`,
},
{
In: `mmap(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)`,
Out: `mmap(0x0, 0x0, 0x0, 0x10, 0x0, 0x0)`,
},
{
- In: `mremap(0x0, 0x0, 0x0, 0xcc, 0x0)`,
- Out: `mremap(0x0, 0x0, 0x0, 0xcc, 0x0)`,
+ In: `mremap(0x0, 0x0, 0x0, 0xcc, 0x0)`,
},
{
In: `mremap(0x0, 0x0, 0x0, 0xcd, 0x0)`,