mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
BTest updates for ZAM regularization changes
This commit is contained in:
parent
3b6df1ab7f
commit
bf3cf9da48
11 changed files with 57 additions and 4 deletions
|
@ -1,2 +1,2 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
error in <...>/from_json.zeek, line 4: from_json() requires a type argument (from_json([], 10, from_json_default_key_mapper))
|
error in <...>/from_json.zeek, line 4: from_json() requires a type argument (from_json([], <internal>::#0, from_json_default_key_mapper))
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
error in <...>/option-runtime-errors.zeek, line 3: Incompatible type for set of ID 'A': got 'string', need 'count' (Option::set(A, hi, ))
|
error in <...>/option-runtime-errors.zeek, line 3: Incompatible type for set of ID 'A': got 'string', need 'count' (Option::set(A, <internal>::#0, ))
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
error in <...>/option-runtime-errors.zeek, line 3: ID 'A' is not an option (Option::set(A, 6, ))
|
error in <...>/option-runtime-errors.zeek, line 3: ID 'A' is not an option (Option::set(A, <internal>::#0, ))
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
error in <...>/option-runtime-errors.zeek, line 9: Could not find ID named 'B' (Option::set(B, 6, ))
|
error in <...>/option-runtime-errors.zeek, line 9: Could not find ID named 'B' (Option::set(B, <internal>::#0, ))
|
||||||
|
|
2
testing/btest/Baseline.zam/opt.validate-ZAM/output
Normal file
2
testing/btest/Baseline.zam/opt.validate-ZAM/output
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
1237 valid, 1860 tested, 426 skipped
|
1
testing/btest/Baseline/bifs.sub_bytes/.stderr
Normal file
1
testing/btest/Baseline/bifs.sub_bytes/.stderr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
9
testing/btest/Baseline/bifs.sub_bytes/out
Normal file
9
testing/btest/Baseline/bifs.sub_bytes/out
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
||||||
|
bcde
|
|
@ -17,3 +17,4 @@ error in count and <...>/vector-type-checking.zeek, line 39: arithmetic mixed wi
|
||||||
error in <...>/vector-type-checking.zeek, line 39 and count: type mismatch (thousand-two and count)
|
error in <...>/vector-type-checking.zeek, line 39 and count: type mismatch (thousand-two and count)
|
||||||
error in <...>/vector-type-checking.zeek, line 39: inconsistent types in vector constructor (vector(thousand-two))
|
error in <...>/vector-type-checking.zeek, line 39: inconsistent types in vector constructor (vector(thousand-two))
|
||||||
error in <...>/vector-type-checking.zeek, line 45: type clash in assignment (lea = vector(thousand-three))
|
error in <...>/vector-type-checking.zeek, line 45: type clash in assignment (lea = vector(thousand-three))
|
||||||
|
error in <...>/vector-type-checking.zeek, line 57: cannot compare string vectors with pattern vectors (vector(foo) == vector(<...>/))
|
||||||
|
|
22
testing/btest/bifs/sub_bytes.zeek
Normal file
22
testing/btest/bifs/sub_bytes.zeek
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# @TEST-DOC: Test the sub_bytes() function.
|
||||||
|
#
|
||||||
|
# @TEST-EXEC: zeek -b %INPUT >out
|
||||||
|
# @TEST-EXEC: btest-diff out
|
||||||
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||||
|
|
||||||
|
# These tests are to ensure that script optimization gets all the permutations
|
||||||
|
# correct, for varying combinations of constant and variable arguments.
|
||||||
|
|
||||||
|
global s = "abcdefghij";
|
||||||
|
global a = 2;
|
||||||
|
global b = 4;
|
||||||
|
|
||||||
|
print sub_bytes(s, a, b);
|
||||||
|
print sub_bytes(s, 2, b);
|
||||||
|
print sub_bytes(s, a, 4);
|
||||||
|
print sub_bytes(s, 2, 4);
|
||||||
|
|
||||||
|
print sub_bytes("abcdefghij", a, b);
|
||||||
|
print sub_bytes("abcdefghij", 2, b);
|
||||||
|
print sub_bytes("abcdefghij", a, 4);
|
||||||
|
print sub_bytes("abcdefghij", 2, 4);
|
|
@ -44,3 +44,16 @@ event zeek_init()
|
||||||
{
|
{
|
||||||
local lea: MyVec = vector("thousand-three"); # type clash
|
local lea: MyVec = vector("thousand-three"); # type clash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check operation that's okay as a scalar but not as a vector
|
||||||
|
event zeek_init()
|
||||||
|
{
|
||||||
|
if ( "foo" == /fo*/ )
|
||||||
|
print "should not complain";
|
||||||
|
}
|
||||||
|
|
||||||
|
event zeek_init()
|
||||||
|
{
|
||||||
|
if ( vector("foo") == vector(/fo*/) )
|
||||||
|
print "should complain";
|
||||||
|
}
|
||||||
|
|
5
testing/btest/opt/validate-ZAM.zeek
Normal file
5
testing/btest/opt/validate-ZAM.zeek
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# @TEST-DOC: ZAM maintenance script for validating synthesized operations.
|
||||||
|
# @TEST-REQUIRES: test "${ZEEK_ZAM}" == "1"
|
||||||
|
#
|
||||||
|
# @TEST-EXEC: zeek -b -O validate-ZAM %INPUT >output
|
||||||
|
# @TEST-EXEC: btest-diff output
|
Loading…
Add table
Add a link
Reference in a new issue