From fd1fa8424a9e5a14dcab11a2594a5e7691d9b9ae Mon Sep 17 00:00:00 2001 From: Dmitriy Musatkin Date: Fri, 5 Jan 2024 13:05:18 -0800 Subject: [PATCH] add debug info --- tests/system_info_tests.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/system_info_tests.c b/tests/system_info_tests.c index 7a43247973..cfb2522a98 100644 --- a/tests/system_info_tests.c +++ b/tests/system_info_tests.c @@ -7,6 +7,7 @@ #include "logging/test_logger.h" #include +#include static int s_test_cpu_count_at_least_works_superficially_fn(struct aws_allocator *allocator, void *ctx) { (void)allocator; @@ -161,6 +162,18 @@ static int s_test_sanity_check_numa_discovery(struct aws_allocator *allocator, v ASSERT_TRUE(total_cpus_found_via_numa <= processor_count); + AWS_STRING_FROM_LITERAL(statm_path, "/proc/self/maps"); + AWS_STRING_FROM_LITERAL(read_only, "r"); + FILE* maps = aws_fopen_safe(statm_path, read_only); + + char myString[100]; + + while(fgets(myString, 100, maps)) { + printf("%s", myString); + } + + fclose(maps); + aws_common_library_clean_up(); return 0; }