You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/08/25 18:40:42 UTC
[2/3] mesos git commit: Improved
`NvidiaGpuTest.ROOT_CGROUPS_NVIDIA_GPU_VerifyDeviceAccess`.
Improved `NvidiaGpuTest.ROOT_CGROUPS_NVIDIA_GPU_VerifyDeviceAccess`.
Change the test so that the agent offesr as many GPUs as available on
the box instead of restricting it to 1. This way the test will fail if
there's a bug that makes the isolator give a task access to more GPUs
than what it was allocated.
Review: https://reviews.apache.org/r/61438/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1e304a0b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1e304a0b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1e304a0b
Branch: refs/heads/master
Commit: 1e304a0b73f2ab43e9b59a2648446d1e8d7defa0
Parents: dd06684
Author: Gastón Kleiman <ga...@mesosphere.io>
Authored: Fri Aug 25 11:40:27 2017 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Aug 25 11:40:27 2017 -0700
----------------------------------------------------------------------
src/tests/containerizer/nvidia_gpu_isolator_tests.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1e304a0b/src/tests/containerizer/nvidia_gpu_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/nvidia_gpu_isolator_tests.cpp b/src/tests/containerizer/nvidia_gpu_isolator_tests.cpp
index f9b26bc..f7a7158 100644
--- a/src/tests/containerizer/nvidia_gpu_isolator_tests.cpp
+++ b/src/tests/containerizer/nvidia_gpu_isolator_tests.cpp
@@ -91,8 +91,7 @@ TEST_F(NvidiaGpuTest, ROOT_CGROUPS_NVIDIA_GPU_VerifyDeviceAccess)
// Assume at least one GPU is available for isolation.
slave::Flags flags = CreateSlaveFlags();
flags.isolation = "filesystem/linux,cgroups/devices,gpu/nvidia";
- flags.nvidia_gpu_devices = vector<unsigned int>({0u});
- flags.resources = "gpus:1";
+ flags.resources = "cpus:1"; // To override the default with gpus:0.
Owned<MasterDetector> detector = master.get()->createDetector();