From c637a65c0d239bb71e3d4db58d6221c6a09583c1 Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 29 Jul 2022 13:02:42 +0000 Subject: ripple/minitrace: verify that libc flag naming matches Change-Id: Ic6392ac15d249f22aec9d866de088d5901d09948 --- ripple/minitrace/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ripple') diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 01564d4..1c82e2d 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -155,6 +155,10 @@ macro_rules! syscall_bitflags { #[cfg(test)] fn verify() { $( + let libc_flag = stringify!($LIBC_FLAG); + let flag = stringify!($FLAG); + assert!(libc_flag.ends_with(flag), "{libc_flag} doesn't end with {flag}"); + let left = Self::$FLAG.bits(); let right = libc::$LIBC_FLAG; assert!( -- cgit 1.4.1