[PATCH] D87792: [sanitizer] Add facility to print the full StackDepot
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 15:30:28 PDT 2020
vitalybuka added a comment.
In D87792#2281863 <https://reviews.llvm.org/D87792#2281863>, @tejohnson wrote:
> In D87792#2281271 <https://reviews.llvm.org/D87792#2281271>, @vitalybuka wrote:
>
>> I lost connection to my Win box in the office. I will need Windows build
>> next week anyway. I will try to figure out why stderr is not captured there.
>> For now I relanded your patch and disabled the test on Windows.
>
> Thanks @vitalybuka. [For my records: I see that you recommitted the patch in rGa90229d6cee8 <https://reviews.llvm.org/rGa90229d6cee8910505999678ed137a7f0f9083ed> and then disabled the test for windows in e259f7b88266572aaf00cfc1ff7fe88a9fdb1c7a <https://reviews.llvm.org/rGe259f7b88266572aaf00cfc1ff7fe88a9fdb1c7a>]
>
> Question on your recommit - I see you changed it to use testing::internal::CaptureStderr() and testing::internal::GetCapturedStderr() instead of EXPECT_EXIT. I had originally written the test using those interfaces in fact, but then read that they are internal testing APIs only for internal gtest testing and shouldn't be used outside of it. e.g. https://groups.google.com/g/googletestframework/c/7OTybZo-jp8. Should we change it back to the EXPECT_EXIT approach?
You are right. I thought that it may help but I didn't noticed "internal".
Restored EXPECT_EXIT with 82827244e9bbc2804afd9070158c567ac89f0540 <https://reviews.llvm.org/rG82827244e9bbc2804afd9070158c567ac89f0540>
================
Comment at: compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp:75-78
+ EXPECT_EXIT(
+ (StackDepotPrintAll(), exit(0)), ::testing::ExitedWithCode(0),
+ "Stack for id .*#0 0x0.*#1 0x1.*#2 0x2.*#3 0x3.*#4 0x6.*Stack for id "
+ ".*#0 0x0.*#1 0x1.*#2 0x2.*#3 0x3.*#4 0x7.*#5 0x8.*");
----------------
I lost connection to my windows, but maybe this way will work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87792/new/
https://reviews.llvm.org/D87792
More information about the llvm-commits
mailing list