github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/ast/testdata/all.txt (about)

     1  # Copyright 2017 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  meta noextract
     5  meta arches["foo", "bar", "386"]
     6  
     7  incdir <some/path>
     8  
     9  strflags0 = "foo", strflags1
    10  strflags1 = "bar"
    11  
    12  expressions {
    13  	f0	int8	(if[value[X] & Y])
    14  	f1	int8	(if[X & Y == Z])
    15  	f2	int8	(if[X & Y & Z == value[X] & A])
    16  	f3	int8	(if[X & (A == B) & Z != C])
    17  }
    18  
    19  intflags = 1, 2, 3, 4
    20  
    21  condFields {
    22  	mask	int8
    23  	flags	flags[intflags, int8]
    24  # Simple expressions work.
    25  	f0	int16	(if[val[mask] == SOME_CONST])
    26  # Conditions and other attributes work together.
    27  	f1	int16	(out, if[val[mask] == SOME_CONST])
    28  # Test some more complex expressions.
    29  	f2	int16	(out, if[val[mask] & SOME_CONST == OTHER_CONST])
    30  	f3	int16	(out, if[val[mask] & SOME_CONST & OTHER_CONST == val[mask] & CONST_X])
    31  	f4	int16	(out, if[val[flags] & SOME_CONST])
    32  }