mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Added 'make headers_check', 'make checkstack' and 'make namespacecheck'.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -38,7 +38,10 @@
|
||||
# - Apply the SCST kernel patch to the kernel tree.
|
||||
# - Run 'make allmodconfig'.
|
||||
# - Run the sparse source code checker on the SCST directory.
|
||||
# - Run 'make headers_check'.
|
||||
# - Compile the kernel tree.
|
||||
# - Run 'make checkstack'.
|
||||
# - Run 'make namespacecheck'.
|
||||
#
|
||||
# Note: the results of the individual steps are not verified by this script
|
||||
# -- the output generated by the individual steps has to be verified by
|
||||
@@ -298,7 +301,55 @@ function run_sparse {
|
||||
cd "${outputdir}/linux-$1" \
|
||||
&& make -s prepare \
|
||||
&& make -s scripts \
|
||||
&& LC_ALL=C make -s -k C=2 M=drivers/scst
|
||||
&& LC_ALL=C make -k C=2 M=drivers/scst
|
||||
) >& "${outputfile}"
|
||||
echo "See also ${outputfile}."
|
||||
return 0
|
||||
}
|
||||
|
||||
function run_checkstack {
|
||||
local kver="$(kernel_version $1)"
|
||||
local plevel="$(patchlevel $1)"
|
||||
local outputfile="${outputdir}/checkstack-$1-output.txt"
|
||||
|
||||
echo "Running checkstack on the patched $1 kernel ..."
|
||||
(
|
||||
cd "${outputdir}/linux-$1" \
|
||||
&& make -s prepare \
|
||||
&& make -s scripts \
|
||||
&& LC_ALL=C make -k checkstack
|
||||
) >& "${outputfile}"
|
||||
echo "See also ${outputfile}."
|
||||
return 0
|
||||
}
|
||||
|
||||
function run_namespacecheck {
|
||||
local kver="$(kernel_version $1)"
|
||||
local plevel="$(patchlevel $1)"
|
||||
local outputfile="${outputdir}/namespacecheck-$1-output.txt"
|
||||
|
||||
echo "Running namespacecheck on the patched $1 kernel ..."
|
||||
(
|
||||
cd "${outputdir}/linux-$1" \
|
||||
&& make -s prepare \
|
||||
&& make -s scripts \
|
||||
&& LC_ALL=C make -k namespacecheck
|
||||
) >& "${outputfile}"
|
||||
echo "See also ${outputfile}."
|
||||
return 0
|
||||
}
|
||||
|
||||
function run_headers_check {
|
||||
local kver="$(kernel_version $1)"
|
||||
local plevel="$(patchlevel $1)"
|
||||
local outputfile="${outputdir}/headers_check-$1-output.txt"
|
||||
|
||||
echo "Running headers check on the patched $1 kernel ..."
|
||||
(
|
||||
cd "${outputdir}/linux-$1" \
|
||||
&& make -s prepare \
|
||||
&& make -s scripts \
|
||||
&& LC_ALL=C make -k headers_check
|
||||
) >& "${outputfile}"
|
||||
echo "See also ${outputfile}."
|
||||
return 0
|
||||
@@ -345,8 +396,8 @@ fi
|
||||
|
||||
# Default kernel versions to use for the test.
|
||||
if [ "${kernel_versions}" = "" ]; then
|
||||
#kernel_versions="2.6.24.7 2.6.25.20 2.6.26.8 2.6.27.6"
|
||||
kernel_versions="2.6.27.6"
|
||||
#kernel_versions="2.6.24.7 2.6.25.20 2.6.26.8 2.6.27.7"
|
||||
kernel_versions="2.6.27.7"
|
||||
fi
|
||||
|
||||
|
||||
@@ -367,7 +418,10 @@ do
|
||||
run_checkpatch $k
|
||||
patch_and_configure_kernel $k
|
||||
run_sparse $k
|
||||
run_headers_check $k
|
||||
compile_patched_kernel $k
|
||||
run_checkstack $k
|
||||
run_namespacecheck $k
|
||||
else
|
||||
echo "FAILED for kernel $k"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user