diff --git a/test/system/zephyr/CMakeLists.txt b/test/system/zephyr/CMakeLists.txt index 9a94736..14b792c 100644 --- a/test/system/zephyr/CMakeLists.txt +++ b/test/system/zephyr/CMakeLists.txt @@ -1,6 +1,5 @@ collect (PROJECT_LIB_TESTS main.c) collect (PROJECT_LIB_TESTS alloc.c) -collect (PROJECT_LIB_TESTS irq.c) collect (PROJECT_LIB_TESTS mutex.c) collect (PROJECT_LIB_TESTS atomic.c) diff --git a/test/system/zephyr/irq.c b/test/system/zephyr/irq.c deleted file mode 100644 index a1d9f1f..0000000 --- a/test/system/zephyr/irq.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2016, Xilinx Inc. and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -/* We need to find the internal MAX_IRQS limit */ -/* Could be retrieved from platform specific files in the future */ -#define METAL_INTERNAL - -#include -#include -#include -#include -#include -#include "metal-test-internal.h" - -static int irq_handler(int irq, void *priv) -{ - (void)irq; - (void)priv; - - return 0; -} - -static int irq_handler2(int irq, void *priv) -{ - (void)irq; - (void)priv; - - return 0; -} - -static int irq(void) -{ - int rc = 0; - char *err_msg=""; - enum metal_log_level mll= metal_get_log_level(); - - /* Do not show LOG_ERROR or LOG_DEBUG for expected fail case */ - metal_set_log_level(METAL_LOG_CRITICAL); - - rc = metal_irq_register(1, irq_handler, 0, (void *)1); - if (rc) { - err_msg = "register irq 0 fail drv_id 1\n"; - goto out; - } - rc = metal_irq_register(2, irq_handler, 0, (void *)1); - if (rc) { - err_msg = "register irq 1 fail drv_id 1\n"; - goto out; - } - rc = metal_irq_register(2, irq_handler2, 0, (void *)2); - if (rc == 0) { - err_msg = "expect 2nd register irq 1 fail, but succeeded\n"; - goto out; - } - - metal_irq_unregister(1); - rc = metal_irq_register(1, irq_handler, 0, (void *)1); - if (rc) { - err_msg = "register irq 0 after unregistering failed\n"; - goto out; - } - metal_irq_unregister(1); - metal_irq_unregister(2); - - return 0; -out: - metal_set_log_level(mll); - if ((err_msg[0] != '\0') && (!rc)) - rc = -EINVAL; - if (rc) metal_log(METAL_LOG_ERROR, "%s", err_msg); - return rc; -} - -METAL_ADD_TEST(irq); diff --git a/test/system/zephyr/main.c b/test/system/zephyr/main.c index a224b5b..c2bfab5 100644 --- a/test/system/zephyr/main.c +++ b/test/system/zephyr/main.c @@ -67,7 +67,6 @@ void metal_test_add_functions() { metal_test_add_alloc(); metal_test_add_atomic(); - metal_test_add_irq(); metal_test_add_mutex(); }