Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Jan 5, 2024
1 parent 6ee34b3 commit fd1fa84
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/system_info_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "logging/test_logger.h"
#include <aws/testing/aws_test_harness.h>
#include <aws/common/file.h>

static int s_test_cpu_count_at_least_works_superficially_fn(struct aws_allocator *allocator, void *ctx) {
(void)allocator;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fd1fa84

Please sign in to comment.