summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-12 18:29:48 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-18 07:20:52 +0100
commitab42b3e1002306ed343adc47c460788ed31df66f (patch)
tree9438ff83b8ca107047563a7b63d9edb3f5c94b0d /testsuites/libtests
parentrtems: Add rtems_put_char() (diff)
downloadrtems-ab42b3e1002306ed343adc47c460788ed31df66f.tar.bz2
record: Add rtems_record_dump()
Add rtems_record_dump_base64() and rtems_record_dump_base64_zlib(). Add CONFIGURE_RECORD_FATAL_DUMP_BASE64 and CONFIGURE_RECORD_FATAL_DUMP_BASE64_ZLIB configuration options. Update #3904.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r--testsuites/libtests/Makefile.am1
-rw-r--r--testsuites/libtests/record02/init.c38
2 files changed, 27 insertions, 12 deletions
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 7917c98656..e493e3d8a8 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1124,6 +1124,7 @@ lib_docs += record02/record02.doc
record02_SOURCES = record02/init.c
record02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_record02) \
$(support_includes)
+record02_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a $(RTEMS_ROOT)cpukit/libz.a $(LDADD)
endif
if TEST_rtmonuse
diff --git a/testsuites/libtests/record02/init.c b/testsuites/libtests/record02/init.c
index 22671a7c0a..7568f06e18 100644
--- a/testsuites/libtests/record02/init.c
+++ b/testsuites/libtests/record02/init.c
@@ -1,7 +1,7 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (C) 2018, 2019 embedded brains GmbH
+ * Copyright (C) 2018, 2020 embedded brains GmbH (http://www.embedded-brains.de)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -94,18 +94,11 @@ static void drain_visitor(
rtems_test_assert(cs == RTEMS_RECORD_CLIENT_SUCCESS);
}
-static void Init(rtems_task_argument arg)
+static void generate_events(void)
{
- test_context *ctx;
- Record_Stream_header header;
- size_t size;
- rtems_record_client_status cs;
int i;
uint32_t level;
- TEST_BEGIN();
- ctx = &test_instance;
-
for (i = 0; i < 10; ++i) {
rtems_task_wake_after(1);
}
@@ -160,6 +153,19 @@ static void Init(rtems_task_argument arg)
rtems_record_exit_10(RTEMS_RECORD_USER_4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
level = rtems_record_interrupt_disable();
rtems_record_interrupt_enable(level);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ test_context *ctx;
+ Record_Stream_header header;
+ size_t size;
+ rtems_record_client_status cs;
+
+ TEST_BEGIN();
+ ctx = &test_instance;
+
+ generate_events();
rtems_record_client_init(&ctx->client, client_handler, NULL);
size = _Record_Stream_header_initialize(&header);
@@ -168,6 +174,12 @@ static void Init(rtems_task_argument arg)
rtems_record_drain(drain_visitor, ctx);
rtems_record_client_destroy(&ctx->client);
+ generate_events();
+
+ _Record_Fatal_dump_base64(RTEMS_FATAL_SOURCE_APPLICATION, false, 123);
+
+ generate_events();
+
TEST_END();
rtems_test_exit(0);
}
@@ -182,10 +194,12 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_RECORD_PER_PROCESSOR_ITEMS 256
+#define CONFIGURE_RECORD_PER_PROCESSOR_ITEMS 512
#define CONFIGURE_RECORD_EXTENSIONS_ENABLED
+#define CONFIGURE_RECORD_FATAL_DUMP_BASE64_ZLIB
+
#define CONFIGURE_INIT
#include <rtems/confdefs.h>