• J
    kabi: fix split error of kABI reference checking tool · 8ea2d73f
    Jialin Zhang 提交于
    hulk inclusion
    category: bugfix
    bugzilla: https://gitee.com/openeuler/kernel/issues/I4JZ0H
    CVE: NA
    
    -------------------------------
    
    Use the kABI reference checking tool as follows:
    
      ./scripts/check-kabi -k Module.symvers.baseline -s Module.symvers
    
    A python error occurred, and the following traceback is printed:
    
    Traceback (most recent call last):
      File "./scripts/check-kabi", line 144, in <module>
        load_symvers(symvers,symvers_file)
      File "./scripts/check-kabi", line 45, in load_symvers
        checksum,symbol,directory,type = string.split(in_line)
    ValueError: too many values to unpack
    
    It is because the Module.symvers file change its line format in
    the following commits, and the namespace field may be empty:
    cb9b55d2 ("modpost: add support for symbol namespaces")
    5190044c ("modpost: move the namespace field in Module.symvers last")
    
    In order to solve this problem, use '\t' to split each line and
    add a variable to save namespace.
    
    Fixes: 9fc7fbaf ("kabi: add kABI reference checking tool")
    Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
    Reviewed-by: NWei Li <liwei391@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    8ea2d73f
check-kabi 3.2 KB