From 4dfba277487a7023ab9f5783302da4a9b5e9bef8 Mon Sep 17 00:00:00 2001 From: "Jiao, Joey" Date: Wed, 6 Nov 2024 13:41:21 +0800 Subject: all: support || operator in syzlang if condition ex. f3 field has logic or operator in if condition: conditional_struct { mask int32 f1 field1 (if[value[mask] & FIELD_FLAG1]) f2 int64 (if[value[mask] & FIELD_FLAG2]) f3 int64 (if[value[mask] == FIELD_FLAG1 || value[mask] == FIELD_FLAG2]) } [packed] --- pkg/ast/testdata/errors.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/ast/testdata/errors.txt') diff --git a/pkg/ast/testdata/errors.txt b/pkg/ast/testdata/errors.txt index b3d9e7f52..a8a4aa197 100644 --- a/pkg/ast/testdata/errors.txt +++ b/pkg/ast/testdata/errors.txt @@ -75,6 +75,14 @@ sCondFieldsError2 { f5 int16 (out, if[val[mask] & == val[mask]]) ### unexpected ==, expecting int, identifier, string } ### unexpected '}', expecting comment, define, include, resource, identifier +sCondFieldsError3 { + f6 int16 (out, if[val[mask] == SOME_CONST] || [val[mask]]) ### unexpected '[', expecting int, identifier, string +} ### unexpected '}', expecting comment, define, include, resource, identifier + +sCondFieldsError4 { + f7 int16 (out, if[val[mask] == SOME_CONST || val[mask] ==]) ### unexpected ']', expecting int, identifier, string +} ### unexpected '}', expecting comment, define, include, resource, identifier + type mybool8 int8 type net_port proc[1, 2, int16be] type mybool16 ### unexpected '\n', expecting '[', identifier -- cgit mrf-deployment