github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/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 automatic
     5  meta noextract
     6  meta arches["foo", "bar", "386"]
     7  
     8  incdir <some/path>
     9  
    10  strflags0 = "foo", strflags1
    11  strflags1 = "bar"
    12  
    13  expressions {
    14  	f0	int8	(if[value[X] & Y])
    15  	f1	int8	(if[X & Y == Z])
    16  	f2	int8	(if[X & Y & Z == value[X] & A])
    17  	f3	int8	(if[X & (A == B) & Z != C])
    18  	f5	int8	(if[value[X] == A || value[X] == B])
    19  }
    20  
    21  intflags = 1, 2, 3, 4
    22  
    23  condFields {
    24  	mask	int8
    25  	flags	flags[intflags, int8]
    26  # Simple expressions work.
    27  	f0	int16	(if[val[mask] == SOME_CONST])
    28  # Conditions and other attributes work together.
    29  	f1	int16	(out, if[val[mask] == SOME_CONST])
    30  # Test some more complex expressions.
    31  	f2	int16	(out, if[val[mask] & SOME_CONST == OTHER_CONST])
    32  	f3	int16	(out, if[val[mask] & SOME_CONST & OTHER_CONST == val[mask] & CONST_X])
    33  	f4	int16	(out, if[val[flags] & SOME_CONST])
    34  	f5	int16	(out, if[val[flags] == SOME_CONST || val[flags] == OTHER_CONST])
    35  	f6	int16	(out, if[val[flags] == SOME_CONST || val[flags] & OTHER_CONST])
    36  }