Lucas Meneghel Rodrigues | 26 Jun 2012 15:44
Picon
Favicon
Gravatar

[PATCH 1/2] client.kernel_config: Uncompress /proc/config.gz and use as cfg

For systems that support /proc/config.gz, we can use the
config only if it's properly uncompressed. So, uncompress
the config file, and then pass it to autotest.

Signed-off-by: Lucas Meneghel Rodrigues <lmr <at> redhat.com>
---
 client/kernel_config.py |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/client/kernel_config.py b/client/kernel_config.py
index 20b6fb9..dba3d55 100644
--- a/client/kernel_config.py
+++ b/client/kernel_config.py
 <at>  <at>  -73,6 +73,12  <at>  <at>  class kernel_config(object):
         running_config = utils.running_config()
         if running_config is None:
             running_config = ''
+        if running_config.endswith('.gz'):
+            tmp_running_config = '/tmp/running_config'
+            utils.system('cat %s | gunzip > %s' %
+                         (running_config, tmp_running_config))
+            running_config = tmp_running_config
+
         self.running_config = running_config

         # 1. Get original config file
--

-- 
1.7.10.2
Lucas Meneghel Rodrigues | 26 Jun 2012 15:44
Picon
Favicon
Gravatar

[PATCH 2/2] boottool: Analyze both stdout and stderr from grub's output

Turns out grub shipped by OpenSUSE 12.1 has the batch cmd
savedefault disabled:

linux-yk2o:~ # grub --batch

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the
possible
   completions of a device/filename. ]
grub> savedefault --default=0 --once
savedefault --default=0 --once

Error 27: Unrecognized command

Horray for great engineering decisions! Kudos to the OpenSUSE team.

Also, since this wasn't captured by our code, it means
it went to stdout rather than stderr. So let's capture
both stdout and stderr to look for errors instead.

Signed-off-by: Lucas Meneghel Rodrigues <lmr <at> redhat.com>
---
 client/tools/boottool |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/client/tools/boottool b/client/tools/boottool
index 13ddd3a..5789869 100755
--- a/client/tools/boottool
(Continue reading)


Gmane