From 2c2d6bd29cf75a4c045f1a07b7798b136c5c04e9 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Thu, 5 Mar 2026 11:24:05 -0500 Subject: [PATCH] tests: Extend object_size test to marshal an RSA key OBJECT up to SFL 8 Extend the test with 2 more expected sizes for marhshalled RSA key OBJECT for up to the current StateFormatLevel 8. Signed-off-by: Stefan Berger --- tests/object_size.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/object_size.c b/tests/object_size.c index 6cc80077..e841313d 100644 --- a/tests/object_size.c +++ b/tests/object_size.c @@ -78,8 +78,9 @@ int main(void) .seedCompatLevel = 1, }; #pragma GCC diagnostics pop - static const size_t exp_sizes[7] = { - 0, 3284, 3284, 3284, 3284, 3284, 3288, + static const size_t exp_sizes[9] = { + /* SFL: 0 .. 5 */ 0 , 3284, 3284, 3284, 3284, 3284, + /* SFL: 6 .. 8 */ 3288, 3288, 3288, }; BYTE buffer[2 * MAX_MARSHALLED_OBJECT_SIZE]; UINT32 stateFormatLevel; @@ -87,7 +88,9 @@ int main(void) INT32 size; BYTE *buf; - for (stateFormatLevel = 1; stateFormatLevel <= 6; stateFormatLevel++) { + for (stateFormatLevel = 1; + stateFormatLevel < ARRAY_SIZE(exp_sizes); + stateFormatLevel++) { /* this buffer must only be filled to <= MAX_MARSHALLED_OBJECT_SIZE bytes */ buf = buffer; size = sizeof(buffer);