Rename whitelists to stablelists in ksc tests.
Resolves: rhbz#2038743 Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
This commit is contained in:
parent
857de6268d
commit
a443129c03
@ -5,7 +5,7 @@ The following test cases will be considered as a part of `ksc` gating.
|
||||
## Installation issues
|
||||
|
||||
1. Check whether Module.symvers has been installed
|
||||
1. Check whether kabi-whitelists package has been installed
|
||||
1. Check whether kabi-stablelists package has been installed
|
||||
1. Python Bugzilla interface has been installed
|
||||
1. Expect error when nm is not found in $PATH.
|
||||
|
||||
|
@ -75,7 +75,7 @@ $(METADATA): Makefile
|
||||
@echo "Requires: kmod" >> $(METADATA)
|
||||
@echo "Requires: kernel-devel" >> $(METADATA)
|
||||
@echo "Requires: kernel-modules" >> $(METADATA)
|
||||
@echo "Requires: kernel-abi-whitelists" >> $(METADATA)
|
||||
@echo "Requires: kernel-abi-stablelists" >> $(METADATA)
|
||||
@echo "Requires: xz" >> $(METADATA)
|
||||
@echo "Requires: bzip2" >> $(METADATA)
|
||||
@echo "Requires: gzip" >> $(METADATA)
|
||||
|
@ -5,7 +5,7 @@ The following test cases will be considered as a part of `ksc` gating.
|
||||
## Installation issues
|
||||
|
||||
1. Check whether Module.symvers has been installed
|
||||
1. Check whether kabi-whitelists package has been installed
|
||||
1. Check whether kabi-stablelists package has been installed
|
||||
1. Python Bugzilla interface has been installed
|
||||
1. Expect error when nm is not found in $PATH.
|
||||
|
||||
@ -15,9 +15,9 @@ List of tests:
|
||||
|
||||
1. No external symbol required
|
||||
1. Whitelisted symbol use only
|
||||
1. Non-whitelisted symbol use only
|
||||
1. Mixed whitelisted and non-whitelisted symbol use
|
||||
1. Mixed whitelisted and non-whitelisted symbol use with multiple -k arguments
|
||||
1. Non-stablelisted symbol use only
|
||||
1. Mixed stablelisted and non-stablelisted symbol use
|
||||
1. Mixed stablelisted and non-stablelisted symbol use with multiple -k arguments
|
||||
1. `ksc` called on 8139, crc32_generic, xor
|
||||
|
||||
Testing will be done as follows:
|
||||
@ -25,7 +25,7 @@ Testing will be done as follows:
|
||||
1. If applicable, try and build a kernel module usecase.
|
||||
1. Pass kernel module(s) to ksc, record output.
|
||||
1. Using the kabi-tools ksc parser [1], parse ksc output.
|
||||
1. Using the nm tool, uname -i and kabi-whitelist, indepedently compose
|
||||
1. Using the nm tool, uname -i and kabi-stablelist, indepedently compose
|
||||
the dictionary that ksc parser produces on ksc output.
|
||||
1. Check for match.
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get all symbols from ksc result's nonwhitelisted sections
|
||||
function ksc_report_symbols_nonwhitelisted() {
|
||||
# Get all symbols from ksc result's nonstablelisted sections
|
||||
function ksc_report_symbols_nonstablelisted() {
|
||||
sed -n 's/^.*(\([^)]*\))$/\1/p' ~/ksc-result.txt \
|
||||
| sort \
|
||||
| uniq
|
||||
}
|
||||
|
||||
# Get all symbols from ksc result's whitelisted sections
|
||||
function ksc_report_symbols_whitelisted() {
|
||||
# Get all symbols from ksc result's stablelisted sections
|
||||
function ksc_report_symbols_stablelisted() {
|
||||
sed -n '/^\[WHITELISTUSAGE\]$/,/^\[NONWHITELISTUSAGE\]$/p' \
|
||||
~/ksc-result.txt \
|
||||
| grep -v '^\[' \
|
||||
@ -19,8 +19,8 @@ function ksc_report_symbols_whitelisted() {
|
||||
# Get all symbols from ksc result
|
||||
function ksc_report_symbols_all() {
|
||||
{
|
||||
ksc_report_symbols_whitelisted
|
||||
ksc_report_symbols_nonwhitelisted
|
||||
ksc_report_symbols_stablelisted
|
||||
ksc_report_symbols_nonstablelisted
|
||||
} | sort | uniq
|
||||
}
|
||||
|
||||
@ -49,8 +49,8 @@ function ko_get_group_undefined() {
|
||||
comm -23 <(ko_get_undefined "$@") <(ko_get_defined "$@")
|
||||
}
|
||||
|
||||
# Get all symbols present in kABI whitelist
|
||||
function kabi_whitelists_symbols() {
|
||||
# Get all symbols present in kABI stablelist
|
||||
function kabi_stablelists_symbols() {
|
||||
grep -h '^[[:space:]]' /lib/modules/kabi-current/* \
|
||||
| tr -d '\t' \
|
||||
| sort \
|
||||
|
@ -9,7 +9,7 @@ SYMBOL_CHECKS=()
|
||||
|
||||
SYMBOL_CHECKS+=(symbol_check_1)
|
||||
DESCRIPTION_symbol_check_1=(
|
||||
"Verify that all symbols in whitelisted and nonwhitelisted sections"
|
||||
"Verify that all symbols in stablelisted and nonstablelisted sections"
|
||||
"of the just produced ksc-report.txt are marked as undefined by nm,"
|
||||
"discounting symbols defined within the set of modules used."
|
||||
)
|
||||
@ -21,7 +21,7 @@ function symbol_check_1() {
|
||||
|
||||
SYMBOL_CHECKS+=(symbol_check_2)
|
||||
DESCRIPTION_symbol_check_2=(
|
||||
"Verify that all symbols in whitelisted and nonwhitelisted sections"
|
||||
"Verify that all symbols in stablelisted and nonstablelisted sections"
|
||||
"of the just produced ksc-report.txt come from Module.symvers only."
|
||||
)
|
||||
function symbol_check_2() {
|
||||
@ -33,11 +33,11 @@ function symbol_check_2() {
|
||||
#
|
||||
SYMBOL_CHECKS+=(symbol_check_3)
|
||||
DESCRIPTION_symbol_check_3=(
|
||||
"Verify that all whitelisted symbols are present on kabi whitelist."
|
||||
"Verify that all stablelisted symbols are present on kabi stablelist."
|
||||
)
|
||||
function symbol_check_3() {
|
||||
test -z "$(comm -13 <(kabi_whitelists_symbols) \
|
||||
<(ksc_report_symbols_whitelisted))"
|
||||
test -z "$(comm -13 <(kabi_stablelists_symbols) \
|
||||
<(ksc_report_symbols_stablelisted))"
|
||||
return $?
|
||||
}
|
||||
|
||||
@ -55,13 +55,13 @@ function find_ko()
|
||||
if test $count -gt 0
|
||||
then
|
||||
matches+=($(
|
||||
find "$MOD_PATH" -type f -iname "*.ko.*" \
|
||||
find "$MOD_PATH" -type f -iname "*.ko*" \
|
||||
| head -n $count \
|
||||
| xargs -I MATCH bash -c '
|
||||
case $(echo MATCH | grep -Eo "[^.]+$") in
|
||||
xz) unxz MATCH;;
|
||||
bz2) bzip2 -d MATCH;;
|
||||
gz) gunzip MATCH;;
|
||||
case $(echo MATCH | grep -P "\.ko($|\.[^.]+$)") in
|
||||
.ko.xz) unxz MATCH;;
|
||||
.ko.bz2) bzip2 -d MATCH;;
|
||||
.ko.gz) gunzip MATCH;;
|
||||
*) echo MATCH; exit 0;;
|
||||
esac;
|
||||
echo MATCH | sed "s/\.[^.]*$//g";'
|
||||
@ -71,7 +71,7 @@ function find_ko()
|
||||
# make sure some matches were found
|
||||
if test ${#matches[@]} -eq 0
|
||||
then
|
||||
# TODO ERROR
|
||||
echo "No modules found." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -102,6 +102,7 @@ function common_ksc_elf_ko()
|
||||
|
||||
eval DESCRIPTION_$test_name+=\(\"\"\)
|
||||
eval DESCRIPTION_$test_name+=\(\"Test used the following modules:\"\)
|
||||
[ ${#ko[@]} -gt 0 ] || { echo "ERROR: No module found in MOD_PATH=$MOD_PATH."; exit 1; }
|
||||
for mod in ${ko[@]}
|
||||
do
|
||||
mod_rel="$(realpath --relative-to="$MOD_PATH" $ko)"
|
||||
|
@ -11,7 +11,7 @@
|
||||
- kernel
|
||||
- kernel-devel
|
||||
- kernel-modules
|
||||
- kernel-abi-whitelists
|
||||
- kernel-abi-stablelists
|
||||
- xz
|
||||
- bzip2
|
||||
- gzip
|
||||
|
Loading…
Reference in New Issue
Block a user