From 3717901c109694be56bb24593db945e4367ecf14 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 17 May 2018 19:07:46 +0200 Subject: pkg/csource: serialize options into json Current format is painful to parse after changes. Switch to json. --- pkg/csource/options_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pkg/csource/options_test.go') diff --git a/pkg/csource/options_test.go b/pkg/csource/options_test.go index 4f5b0f91e..9aee780a3 100644 --- a/pkg/csource/options_test.go +++ b/pkg/csource/options_test.go @@ -27,6 +27,23 @@ func TestParseOptionsCanned(t *testing.T) { // so we need to be able to parse old formats. // nolint: lll canned := map[string]Options{ + `{"threaded":true,"collide":true,"repeat":true,"procs":10,"sandbox":"namespace","fault":true,"fault_call":1,"fault_nth":2,"tun":true,"tmpdir":true,"cgroups":true,"segv":true,"waitrepeat":true,"debug":true,"repro":true}`: Options{ + Threaded: true, + Collide: true, + Repeat: true, + Procs: 10, + Sandbox: "namespace", + Fault: true, + FaultCall: 1, + FaultNth: 2, + EnableTun: true, + UseTmpDir: true, + EnableCgroups: true, + HandleSegv: true, + WaitRepeat: true, + Debug: true, + Repro: true, + }, "{Threaded:true Collide:true Repeat:true Procs:1 Sandbox:none Fault:false FaultCall:-1 FaultNth:0 EnableTun:true UseTmpDir:true HandleSegv:true WaitRepeat:true Debug:false Repro:false}": Options{ Threaded: true, Collide: true, -- cgit mrf-deployment