summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spfatal32/testcase.h
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/sptests/spfatal32/testcase.h')
-rw-r--r--testsuites/sptests/spfatal32/testcase.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuites/sptests/spfatal32/testcase.h b/testsuites/sptests/spfatal32/testcase.h
new file mode 100644
index 0000000000..8e77062f94
--- /dev/null
+++ b/testsuites/sptests/spfatal32/testcase.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+
+#define FATAL_ERROR_TEST_NAME "32"
+#define FATAL_ERROR_DESCRIPTION "invalid free of heap memory"
+#define FATAL_ERROR_EXPECTED_SOURCE RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
+#define FATAL_ERROR_EXPECTED_ERROR 1
+
+void force_error()
+{
+ uintptr_t invalid = 1;
+ free((void *) invalid);
+}