maintenance updates for -O C++

This commit is contained in:
Vern Paxson 2022-12-04 17:59:14 -08:00
parent ab7cccf9b6
commit 52775bea89
10 changed files with 76 additions and 3 deletions

View file

@ -1136,7 +1136,11 @@ string CPPCompile::GenDirectAssign(const ExprPtr& lhs, const string& rhs_native,
} }
} }
else else
{
gen = name + " = " + rhs_native; gen = name + " = " + rhs_native;
if ( ! top_level )
gen = NativeToGT("(" + gen + ")", n->GetType(), gt);
}
return gen; return gen;
} }

View file

@ -15,7 +15,7 @@ The maintenance workflow:
to check in updates to the list of how the compiler currently fares to check in updates to the list of how the compiler currently fares
on various btests (see end of this doc): on various btests (see end of this doc):
Mon Nov 7 14:30:51 PST 2022 Sat Dec 3 13:20:43 PST 2022
2. Run "find-test-files.sh" to generate a list (to stdout) of all of the 2. Run "find-test-files.sh" to generate a list (to stdout) of all of the
possible Zeek source files found in the test suite. possible Zeek source files found in the test suite.
@ -69,12 +69,18 @@ These BTests won't successfully run due to the indicated issue:
pass to fail when it tries to start up a new httpd pass to fail when it tries to start up a new httpd
skipped - test can be skipped due to environmental reasons (e.g., skipped - test can be skipped due to environmental reasons (e.g.,
whether we have a certain Kerberos setup) whether we have a certain Kerberos setup)
start-next - test uses @TEST-START-NEXT. As long as the diagnostic
output doesn't have errors for language.blank-local-4, it's ok
race? - appears to have a race condition, can fail even when
running with interpreter, and can pass with -O C++
Database Of Known Issues (keep sorted) Database Of Known Issues
../testing/btest/bifs/table_values.zeek bad-constructor ../testing/btest/language/blank-local.zeek start-next
../testing/btest/language/when-aggregates.zeek bad-when
../testing/btest/scripts/base/protocols/krb/smb2_krb.test skipped ../testing/btest/scripts/base/protocols/krb/smb2_krb.test skipped
../testing/btest/scripts/base/protocols/krb/smb2_krb_nokeytab.test skipped ../testing/btest/scripts/base/protocols/krb/smb2_krb_nokeytab.test skipped
../testing/btest/scripts/base/utils/active-http.test test-glitch ../testing/btest/scripts/base/utils/active-http.test test-glitch
../testing/btest/scripts/policy/frameworks/dpd/packet-segment-logging.zeek cond ../testing/btest/scripts/policy/frameworks/dpd/packet-segment-logging.zeek cond
../testing/btest/scripts/policy/misc/dump-events.zeek skipped ../testing/btest/scripts/policy/misc/dump-events.zeek skipped
../testing/btest/supervisor/revive-leaf.zeek race?

View file

@ -0,0 +1,15 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
reply, CHhAvVGS1DHFjwGM9, OK, example.com POP3-Server
request, CHhAvVGS1DHFjwGM9, USER, zeek@zeek.org
reply, CHhAvVGS1DHFjwGM9, OK, Please enter your password
request, CHhAvVGS1DHFjwGM9, PASS, zeek
reply, CHhAvVGS1DHFjwGM9, OK, mailbox locked and ready
request, CHhAvVGS1DHFjwGM9, STAT,
1, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (+)
2, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (???)
3, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (..)
4, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (???)
5, violation, AllAnalyzers::ANALYZER_ANALYZER_POP3, CHhAvVGS1DHFjwGM9, 4, unknown server command (..x)
reply, CHhAvVGS1DHFjwGM9, OK, 1 236
request, CHhAvVGS1DHFjwGM9, QUIT,
reply, CHhAvVGS1DHFjwGM9, OK, Bye

View file

@ -0,0 +1,13 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path weird
#open XXXX-XX-XX-XX-XX-XX
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p name addl notice peer source
#types time string addr port addr port string string bool string string
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 pop3_server_command_unknown - F zeek POP3
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 line_terminated_with_single_CR - F zeek CONTENTLINE
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 58246 127.0.0.1 110 too_many_analyzer_violations - F zeek POP3
#close XXXX-XX-XX-XX-XX-XX

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,8 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
local c1 = 0; --c1; c1 == 18446744073709551615; T
local c2 = 0; c2 -= 1; c2 == 18446744073709551615; T
local c3 = 0; c3 = c3 - 1; c3 == 18446744073709551615; T
1 - 2, 18446744073709551615
local c4 = count_max; ++c4; c4 == 0; T
local c5 = count_max; c5 += 1; c5 == 0; T
local c6 = count_max; c6 = c6 + 1; c6 == 0; T

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,20 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
IPv4 Address 1.2.3.4: 32
IPv6 Address ::1: 128
Boolean T: 1
Count 10: 10
Expr: 18446744073709551612
Signed Expr: 4
Double -1.23: 1.230000
Enum ENUM3: 2
File 21.000000
Function add_interface: 2
Integer -10: 10
Interval -5.0 secs: 5.000000
Port 80/tcp: 65616
Record [i=10, j=<uninitialized>, k=<uninitialized>]: 3
Set: 3
String 'Hello': 5
Subnet 192.168.0.0/24: 256.000000
Table 2
Vector [Hello, , , , World]: 5

View file

@ -2,3 +2,7 @@
[5.5, 5.2, -3.9, 20.0] [5.5, 5.2, -3.9, 20.0]
[11, 5, , 107, , , 1046] [11, 5, , 107, , , 1046]
[-2, -4, , -7, , -18, -999] [-2, -4, , -7, , -18, -999]
[connT
compiled-C++ , connF
compiled-C++ , connMaybe
compiled-C++ ]

View file

@ -1,4 +1,5 @@
# @TEST-DOC: Test zeekygen declaring script functions error/empty cases. # @TEST-DOC: Test zeekygen declaring script functions error/empty cases.
# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1"
# #
# @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b `basename %INPUT` >out # @TEST-EXEC: unset ZEEK_DISABLE_ZEEKYGEN; zeek -b `basename %INPUT` >out
# @TEST-EXEC: btest-diff out # @TEST-EXEC: btest-diff out