16 Commits

Author SHA1 Message Date
Christopher Ferris
c8bf93dba0 [scudo] Remove RSS checking code.
The RSS code is not very useful and can be replicated by using
ulimit. Remove it and remove the options associated with it.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D159155
2023-08-30 12:35:14 -07:00
Chia-hung Duan
755771045f Reland D146570 "[scudo] Switch to use MemMap in tests"
This reverts commit 89cc5304969ded574550e0ad113f59f3d4f50303 and fix the
variable shadowing bug.

Differential Revision: https://reviews.llvm.org/D147672
2023-04-07 03:05:56 +00:00
Chia-hung Duan
89cc530496 Revert "[scudo] Switch to use MemMap in tests"
This reverts commit 4151477021170d8937f8fc820187d5934eb93c7d.
2023-04-06 00:06:34 +00:00
Chia-hung Duan
4151477021 [scudo] Switch to use MemMap in tests
Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D146570
2023-04-05 21:28:55 +00:00
Chia-hung Duan
0bd4499b96 [scudo] Temporarily disable GetRssFromBuffer test
This is a flaky test and may not test the thing it expected to verify.
E.g., it doesn't dirty the pages so the memory usage may not be reflected
on the RSS.

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D145126
2023-03-06 16:38:18 +00:00
Amy Kwan
0e3ef5f897 [scudo] Disable the GetRssFromBuffer scudo test on PPC
The GetRssFromBuffer scudo test case fails intermittently on Power, so this test
is disabled on the platform because of this.
2023-02-23 11:58:05 -06:00
Vitaly Buka
0514d3f406 [NFC][scudo] Fix warnings in tests after D139430 2022-12-09 08:59:47 -08:00
Bastian Kersting
cc02d61b45 scudo-standalone: Add GetRSS method on Linux
This change adds a GetRSS method on Linux that parses
the number from /proc/self/statm. This change is part
of splitting up https://reviews.llvm.org/D126752.

Reviewed By: vitalybuka, cryptoad

Differential Revision: https://reviews.llvm.org/D139430
2022-12-08 13:38:24 -08:00
Vitaly Buka
b40908e639 [NFC][scudo] Avoid integer overflow in test
releasePagesToOS may shrink RSS below the value stored on start.
2021-06-03 00:08:41 -07:00
Vitaly Buka
a6e5a4b464 [NFC][scudo] Re-enable check in the test
It should pass with patched QEMU.
2021-05-28 01:57:55 -07:00
Vitaly Buka
c261edb277 [NFC][scudo] Check zeros on smaller allocations
1Tb counting was the slowest test under the QEMU with MTE.
2021-05-27 11:14:26 -07:00
Vitaly Buka
e14696bfd7 [NFC][SCUDO] Fix unittest for -gtest_repeat=10
Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D103122
2021-05-25 15:32:42 -07:00
Vitaly Buka
f5bde3d476 [NFC][scudo] Avoid cast in test 2021-05-24 17:14:38 -07:00
Jinsong Ji
bec6b02252 [compiler-rt][scudo] Fix sign-compare warnings
Fix buildbot failure
https://lab.llvm.org/buildbot/#/builders/57/builds/6542/steps/6/logs/stdio

/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1629:28:
error: comparison of integers of different signs: 'const unsigned long'
and 'const int' [-Werror,-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(GT, >);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1609:12:
note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
  if (val1 op val2) {\
      ~~~~ ^  ~~~~
/llvm-project/compiler-rt/lib/scudo/standalone/tests/common_test.cpp:30:3:
note: in instantiation of function template specialization
'testing::internal::CmpHelperGT<unsigned long, int>' requested here
  EXPECT_GT(OnStart, 0);
  ^

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103029
2021-05-24 21:33:02 +00:00
Vitaly Buka
6435ca4e2b [NFC][scudo] Small test cleanup
Fixing issues raised on D102979 review.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D102994
2021-05-24 10:16:44 -07:00
Vitaly Buka
0bccdf82f7 [NFC][scudo] Add releasePagesToOS test 2021-05-22 22:42:59 -07:00