diff options
author | 2016-08-02 10:28:08 -0700 | |
---|---|---|
committer | 2016-08-02 10:28:08 -0700 | |
commit | 18983f8e384892b3a8089d9ecab1eabda4ceecaf (patch) | |
tree | ed309c27e3287ac75a083802e37af931374021da /test | |
parent | fcccb5aca51c36841a229eba2884f7c67468143f (diff) | |
parent | 6e5c33c3e26ee1d43e2083034e05ffd0dc105934 (diff) |
Merge pull request #7590 from vjpai/affinity_optional
Don't assert if we're not able to set CPU affinity
Diffstat (limited to 'test')
-rw-r--r-- | test/cpp/qps/limit_cores.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/qps/limit_cores.cc b/test/cpp/qps/limit_cores.cc index 59ed369067..b5c222542b 100644 --- a/test/cpp/qps/limit_cores.cc +++ b/test/cpp/qps/limit_cores.cc @@ -68,9 +68,9 @@ int LimitCores(const int* cores, int cores_size) { cores_set++; } } - GPR_ASSERT(sched_setaffinity(0, size, cpup) == 0); + bool affinity_set = (sched_setaffinity(0, size, cpup) == 0); CPU_FREE(cpup); - return cores_set; + return affinity_set ? cores_set : num_cores; } } // namespace testing |