[zeek/spicy] 775a00: Loosen `FileCheck` tests a bit

0 views
Skip to first unread message

Evan Typanski

unread,
Feb 27, 2026, 2:00:49 PM (14 days ago) Feb 27
to spicy-...@zeek.org
Branch: refs/heads/topic/etyp/filecheck-tests-hardening
Home: https://github.com/zeek/spicy
Commit: 775a00de4f9db4107991e020e11f05910f7e82c3
https://github.com/zeek/spicy/commit/775a00de4f9db4107991e020e11f05910f7e82c3
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2026-02-27 (Fri, 27 Feb 2026)

Changed paths:
M tests/hilti/codegen/struct-parameter-passing.hlt
M tests/hilti/optimization/flatten-block.hlt
M tests/hilti/output/optimization/const.hlt
M tests/hilti/output/optimization/remove-params.hlt
M tests/spicy/optimization/error-push-pop.spicy
M tests/spicy/optimization/remove-captures-param.spicy
M tests/spicy/output/vector/reserve-known-elements.spicy

Log Message:
-----------
Loosen `FileCheck` tests a bit

I had two primary rules:

1) Only test what is necessary. If we're looking for a variable
declaration, but it wouldn't really matter what's in it, just {{.*}}
it. If all that matters is that `self` is used between two statements,
only test for that.

2) Anything that's not *exactly* as it appears in source should have
regular expressions to catch the exact minimal case. For example, if
a hook is named `_t_on_x`, the only part we need is that it is `on_x`
so use `{{.*}}on_x{{.*}}`. This makes it more resilient to unrelated
compiler name changes.

There are other simple rules, like not checking for semicolons. The goal
should just be make the simplest looking test that catches the case you
want.


Commit: 233dc609e06279810974ab2460729a4297d520a8
https://github.com/zeek/spicy/commit/233dc609e06279810974ab2460729a4297d520a8
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2026-02-27 (Fri, 27 Feb 2026)

Changed paths:
M tests/hilti/output/optimization/cfg-constprop.hlt
M tests/hilti/output/optimization/const.hlt
M tests/hilti/output/optimization/no-propagate-returns.hlt
M tests/hilti/output/optimization/propagate-function-returns.hlt
M tests/hilti/output/optimization/remove-method-params.hlt
M tests/hilti/output/optimization/remove-params.hlt
M tests/spicy/optimization/remove-captures-param.spicy
M tests/spicy/output/vector/reserve-known-elements.spicy

Log Message:
-----------
Use an intermediate file rather than pipe in tests

This means you can look at the output more easily for FileCheck tests.


Commit: 9b796f207c2fe324479176a0f2915a5ef086fe24
https://github.com/zeek/spicy/commit/9b796f207c2fe324479176a0f2915a5ef086fe24
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2026-02-27 (Fri, 27 Feb 2026)

Changed paths:
A tests/Scripts/use-filecheck
M tests/btest.cfg
M tests/hilti/codegen/struct-parameter-passing.hlt
M tests/hilti/optimization/flatten-block.hlt
M tests/hilti/optimization/peephole-error-push-pop.hlt
M tests/hilti/output/optimization/cfg-constprop.hlt
M tests/hilti/output/optimization/const.hlt
M tests/hilti/output/optimization/no-propagate-returns.hlt
M tests/hilti/output/optimization/propagate-function-returns.hlt
M tests/hilti/output/optimization/remove-method-params.hlt
M tests/hilti/output/optimization/remove-params.hlt
M tests/spicy/optimization/error-push-pop.spicy
M tests/spicy/optimization/remove-captures-param.spicy
M tests/spicy/output/vector/reserve-known-elements.spicy

Log Message:
-----------
Add env var to skip running `FileCheck` tests

Since `FileCheck` may give verbose output, and is not updated with
baselines (ie with -U), it may be useful during development to skip the
`FileCheck` tests, then later run them when it is closer to completion.


Compare: https://github.com/zeek/spicy/compare/775a00de4f9d%5E...9b796f207c2f

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages