-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
A node with large number of CPU cores is an important edge case for Collector. Run integration tests on such a setup if requested explicitely or by schedule. Add a new integration test, which when invoked on a machine with large number of CPU cores will test the ring buffer adjustment, in particular that the final adjusted value land in an allowed interval of power of two.
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
ansible_user: core | ||
|
||
needs_selinux_permissive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package suites | ||
|
||
import "github.com/stackrox/collector/integration-tests/pkg/collector" | ||
|
||
type RingBufferTestSuite struct { | ||
IntegrationTestSuiteBase | ||
} | ||
|
||
func (s *RingBufferTestSuite) SetupSuite() { | ||
// Set the totall allowed ring buffer size to 400Mb. On a box with 128 CPU | ||
// cores this should trigger an adjustment making the singular ring buffer | ||
// size 2Mb (without the power-of-two alignment it would be an invalid | ||
// value of 3Mb) | ||
collectorOptions := collector.StartupOptions{ | ||
Env: map[string]string{ | ||
"ROX_COLLECTOR_SINSP_TOTAL_BUFFER_SIZE": "419430400", | ||
}, | ||
} | ||
|
||
s.StartCollector(false, &collectorOptions) | ||
} | ||
|
||
func (s *RingBufferTestSuite) TearDownSuite() { | ||
s.StopCollector() | ||
} | ||
|
||
func (s *RingBufferTestSuite) TestCollectorRunning() { | ||
running, err := s.executor.IsContainerRunning("collector") | ||
s.Require().NoError(err) | ||
s.Require().True(running) | ||
} |