• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2013 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
5from autotest_lib.client.common_lib import error
6from autotest_lib.server import test
7
8class platform_UReadAheadServer(test.test):
9    """Test to check whether ureadahead pack files are created on reboot.
10
11    The test first deletes the existing pack files, reboots and then checks
12    that new pack files are created on reboot.
13    """
14    version = 1
15
16
17    def run_once(self, host=None):
18        # First delete the pack files.
19        host.run('rm -rf /var/lib/ureadahead')
20
21        # Reboot the client
22        host.reboot()
23
24        # Check if the ureadahead pack files were created on reboot.
25        try:
26            host.run('ls /var/lib/ureadahead/*pack')
27        except error.AutoservRunError:
28            raise error.TestFail('"ureadahead" pack files were not created on '
29                                 'reboot')
30