This code uses the length of a variable, which includes the '/boot' prefix to trim the length of the kernel name, which in turn does not have the /boot prefix. So this results in bad kernel version strings -- and when using autotest to build kernels, the default control file results in all kernels being deleted from the system.
Signed-off-by: Nishanth Aravamudan <[email protected]> --- client/common_lib/hosts/base_classes.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/common_lib/hosts/base_classes.py b/client/common_lib/hosts/base_classes.py index 09af7c4..86b50ea 100644 --- a/client/common_lib/hosts/base_classes.py +++ b/client/common_lib/hosts/base_classes.py @@ -654,7 +654,7 @@ class Host(object): # find all the vmlinuz images referenced by the bootloader vmlinuz_prefix = os.path.join(boot_dir, 'vmlinuz-') boot_info = self.bootloader.get_entries() - used_kernver = [boot['kernel'][len(vmlinuz_prefix):] + used_kernver = [boot['kernel'][len('vmlinuz-'):] for boot in boot_info.itervalues()] # find all the unused vmlinuz images in /boot -- 1.7.5.4 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
