summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-test-kernel34
-rw-r--r--tests/bcache/bcache-test-libs.sh2
-rwxr-xr-xvm-start-new7
3 files changed, 29 insertions, 14 deletions
diff --git a/build-test-kernel b/build-test-kernel
index 3f6b11d..e52f3cd 100755
--- a/build-test-kernel
+++ b/build-test-kernel
@@ -30,6 +30,7 @@ WORK_DIR="" # dir where vm meta data (id, logs, etc) gets stored
# defaults: $KERNEL_OUTPUT
BUILD=1 # if set to 1, kernel will build
# ignored with: -K (sets to 0)
+DEPS=1
COVERAGE="" # list of directories to enable code coverage for
NJOBS=$(($(grep -c '^processor' /proc/cpuinfo) * 2))
# number of jobs to passed to make during kernel compile
@@ -81,7 +82,7 @@ fi
CMD="cmd_$1"
shift
-while getopts "hp:k:Kc:i:b:j:ISw:x" arg; do
+while getopts "hp:k:KDc:i:b:j:ISw:x" arg; do
case $arg in
h)
usage
@@ -97,6 +98,9 @@ while getopts "hp:k:Kc:i:b:j:ISw:x" arg; do
K)
BUILD=""
;;
+ D)
+ DEPS=""
+ ;;
c)
if [ ! -d "$OPTARG" ]; then
echo "$OPTARG must be a directory"
@@ -194,25 +198,27 @@ build_kernel()
rm -rf "$KERNEL_OUTPUT"
mkdir -p "$KERNEL_OUTPUT"
- local kconfig="$WORK_DIR/.config"
- local config_tool="$KERNEL_SOURCE/scripts/config"
+ if [[ -n $DEPS ]]; then
+ local kconfig="$WORK_DIR/.config"
+ local config_tool="$KERNEL_SOURCE/scripts/config"
- local OLDIFS=$IFS
- IFS=','
+ [[ -f $kconfig ]] || install -m0644 "$KTESTDIR/defconfig" "$kconfig"
- [[ -f $kconfig ]] || install -m0644 "$KTESTDIR/defconfig" "$kconfig"
+ local OLDIFS=$IFS
+ IFS=','
- for opt in $_KERNEL_CONFIG_REQUIRE; do
- [[ -n $opt ]] && kernel_opt set "$opt"
- done
+ for opt in $_KERNEL_CONFIG_REQUIRE; do
+ [[ -n $opt ]] && kernel_opt set "$opt"
+ done
- do_make olddefconfig
+ do_make olddefconfig
- for opt in $_KERNEL_CONFIG_REQUIRE; do
- [[ -n $opt ]] && kernel_opt check "$opt"
- done
+ for opt in $_KERNEL_CONFIG_REQUIRE; do
+ [[ -n $opt ]] && kernel_opt check "$opt"
+ done
- IFS=$OLDIFS
+ IFS=$OLDIFS
+ fi
do_make
diff --git a/tests/bcache/bcache-test-libs.sh b/tests/bcache/bcache-test-libs.sh
index ee66f8f..9454573 100644
--- a/tests/bcache/bcache-test-libs.sh
+++ b/tests/bcache/bcache-test-libs.sh
@@ -227,6 +227,8 @@ setup_bcache() {
echo $size > $file
done
done
+
+ ln -s /sys/fs/bcache/*-* /root/c || true
}
stop_volumes()
diff --git a/vm-start-new b/vm-start-new
index dc7f6cd..38eb085 100755
--- a/vm-start-new
+++ b/vm-start-new
@@ -104,6 +104,12 @@ def vm_run(opts, vmdir, vm_nr):
stdin=subprocess.PIPE))
def vm_cleanup(vmdir):
+ try:
+ while True:
+ os.wait()
+ except:
+ pass
+
while os.path.isdir(vmdir):
shutil.rmtree(vmdir, ignore_errors=True)
@@ -306,6 +312,7 @@ def cmd_help():
# Allow exit handlers to be called
for sig in (signal.SIGHUP,
+ signal.SIGINT,
signal.SIGQUIT,
signal.SIGILL,
signal.SIGABRT,