BTest updates for ZAM regularization changes

This commit is contained in:
Vern Paxson 2024-08-06 09:38:56 +01:00 committed by Arne Welzel
parent 3b6df1ab7f
commit bf3cf9da48
11 changed files with 57 additions and 4 deletions

View file

@ -1,2 +1,2 @@
### 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))

View file

@ -1,2 +1,2 @@
### 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, ))

View file

@ -1,2 +1,2 @@
### 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, ))

View file

@ -1,2 +1,2 @@
### 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, ))

View 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

View file

@ -0,0 +1 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.

View 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

View file

@ -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: 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 57: cannot compare string vectors with pattern vectors (vector(foo) == vector(<...>/))

View 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);

View file

@ -44,3 +44,16 @@ event zeek_init()
{
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";
}

View 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