test: fix cpuset-threads tests#6278
Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom Mar 14, 2019
Merged
Conversation
The tests were previously using real cpuset values, which broke down when the tests were run in an environment where the cpuset size was already limited. The fix makes the tests not dependent on the platform features. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
dnoe
reviewed
Mar 13, 2019
| Api::MockLinuxOsSysCalls linux_os_sys_calls; | ||
| TestThreadsafeSingletonInjector<Api::LinuxOsSysCallsImpl> linux_os_calls(&linux_os_sys_calls); | ||
|
|
||
| // Set cpuset size to be eight. |
Contributor
There was a problem hiding this comment.
Normally I prefer to see really explicit stuff like this in tests, but in this particular case I think it might be clearer to use a loop. Or if there's some specific meaning to the non-contiguous CPU numbers you've set here it'd be worth expanding the comment to explain why that's done.
Member
Author
There was a problem hiding this comment.
Ok, changed to for loop. My original idea was to emphasize that the CPU ids are arbitrary and only the cpuset size matters. But I agree that it looks better this way.
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Contributor
|
@mattklein123 for a senior maintainer pass |
spenceral
added a commit
to spenceral/envoy
that referenced
this pull request
Mar 20, 2019
* master: (59 commits) http fault: add response rate limit injection (envoyproxy#6267) xds: introduce initial_fetch_timeout option to limit initialization time (envoyproxy#6048) test: fix cpuset-threads tests (envoyproxy#6278) server: add an API for registering for notifications for server instance life… (envoyproxy#6254) remove remains of TestBase (envoyproxy#6286) dubbo_proxy: Implement the routing of Dubbo requests (envoyproxy#5973) Revert "stats: add new BoolIndicator stat type (envoyproxy#5813)" (envoyproxy#6280) runtime: codifying runtime guarded features (envoyproxy#6134) mysql_filter: fix integration test flakes (envoyproxy#6272) tls: update BoringSSL to debed9a4 (3683). (envoyproxy#6273) rewrite buffer implementation to eliminate evbuffer dependency (envoyproxy#5441) Remove the dependency from TimeSystem to libevent by using the Event::Scheduler abstraction as a delegate. (envoyproxy#6240) fuzz: fix use of literal in default initialization. (envoyproxy#6268) http: add HCM functionality required for rate limiting (envoyproxy#6242) Disable mysql_integration_test until it is deflaked. (envoyproxy#6250) test: use ipv6_only IPv6 addresses in custom cluster integration tests. (envoyproxy#6260) tracing: If parent span is propagated with empty string, it causes th… (envoyproxy#6263) upstream: fix oss-fuzz issue envoyproxy#11095. (envoyproxy#6220) Wire up panic mode subset to receive updates (envoyproxy#6221) docs: clarify xds docs with warming information (envoyproxy#6236) ...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
The tests were previously using real cpuset values, which broke down when the tests were run in an environment where the cpuset size was already limited (see #5975 (comment)). The fix makes the tests not dependent on the number of platform CPUs or the cpuset assigned to the tests.
CC @htuch
Risk Level: low
Testing: local testing