!284 check-kabi支持python3
From: @love_hangzhou Reviewed-by: @xiexiuqi Signed-off-by: @xiexiuqi,@xiexiuqi
This commit is contained in:
commit
5572746644
60
check-kabi
60
check-kabi
@ -41,7 +41,7 @@ def load_symvers(symvers,filename):
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum,symbol,directory,type = string.split(in_line)
|
||||
checksum,symbol,directory,type = in_line.split()
|
||||
|
||||
symvers[symbol] = in_line[0:-1]
|
||||
|
||||
@ -56,7 +56,7 @@ def load_kabi(kabi,filename):
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum,symbol,directory,type = string.split(in_line)
|
||||
checksum,symbol,directory,type = in_line.split()
|
||||
|
||||
kabi[symbol] = in_line[0:-1]
|
||||
|
||||
@ -71,9 +71,9 @@ def check_kabi(symvers,kabi):
|
||||
losted_symbols=[]
|
||||
|
||||
for symbol in kabi:
|
||||
abi_hash,abi_sym,abi_dir,abi_type = string.split(kabi[symbol])
|
||||
if symvers.has_key(symbol):
|
||||
sym_hash,sym_sym,sym_dir,sym_type = string.split(symvers[symbol])
|
||||
abi_hash,abi_sym,abi_dir,abi_type = kabi[symbol].split()
|
||||
if symbol in symvers:
|
||||
sym_hash,sym_sym,sym_dir,sym_type = symvers[symbole].split()
|
||||
if abi_hash != sym_hash:
|
||||
fail=1
|
||||
changed_symbols.append(symbol)
|
||||
@ -86,39 +86,39 @@ def check_kabi(symvers,kabi):
|
||||
losted_symbols.append(symbol)
|
||||
|
||||
if fail:
|
||||
print "*** ERROR - ABI BREAKAGE WAS DETECTED ***"
|
||||
print ""
|
||||
print "The following symbols have been changed (this will cause an ABI breakage):"
|
||||
print "new kabi:"
|
||||
print ("*** ERROR - ABI BREAKAGE WAS DETECTED ***")
|
||||
print ("")
|
||||
print ("The following symbols have been changed (this will cause an ABI breakage):")
|
||||
print ("new kabi:")
|
||||
for symbol in changed_symbols:
|
||||
print symvers[symbol]
|
||||
print "old kabi:"
|
||||
print (symvers[symbol])
|
||||
print ("old kabi:")
|
||||
for symbol in changed_symbols:
|
||||
print kabi[symbol]
|
||||
print ""
|
||||
print (kabi[symbol])
|
||||
print ("")
|
||||
|
||||
if lost:
|
||||
print "*** ERROR - ABI BREAKAGE WAS DETECTED ***"
|
||||
print ""
|
||||
print "The following symbols have been losted (this will cause an ABI breakage):"
|
||||
print "old kabi:"
|
||||
print ("*** ERROR - ABI BREAKAGE WAS DETECTED ***")
|
||||
print ("")
|
||||
print ("The following symbols have been losted (this will cause an ABI breakage):")
|
||||
print ("old kabi:")
|
||||
for symbol in losted_symbols:
|
||||
print kabi[symbol]
|
||||
print ""
|
||||
print (kabi[symbol])
|
||||
print ("")
|
||||
|
||||
if warn:
|
||||
print "*** WARNING - ABI SYMBOLS MOVED ***"
|
||||
print ""
|
||||
print "The following symbols moved (typically caused by moving a symbol from being"
|
||||
print "provided by the kernel vmlinux out to a loadable module):"
|
||||
print "new kabi:"
|
||||
print ("*** WARNING - ABI SYMBOLS MOVED ***")
|
||||
print ("")
|
||||
print ("The following symbols moved (typically caused by moving a symbol from being")
|
||||
print ("provided by the kernel vmlinux out to a loadable module):")
|
||||
print ("new kabi:")
|
||||
for symbol in moved_symbols:
|
||||
print symvers[symbol]
|
||||
print "old kabi"
|
||||
print (symvers[symbol])
|
||||
print ("old kabi")
|
||||
for symbol in moved_symbols:
|
||||
print kabi[symbol]
|
||||
print (kabi[symbol])
|
||||
|
||||
print ""
|
||||
print ("")
|
||||
|
||||
"""Halt the build, if we got errors and/or warnings. In either case,
|
||||
double-checkig is required to avoid introducing / concealing
|
||||
@ -128,12 +128,12 @@ def check_kabi(symvers,kabi):
|
||||
sys.exit(0)
|
||||
|
||||
def usage():
|
||||
print """
|
||||
print ("""
|
||||
check-kabi: check Module.kabi and Module.symvers files.
|
||||
|
||||
check-kabi [ -k Module.kabi ] [ -s Module.symvers ]
|
||||
|
||||
"""
|
||||
""")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
%global upstream_sublevel 0
|
||||
%global devel_release 5
|
||||
%global maintenance_release .3.0
|
||||
%global pkg_release .18
|
||||
%global pkg_release .19
|
||||
|
||||
%define with_debuginfo 1
|
||||
# Do not recompute the build-id of vmlinux in find-debuginfo.sh
|
||||
@ -858,6 +858,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Aug 23 2021 ShiYuan HU <hushiyuan@huwei.com> - 5.10.0-5.3.0.19
|
||||
- check-kabi: check-kabi support python3 and python2
|
||||
|
||||
* Fri Aug 13 2021 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-5.3.0.18
|
||||
- srcu: Take early exit on memory-allocation failure
|
||||
- iommu: fix build error when CONFIG_IOMMU_API is off
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user