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) {
191191}
192192
193193TEST_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.
199195 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 ));
200201 // Various valid combinations.
201202 EXPECT_TRUE (Allocator->setOption (scudo::Option::MaxCacheEntriesCount, 4U ));
202203 EXPECT_TRUE (
You can’t perform that action at this time.
0 commit comments