26 Jun 2012 15:44
[PATCH 1/2] client.kernel_config: Uncompress /proc/config.gz and use as cfg
Lucas Meneghel Rodrigues <lmr <at> redhat.com>
2012-06-26 13:44:21 GMT
2012-06-26 13:44:21 GMT
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
RSS Feed