> On Oct. 26, 2017, 2:59 p.m., Jeff Coffler wrote: > > src/tests/containerizer/cpu_isolator_tests.cpp > > Lines 120 (patched) > > <https://reviews.apache.org/r/63277/diff/1/?file=1869651#file1869651line120> > > > > Given what we learned about quoting, why not just do: > > > > "powershell -c while ($true) {}" > > > > ?
Actually, this should be `-NoProfile -Command` too, and `"` is fine (needed to avoid interpolation by `cmd.exe`), it's `'` that's troublesome. > On Oct. 26, 2017, 2:59 p.m., Jeff Coffler wrote: > > src/tests/containerizer/cpu_isolator_tests.cpp > > Line 163 (original), 172 (patched) > > <https://reviews.apache.org/r/63277/diff/1/?file=1869651#file1869651line172> > > > > A powershell loop wouldn't do it. `Get-Process` is a step in the right > > direction, but probably has a small amount of kernel time and a lot of > > PowerShell time for formatting, etc. > > > > What about some sort of tight loop that was essentially exclusively a > > kernel operation, like mapping and unmapping a memory segment in a loop or > > something? This could be done in C, avoids PowerShell entirely, and would > > need to be processed by the kernel. Or creating a shared memory mutex, or > > anything along those lines. > > > > The kernel is supposed to be efficient, so it would be hard to consume > > Kernel time, but pick something that you know is 100% kernel, and do it in > > a tight loop. That should get you there. This needs to be a task that can be launched. I really do not want to have to ship yet another binary just for a test. I can if I have to, but there should be a way to accomplish this outside of that. > On Oct. 26, 2017, 2:59 p.m., Jeff Coffler wrote: > > src/tests/containerizer/cpu_isolator_tests.cpp > > Lines 224 (patched) > > <https://reviews.apache.org/r/63277/diff/1/?file=1869651#file1869651line224> > > > > Ditto This needs to be wrapped in `"` because of the `|`. > On Oct. 26, 2017, 2:59 p.m., Jeff Coffler wrote: > > src/tests/containerizer/cpu_isolator_tests.cpp > > Line 234 (original), 253 (patched) > > <https://reviews.apache.org/r/63277/diff/1/?file=1869651#file1869651line253> > > > > If you're doing a `sleep` operation, that won't consume system time. > > The kernel will deschedule you until it's time for you to wake up. > > > > You might get there by doing a lot of short sleeps, but that's > > generally risky and unreliable (depends on kernel timing, speed of > > implementation, etc). The `sleep` here applies to the test process, not the executing task. - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63277/#review189358 ----------------------------------------------------------- On Oct. 26, 2017, 9:33 a.m., Andrew Schwartzmeyer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63277/ > ----------------------------------------------------------- > > (Updated Oct. 26, 2017, 9:33 a.m.) > > > Review request for mesos, Akash Gupta, Jeff Coffler, Jie Yu, John Kordich, > Joseph Wu, and Li Li. > > > Bugs: MESOS-6690 > https://issues.apache.org/jira/browse/MESOS-6690 > > > Repository: mesos > > > Description > ------- > > These test the limitation and usage reporting of the new Windows > `Cpuset` and `Mem` isolators. > > > Diffs > ----- > > src/tests/CMakeLists.txt 386e0473c93d0a993248c7818067071d0c761c76 > src/tests/containerizer/cpu_isolator_tests.cpp > 846b2e255547a02f5eb0590747edca62bc560ac3 > src/tests/containerizer/memory_isolator_tests.cpp > b8ea5d35b3a0a4820d9ec4c6d7d916dc6101b570 > src/tests/mesos.cpp 9185b5bf2175be5b0f6b6a03a04e9e5445bf22fd > > > Diff: https://reviews.apache.org/r/63277/diff/1/ > > > Testing > ------- > > > Thanks, > > Andrew Schwartzmeyer > >
