From 5475bc96ca651847ebd4a9e036aecc75913501e8 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Fri, 30 Aug 2024 13:00:26 +0200 Subject: [PATCH] cmd/eofdump: correctly read container type --- cmd/eofdump/eofparser.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/eofdump/eofparser.go b/cmd/eofdump/eofparser.go index cd2acba3d1..af0e389ae8 100644 --- a/cmd/eofdump/eofparser.go +++ b/cmd/eofdump/eofparser.go @@ -65,6 +65,7 @@ var ( vm.ErrInvalidCodeTermination.Error(): 23, vm.ErrUnreachableCode.Error(): 24, } + initcode = "INITCODE" ) type RefTests struct { @@ -72,9 +73,9 @@ type RefTests struct { } type EOFTest struct { - IsInitCode bool `json:"isInitCode"` - Code string `json:"code"` - Results map[string]etResult `json:"results"` + Code string `json:"code"` + Results map[string]etResult `json:"results"` + ContainerKind string `json:"containerKind"` } type etResult struct { @@ -175,7 +176,7 @@ func ExecuteTest(src []byte) (int, int, error) { total++ // TODO(matt): all tests currently run against // shanghai EOF, add support for custom forks. - _, err := parseAndValidate(tt.Code, tt.IsInitCode) + _, err := parseAndValidate(tt.Code, tt.ContainerKind == initcode) if err2 := errors.Unwrap(err); err2 != nil { err = err2 }