Most of the current llext tests did not actually check the results of the tests, so the CI reported a pass even if something was wrong when looking at the logs. This patch adds the appropriate zassert_* macros to all the tests, to ensure that they actually perform correctly. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
27 lines
512 B
C
27 lines
512 B
C
/*
|
|
* Copyright (c) 2024 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/*
|
|
* This code demonstrates syscall support.
|
|
*/
|
|
|
|
#include <zephyr/llext/symbol.h>
|
|
#include <zephyr/sys/printk.h>
|
|
#include <zephyr/ztest_assert.h>
|
|
|
|
#include "syscalls_ext.h"
|
|
|
|
void test_entry(void)
|
|
{
|
|
int input = 41;
|
|
int output = ext_syscall_ok(input);
|
|
|
|
printk("Input: %d Expected output: %d Actual output: %d\n",
|
|
input, input + 1, output);
|
|
zassert_equal(output, input + 1);
|
|
}
|
|
LL_EXTENSION_SYMBOL(test_entry);
|