zephyr/tests/subsys/llext/simple/src/syscalls_ext.c
Luca Burelli 42a0d18ecf llext: tests: add zassert macros everywhere
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>
2024-06-13 16:43:26 -04:00

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);