# - 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
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
# 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
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