Skip to content

Commit

Permalink
[review] xtest: regression: add case 4017
Browse files Browse the repository at this point in the history
Removing middle_increment.

Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro committed Jun 13, 2024
1 parent ccd1288 commit 6dcc895
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions host/xtest/regression_4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -6367,8 +6367,7 @@ static bool process_bytes_final_4017(ADBG_Case_t *c, struct buf_state *bs)
}

static bool process_text_4017(ADBG_Case_t *c, struct buf_state *bs,
size_t initial_count, size_t middle_count,
size_t middle_increment)
size_t initial_count, size_t middle_count)
{
TEEC_Result res = TEEC_SUCCESS;
size_t n = 0;
Expand All @@ -6391,8 +6390,7 @@ static bool process_text_4017(ADBG_Case_t *c, struct buf_state *bs,
!ADBG_EXPECT_TRUE(c, process_bytes_4017(c, bs, initial_count)))
return false;

for (n = 0; n < middle_count && n + initial_count < bs->text_size;
n += middle_increment)
for (n = 0; n < middle_count && n + initial_count < bs->text_size; n++)
if (!ADBG_EXPECT_TRUE(c, process_bytes_4017(c, bs, 1)))
return false;

Expand Down Expand Up @@ -6465,7 +6463,6 @@ static bool do_algo_4017(ADBG_Case_t *c, TEEC_Session *s, uint32_t algo,
{
TEEC_Result res = TEEC_SUCCESS;
struct buf_state bs = { .s = s, };
size_t middle_increment = 1;
size_t middle_count = 0;
uint8_t iv[16] = { };
uint8_t key[16] = { };
Expand Down Expand Up @@ -6568,8 +6565,7 @@ static bool do_algo_4017(ADBG_Case_t *c, TEEC_Session *s, uint32_t algo,
if (level < 12 && (n % TEE_AES_BLOCK_SIZE) > 1 &&
(n % TEE_AES_BLOCK_SIZE) < (TEE_AES_BLOCK_SIZE - 1))
continue;
ret = process_text_4017(c, &bs, n, middle_count,
middle_increment);
ret = process_text_4017(c, &bs, n, middle_count);
if (!ADBG_EXPECT_TRUE(c, ret)) {
Do_ADBG_Log("Failed processing with initial_count %zu (previous %zu)",
n, prev_n);
Expand All @@ -6590,8 +6586,7 @@ static bool do_algo_4017(ADBG_Case_t *c, TEEC_Session *s, uint32_t algo,
if (level < 12 && (n % TEE_AES_BLOCK_SIZE) > 1 &&
(n % TEE_AES_BLOCK_SIZE) < (TEE_AES_BLOCK_SIZE - 1))
continue;
ret = process_text_4017(c, &bs, n, middle_count,
middle_increment);
ret = process_text_4017(c, &bs, n, middle_count);
if (!ADBG_EXPECT_TRUE(c, ret)) {
Do_ADBG_Log("Failed processing with initial_count %zu (previous %zu)",
n, prev_n);
Expand Down

0 comments on commit 6dcc895

Please sign in to comment.