1#!/usr/bin/python 2# 3# Copyright (c) 2011 The Chromium Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7import os, tempfile 8 9from autotest_lib.client.bin import test, utils 10from autotest_lib.client.common_lib import error 11 12 13class kernel_SchedCgroups(test.test): 14 """ 15 Verify scheduler cgroups 16 """ 17 version = 1 18 19 20 def cleanup(self): 21 utils.system('umount %s' % self._tmpdir) 22 utils.system('rm -rf %s' % self._tmpdir) 23 24 25 def run_once(self): 26 self._tmpdir = tempfile.mkdtemp() 27 utils.system('mount -t cgroup cgroup %s -o cpu' % self._tmpdir) 28 utils.system('mkdir -p -m 0777 %s/test' % self._tmpdir) 29 self.assert_(os.path.isfile('%s/test/tasks' % self._tmpdir)) 30