[PATCH] test-patchset: allow proper support for randconfig
Jacob Keller
jacob.e.keller at intel.com
Thu Jul 10 16:38:12 PDT 2014
Make randconfig pre-generate a configuration so that the pre and post
patch series builds use the same configuration (vs using random configs
each time). In addition, append the random configuration whenever there
is a build diff, so that the user can see.
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---
aiaiai-test-patchset | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
index d65f699c3251..da08b31b9867 100755
--- a/aiaiai-test-patchset
+++ b/aiaiai-test-patchset
@@ -160,11 +160,6 @@ test_configuration()
[ -z "$arch" ] || arch_opt="-a $arch${cross:+",$cross"}"
- if [ -n "$confdir" ]; then
- defconfig="$confdir/$defconfig"
- [ -f "$defconfig" ] || die "$defconfig is not available"
- fi
-
if [ -n "$bisectability" ]; then
# We share the same source tree with 'aiaiai-test-bisectability', so
# wait for it (it could be run at the previous iteration)
@@ -179,6 +174,23 @@ test_configuration()
git --git-dir="$(git_dir "$cloned_kernel1")" reset $quiet --hard "$commit_id1" >&2
+ # Enable use of a random condiguration that is stable between the
+ # before and after tests. If we just used 'randconfig' by default, then
+ # we wouldn't be testing the before and after kernels with the same
+ # configuration. We do this even if we have specified a confdir.
+ if [ "$defconfig" = "randconfig" ]; then
+ # Generate a random configuration
+ make -C $cloned_kernel1 ${arch:+ARCH="$arch"} \
+ ${cross:+CROSS_COMPILE="$cross"} -- "$defconfig"
+
+ # Store this configuration in our temporary work dir
+ defconfig="$tmpdir/$config.random"
+ cp .config "$defconfig"
+ elif [ -n "$confdir" ]; then
+ defconfig="$confdir/$defconfig"
+ [ -f "$defconfig" ] || die "$defconfig is not available"
+ fi
+
verbose "Build non-patched kernel (\"$cloned_kernel1\", configuration \"$config\")"
local log1="$logdir1/$config"
@@ -524,6 +536,11 @@ for defconfig in $defconfigs; do
fi
cat "$tmpdir/$defconfig.stderr.diff"
+
+ if [ -f "$tmpdir/$defconfig.config" ]; then
+ printf "\n%s\n" "For reference, the random configuration used was:"
+ cat "$tmpdir/$defconfig.config"
+ fi
else
printf "\n%s\n" "Successfully built configuration \"$defconfig\", no issues."
fi
--
2.0.1.475.g9b8d714
More information about the aiaiai
mailing list