All of lore.kernel.org
 help / color / mirror / Atom feed
From: Domen Puncer <domen@coderock.org>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] Importance of compile testing
Date: Wed, 13 Jul 2005 18:31:20 +0000	[thread overview]
Message-ID: <20050713183120.GF21831@homer.coderock.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

Hi.

After compile failures in patches from four different authors I
think it's time to repeat that compile tests are important for
patches.
Even when you do a simple fix, and you are sure nothing can go
wrong. Murphy's law applies here as well. :-)

I know it's easy to forget it, I sure have a couple of times.


I'm attaching a script I use for compile tests; yes it's stupid,
but it can catch warnings on other architecture even without
cross toolchains.
It assumes you are in kernel directory, and have already ran
"make" there. Takes only .bz2 patchsets, but that's trivial
to change.

When it finishes, you just type what the  last line says:
"diff -u out.clean out.kj | less -p '^\+'", look at warnings
and press 'n' till you get to the end.


	Domen

[-- Attachment #2: kj_compile_test --]
[-- Type: text/plain, Size: 438 bytes --]

#!/bin/bash
if [ "$1" == "" ]; then
	echo "usage $0 patchset.bz2"
	exit 1
fi

# TODO test if applies cleanly, if right dir?

echo "[1/4] applying patch"
bzcat $1 | patch -sp1
echo "[2/4] compiling"
compile-test-bz-patchset $1 > out.kj
echo "[3/4] unapplying patch"
bzcat $1 | patch -sRp1
echo "[4/4] compiling"
compile-test-bz-patchset $1 > out.clean

echo "output in out.kj and out.clean"
echo "diff -u out.clean out.kj | less -p '^\+'"

[-- Attachment #3: compile-test-bz-patchset --]
[-- Type: text/plain, Size: 154 bytes --]

#!/bin/bash
bzcat $@ | egrep '^\+\+\+' | cut -f1 | cut -f2- -d'/' | egrep '\.[chS]$' | sed 's/\.[chS]$/.o/' | xargs -n1 make 2>&1 | sed 's/:[0-9]\+:/:/g'

[-- Attachment #4: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-07-13 18:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050713183120.GF21831@homer.coderock.org \
    --to=domen@coderock.org \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.