Skip to content

Commit

Permalink
Trying to refine which test is crashing on arm-ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmolenda committed Feb 1, 2024
1 parent 48f8b74 commit 54f324f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lldb/unittests/Breakpoint/WatchpointAlgorithmsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ void check_testcase(testcase test,

TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {

#if 0
// clang-format off
std::vector<testcase> doubleword_max = {
#if 0
{
{0x7fffffffe83b, 1},
{{0x7fffffffe83b, 1}}
Expand All @@ -52,6 +52,7 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
{0x7fffffffe838, 2},
{{0x7fffffffe838, 2}}
},
#endif
{
{0x1012, 8},
{{0x1010, 8}, {0x1018, 8}}
Expand All @@ -78,22 +79,18 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
},
};
// clang-format on
printf("Running doubleword max test cases\n");
for (testcase test : doubleword_max) {
addr_t user_addr = test.user.addr;
size_t user_size = test.user.size;
size_t min_byte_size = 1;
size_t max_byte_size = 8;
size_t address_byte_size = 8;
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);

printf("Checking returned values\n");
check_testcase(test, result, min_byte_size, max_byte_size,
address_byte_size);
}
#endif

// clang-format off
std::vector<testcase> word_max = {
Expand All @@ -107,18 +104,15 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
},
};
// clang-format on
printf("Running word max test cases\n");
for (testcase test : word_max) {
addr_t user_addr = test.user.addr;
size_t user_size = test.user.size;
size_t min_byte_size = 1;
size_t max_byte_size = 4;
size_t address_byte_size = 4;
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);

printf("Checking returned values\n");
check_testcase(test, result, min_byte_size, max_byte_size,
address_byte_size);
}
Expand Down Expand Up @@ -166,18 +160,15 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
},
};
// clang-format on
printf("Running word twogig test cases\n");
for (testcase test : twogig_max) {
addr_t user_addr = test.user.addr;
size_t user_size = test.user.size;
size_t min_byte_size = 1;
size_t max_byte_size = INT32_MAX;
size_t address_byte_size = 8;
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);

printf("Checking returned values\n");
check_testcase(test, result, min_byte_size, max_byte_size,
address_byte_size);
}
Expand Down

0 comments on commit 54f324f

Please sign in to comment.