File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
compiler-rt/lib/scudo/standalone/tests Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -191,12 +191,13 @@ TEST_F(MapAllocatorTest, SecondaryIterate) {
191
191
}
192
192
193
193
TEST_F (MapAllocatorTest, SecondaryOptions) {
194
- // Attempt to set a maximum number of entries higher than the array size.
195
- EXPECT_TRUE (Allocator->setOption (scudo::Option::MaxCacheEntriesCount, 4096U ));
196
-
197
- // Attempt to set an invalid (negative) number of entries
198
- EXPECT_FALSE (Allocator->setOption (scudo::Option::MaxCacheEntriesCount, -1 ));
194
+ // Test options that are only meaningful if the secondary cache is enabled.
199
195
if (Allocator->canCache (0U )) {
196
+ // Attempt to set a maximum number of entries higher than the array size.
197
+ EXPECT_TRUE (
198
+ Allocator->setOption (scudo::Option::MaxCacheEntriesCount, 4096U ));
199
+ // Attempt to set an invalid (negative) number of entries
200
+ EXPECT_FALSE (Allocator->setOption (scudo::Option::MaxCacheEntriesCount, -1 ));
200
201
// Various valid combinations.
201
202
EXPECT_TRUE (Allocator->setOption (scudo::Option::MaxCacheEntriesCount, 4U ));
202
203
EXPECT_TRUE (
You can’t perform that action at this time.
0 commit comments