1# Copyright 2016 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import common 6from autotest_lib.client.common_lib import error 7from autotest_lib.server import test 8 9 10class brillo_Minijail(test.test): 11 """Test Minijail sandboxing functionality.""" 12 version = 1 13 14 TEST_EXECUTABLE = 'libminijail_test' 15 16 def run_once(self, host=None): 17 """Runs the test. 18 19 @param host: A host object representing the DUT. 20 21 @raise TestFail: The test executable returned an error. 22 """ 23 try: 24 host.run(self.TEST_EXECUTABLE) 25 except error.GenericHostRunError as are: 26 raise error.TestFail(are) 27