Skip to content

Commit c5b032c

Browse files
daniel-nolandclaude
andcommitted
test(config): skip the rate-limit parse-error tests under miri
serde_json finds a parse error's line and column with memrchr, which rounds down to a word boundary and reads aligned usizes. The input is a String, so miri's -Zmiri-symbolic-alignment-check only knows alignment 1 and reports those reads as undefined behavior, failing check/miri/powerpc64 in the merge queue for the three tests that feed the parser invalid policies. Real reads are aligned. Ignore the three tests under miri, as the repo does for other tests miri cannot run, rather than relax the alignment check for every crate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
1 parent 44894f8 commit c5b032c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • config/src/converters/k8s/config/ratelimit

‎config/src/converters/k8s/config/ratelimit/tests.rs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ fn acl_match_supports_protocol_ports_and_subnet_references() {
234234
}
235235

236236
#[test]
237+
#[cfg_attr(
238+
miri,
239+
ignore = "serde_json locates parse errors with memchr, whose aligned word reads miri's symbolic alignment check refuses"
240+
)]
237241
fn acl_match_supports_tcp_filters() {
238242
use crate::external::overlay::acl::{AclProtoMatch, AclTcpFlagsMatch};
239243
use net::tcp::TcpFlags;
@@ -269,6 +273,10 @@ fn acl_match_supports_tcp_filters() {
269273
}
270274

271275
#[test]
276+
#[cfg_attr(
277+
miri,
278+
ignore = "serde_json locates parse errors with memchr, whose aligned word reads miri's symbolic alignment check refuses"
279+
)]
272280
fn invalid_meter_settings_are_refused() {
273281
for (meter, expected) in [
274282
(json!({}), "needs bits or pkts"),
@@ -321,6 +329,10 @@ fn invalid_meter_settings_are_refused() {
321329
}
322330

323331
#[test]
332+
#[cfg_attr(
333+
miri,
334+
ignore = "serde_json locates parse errors with memchr, whose aligned word reads miri's symbolic alignment check refuses"
335+
)]
324336
fn unknown_versions_rules_and_fields_are_refused() {
325337
let base = policy(json!({"pkts": {"rate": "1k"}}));
326338
for (pointer, value) in [

0 commit comments

Comments
 (0)