test: add slow test for rebuilding entire tree

Only gets run with the slow integration tests, not "make quick".
This commit is contained in:
Josh Poimboeuf 2014-09-15 08:20:43 -05:00
parent 33cd945b14
commit 1ee3ae669f
4 changed files with 20 additions and 6 deletions

View File

@ -28,6 +28,8 @@
#
# - foo.patch: patch that should build successfully
#
# - foo-SLOW.patch: patch that should be skipped in the quick test
#
# - bar-FAIL.patch: patch that should fail to build
#
# - foo-LOADED.test: executable which tests whether the foo.patch module is
@ -103,7 +105,7 @@ build_module() {
[[ $prefix = COMBINED ]] && return
if [[ $prefix = *-FAIL ]]; then
if [[ $prefix =~ -FAIL ]]; then
shouldfail=1
else
shouldfail=0
@ -132,7 +134,7 @@ run_load_test() {
testprog=$prefix-LOADED.test
[[ $prefix = COMBINED ]] && return
[[ $prefix = *-FAIL ]] && return
[[ $prefix =~ -FAIL ]] && return
if [[ ! -e $module ]]; then
log "can't find $module, skipping"
@ -208,8 +210,8 @@ build_combined_module() {
for file in *.patch; do
prefix=${file%%.patch}
[[ $prefix = *-FAIL ]] && continue
[[ $prefix = meminfo-cmdline ]] && continue # HACK
[[ $prefix =~ -FAIL ]] && continue
[[ $prefix =~ -SLOW ]] && continue
log "combine: $prefix"

View File

@ -15,7 +15,7 @@ Index: src/fs/proc/meminfo.c
===================================================================
--- src.orig/fs/proc/meminfo.c
+++ src/fs/proc/meminfo.c
@@ -95,7 +95,7 @@ static int meminfo_proc_show(struct seq_
@@ -131,7 +131,7 @@ static int meminfo_proc_show(struct seq_
"Committed_AS: %8lu kB\n"
"VmallocTotal: %8lu kB\n"
"VmallocUsed: %8lu kB\n"
@ -24,3 +24,15 @@ Index: src/fs/proc/meminfo.c
#ifdef CONFIG_MEMORY_FAILURE
"HardwareCorrupted: %5lu kB\n"
#endif
Index: src/include/linux/kernel.h
===================================================================
--- src.orig/include/linux/kernel.h
+++ src/include/linux/kernel.h
@@ -2,6 +2,7 @@
#define _LINUX_KERNEL_H
+
#include <stdarg.h>
#include <linux/linkage.h>
#include <linux/stddef.h>

View File

@ -27,7 +27,7 @@ test_replace() {
}
# subset
test_replace kpatch-meminfo-cmdline.ko kpatch-cmdline-string.ko
test_replace kpatch-meminfo-cmdline-rebuild-SLOW.ko kpatch-cmdline-string.ko
# disjoint
test_replace kpatch-cmdline-string.ko kpatch-meminfo-string.ko