Skip to content

Commit

Permalink
tests: c_lib: test for declaration of signal()
Browse files Browse the repository at this point in the history
We don't actually implement signal() in Zephyr, but some users
require the declaration.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
  • Loading branch information
cfriedt committed Aug 9, 2023
1 parent a27c16f commit b0ec7c0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/lib/c_lib/src/test_signal_decl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2023 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <signal.h>

#include <zephyr/ztest.h>

ZTEST(test_c_lib, test_signal_decl)
{
/*
* Even though the use of the ANSI-C function "signal()" is not yet
* supported in Zephyr, some users depend on it being declared (i.e.
* without CONFIG_POSIX_API=y and with with CONFIG_POSIX_SIGNAL=n).
*/

zassert_not_null(signal);
}

0 comments on commit b0ec7c0

Please sign in to comment.