From: Steven Rostedt <rostedt@goodmis.org>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: LKP <lkp@01.org>, linux-kernel@vger.kernel.org
Subject: Re: [ftrace/x86/extable] WARNING: CPU: 0 PID: 1 at init/main.c:803 do_one_initcall()
Date: Sat, 22 Nov 2014 16:53:02 -0500 [thread overview]
Message-ID: <20141122165302.3df22b18@gandalf.local.home> (raw)
In-Reply-To: <20141122195926.GA1707@wfg-t540p.sh.intel.com>
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
On Sat, 22 Nov 2014 11:59:26 -0800
Fengguang Wu <fengguang.wu@intel.com> wrote:
>
> > Is it possible for your tests to see if a branch was rebased before
> > posting bug reports to LKML? This gave me a scare that my new code had
> > the same brain fart in it.
>
> Sure and good idea! I'll implement it right now.
>
It should also make sure that the rebase does not include the offending
commit before not sending out the email. A rebase alone may still have
the bug.
And if you really want to be fancy, you can check to see if the code
itself changed. The attached script takes two git releases (SHA1s,
tags, etc) or one git release and uses HEAD, and finds where the two
are different. Not just by commit id, but also by code. I use this
because I'll modify a branch to add an acked-by and not change the code,
but still want to know the last commit that I tested. It may not have
the same commit id.
-- Steve
[-- Attachment #2: git-find-last-same --]
[-- Type: application/octet-stream, Size: 1093 bytes --]
#!/bin/bash
if [ $# -lt 1 ]; then
echo "usage: git-find-last-same [branch1] branch2"
exit
fi
if [ $# -lt 2 ]; then
b1="HEAD"
b2=$1
else
b1=$1
b2=$2
fi
l1=`git rev-list --reverse $b1..$b2`
c1=`echo "$l1" | wc -l`
if [ $? -gt 0 ]; then
echo error in git
exit
fi
l2=`git rev-list --reverse $b2..$b1`
c2=`echo "$l2" | wc -l`
if [ $? -gt 0 ]; then
echo error in git
exit
fi
if [ $c1 -eq 0 -a $c2 -eq 0 ]; then
echo "Branch $b1 and $b2 are equal"
exit
fi
if [ $c1 -eq 0 ]; then
echo "Branch $b2 can be fast forward to $b1 in $c2 commits"
exit
fi
if [ $c2 -eq 0 ]; then
echo "Branch $b1 can be fast forward to $b2 in $c1 commits"
exit
fi
if [ $c1 -gt $c2 ]; then
s1="$l2"
s2="$l1"
else
s1="$l1"
s2="$l2"
fi
t1=`echo "$s2" | sed -ne '1p' `
t2=`echo "$s2" | sed -ne '2,$p' `
for t1 in $s1; do
t2=`echo "$s2" | sed -ne '1p' `
s2=`echo "$s2" | sed -ne '2,$p' `
if ! git diff --quiet $t1 $t2; then
break
fi
done
echo "first diff between $t1 and $t2"
t1=`git rev-list --max-count=1 $t1~1`
t2=`git rev-list --max-count=1 $t2~1`
echo "first same between $t1 and $t2"
next prev parent reply other threads:[~2014-11-22 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-22 18:43 Fengguang Wu
2014-11-22 19:11 ` Steven Rostedt
2014-11-22 19:59 ` Fengguang Wu
2014-11-22 21:53 ` Steven Rostedt [this message]
2014-11-23 5:06 ` Fengguang Wu
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=20141122165302.3df22b18@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®