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