* [LTP] [PATCH 1/3] Fixed compile errors in crasher.c
@ 2014-01-22 22:13 Sweekar Pinto
2014-02-13 17:50 ` chrubis
0 siblings, 1 reply; 3+ messages in thread
From: Sweekar Pinto @ 2014-01-22 22:13 UTC (permalink / raw)
To: ltp-list; +Cc: lisa.vaz
-Conditional inclusion of asm.h for kernel > 3.4
-The owner field of proc_dir_entry has been removed
Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
---
testcases/kdump/lib/crasher/crasher.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/testcases/kdump/lib/crasher/crasher.c b/testcases/kdump/lib/crasher/crasher.c
index bc192dc..2b01412 100644
--- a/testcases/kdump/lib/crasher/crasher.c
+++ b/testcases/kdump/lib/crasher/crasher.c
@@ -25,7 +25,10 @@
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
+#endif
MODULE_LICENSE("GPL");
@@ -46,7 +49,7 @@ static int crasher_write(struct file *file, const char *buffer,
unsigned long count, void *data)
{
char value, *a;
- spinlock_t mylock = SPIN_LOCK_UNLOCKED;
+ DEFINE_SPINLOCK(mylock);
/* grab the first byte the user gave us, ignore the rest */
if (copy_from_user(&value, buffer, 1))
@@ -94,7 +97,6 @@ int crasher_init(void)
crasher_proc->read_proc = crasher_read;
crasher_proc->write_proc = crasher_write;
- crasher_proc->owner = THIS_MODULE;
return 0;
}
--
1.7.1
From f58a6316dc168781daa76edf4d78a217e2af2628 Mon Sep 17 00:00:00 2001
From: Sweekar Pinto <sweekar.pinto@oracle.com>
Date: Wed, 22 Jan 2014 17:05:01 -0500
Subject: [PATCH 2/3] Fix passwordless ssh for network(ssh) dump test
-Force ssh to use kdumps rsa key to run commands remotely
Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
---
testcases/kdump/runkdump.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/kdump/runkdump.sh b/testcases/kdump/runkdump.sh
index e2e681c..cd6ee1c 100755
--- a/testcases/kdump/runkdump.sh
+++ b/testcases/kdump/runkdump.sh
@@ -95,7 +95,7 @@ PrepareVerify ()
exit 1
fi
- file=$(ssh "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore \
+ file=$(ssh -i ~/.ssh/kdump_id_rsa "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore* \
2>/dev/null | head -1")
mkdir -p "${COREDIR}/${last}"
@@ -103,7 +103,7 @@ PrepareVerify ()
if [ "${file}" ]; then
# Not fatal error.
set +e
- scp "${SCP_PATH}:${file}" "${COREDIR}/${last}"
+ scp -i ~/.ssh/kdump_id_rsa "${SCP_PATH}:${file}" "${COREDIR}/${last}"
set -e
fi
@@ -116,7 +116,7 @@ PrepareVerify ()
COREDIR=/mnt"${COREDIR}"
fi
- vmcore=$(ls -t "${COREDIR}"/*/vmcore 2>/dev/null | head -1)
+ vmcore=$(ls -t "${COREDIR}"/*/vmcore* 2>/dev/null | head -1)
}
VerifyTest ()
--
1.7.1
From 76ab06883327fdcdf038af5dd96a036e0b077818 Mon Sep 17 00:00:00 2001
From: Sweekar Pinto <sweekar.pinto@oracle.com>
Date: Wed, 22 Jan 2014 17:08:23 -0500
Subject: [PATCH 3/3] Change crashkernel param to 256M@128M
-Change the crashkernel parm of x86 and default arch to 256M@128M as this is found to be the best fit
Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
---
testcases/kdump/lib/setup.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kdump/lib/setup.sh b/testcases/kdump/lib/setup.sh
index 5bc54bb..3e53f1a 100755
--- a/testcases/kdump/lib/setup.sh
+++ b/testcases/kdump/lib/setup.sh
@@ -86,11 +86,11 @@ echo "Modify Boot Loader."
if [ "${arch}" = "ppc64" ]; then
args="crashkernel=256M@32M xmon=off"
elif [ "${arch}" = "i686" ]; then
- args="crashkernel=128M@16M nmi_watchdog=1"
+ args="crashkernel=256M@128M nmi_watchdog=1"
elif [ "${arch}" = "ia64" ]; then
args="crashkernel=512M@256M"
else
- args="crashkernel=128M@16M"
+ args="crashkernel=256M@128M"
fi
if [ -x "/sbin/grubby" ]; then
--
1.7.1
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/3] Fixed compile errors in crasher.c
2014-01-22 22:13 [LTP] [PATCH 1/3] Fixed compile errors in crasher.c Sweekar Pinto
@ 2014-02-13 17:50 ` chrubis
[not found] ` <5301EB5E.2010606@oracle.com>
0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2014-02-13 17:50 UTC (permalink / raw)
To: Sweekar Pinto; +Cc: lisa.vaz, ltp-list
Hi!
The whole patchset is send in one email and 'git am' applies only the
first patch. Can you please resend it correctly?
> -Conditional inclusion of asm.h for kernel > 3.4
> -The owner field of proc_dir_entry has been removed
When was this removed? If this is relatively recent change we should add
an ifdef around the initalization instead of removing it.
> Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
> ---
> testcases/kdump/lib/crasher/crasher.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kdump/lib/crasher/crasher.c b/testcases/kdump/lib/crasher/crasher.c
> index bc192dc..2b01412 100644
> --- a/testcases/kdump/lib/crasher/crasher.c
> +++ b/testcases/kdump/lib/crasher/crasher.c
> @@ -25,7 +25,10 @@
> #include <linux/proc_fs.h>
> #include <linux/spinlock.h>
> #include <asm/uaccess.h>
> +#include <linux/version.h>
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
> #include <asm/system.h>
> +#endif
The inner include should look like:
# include <asm/system.h>
> MODULE_LICENSE("GPL");
>
> @@ -46,7 +49,7 @@ static int crasher_write(struct file *file, const char *buffer,
> unsigned long count, void *data)
> {
> char value, *a;
> - spinlock_t mylock = SPIN_LOCK_UNLOCKED;
> + DEFINE_SPINLOCK(mylock);
>
> /* grab the first byte the user gave us, ignore the rest */
> if (copy_from_user(&value, buffer, 1))
> @@ -94,7 +97,6 @@ int crasher_init(void)
>
> crasher_proc->read_proc = crasher_read;
> crasher_proc->write_proc = crasher_write;
> - crasher_proc->owner = THIS_MODULE;
> return 0;
> }
>
> --
> 1.7.1
>
>
> >From f58a6316dc168781daa76edf4d78a217e2af2628 Mon Sep 17 00:00:00 2001
> From: Sweekar Pinto <sweekar.pinto@oracle.com>
> Date: Wed, 22 Jan 2014 17:05:01 -0500
> Subject: [PATCH 2/3] Fix passwordless ssh for network(ssh) dump test
>
> -Force ssh to use kdumps rsa key to run commands remotely
>
> Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
> ---
> testcases/kdump/runkdump.sh | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kdump/runkdump.sh b/testcases/kdump/runkdump.sh
> index e2e681c..cd6ee1c 100755
> --- a/testcases/kdump/runkdump.sh
> +++ b/testcases/kdump/runkdump.sh
> @@ -95,7 +95,7 @@ PrepareVerify ()
> exit 1
> fi
>
> - file=$(ssh "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore \
> + file=$(ssh -i ~/.ssh/kdump_id_rsa "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore* \
> 2>/dev/null | head -1")
>
> mkdir -p "${COREDIR}/${last}"
> @@ -103,7 +103,7 @@ PrepareVerify ()
> if [ "${file}" ]; then
> # Not fatal error.
> set +e
> - scp "${SCP_PATH}:${file}" "${COREDIR}/${last}"
> + scp -i ~/.ssh/kdump_id_rsa "${SCP_PATH}:${file}" "${COREDIR}/${last}"
> set -e
> fi
>
> @@ -116,7 +116,7 @@ PrepareVerify ()
> COREDIR=/mnt"${COREDIR}"
> fi
>
> - vmcore=$(ls -t "${COREDIR}"/*/vmcore 2>/dev/null | head -1)
> + vmcore=$(ls -t "${COREDIR}"/*/vmcore* 2>/dev/null | head -1)
This change is not explained in the commit message.
> }
>
> VerifyTest ()
> --
> 1.7.1
>
>
> >From 76ab06883327fdcdf038af5dd96a036e0b077818 Mon Sep 17 00:00:00 2001
> From: Sweekar Pinto <sweekar.pinto@oracle.com>
> Date: Wed, 22 Jan 2014 17:08:23 -0500
> Subject: [PATCH 3/3] Change crashkernel param to 256M@128M
>
> -Change the crashkernel parm of x86 and default arch to 256M@128M as this is found to be the best fit
Can you elaborate further? The kernel documentation
(Documentation/kdump/kdump.txt) still says 64M@16M.
Also format the commit message to 80 chars.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/3] Fixed compile errors in crasher.c
[not found] ` <5301EB5E.2010606@oracle.com>
@ 2014-02-19 17:51 ` chrubis
0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2014-02-19 17:51 UTC (permalink / raw)
To: Sweekar Pinto; +Cc: lisa.vaz, ltp-list
Hi!
> >> Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
> >> ---
> >> testcases/kdump/lib/crasher/crasher.c | 6 ++++--
> >> 1 files changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/testcases/kdump/lib/crasher/crasher.c b/testcases/kdump/lib/crasher/crasher.c
> >> index bc192dc..2b01412 100644
> >> --- a/testcases/kdump/lib/crasher/crasher.c
> >> +++ b/testcases/kdump/lib/crasher/crasher.c
> >> @@ -25,7 +25,10 @@
> >> #include <linux/proc_fs.h>
> >> #include <linux/spinlock.h>
> >> #include <asm/uaccess.h>
> >> +#include <linux/version.h>
> >> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
> >> #include <asm/system.h>
> >> +#endif
> > The inner include should look like:
> >
> > # include <asm/system.h>
> Not sure what you mean here?
Just indentation of the inner include blocks. The preprocesor directives
are usually indented by spaces between the # and the keyword such as:
#ifdef ...
# if ...
# include ...
# endif
#endif
> >> MODULE_LICENSE("GPL");
> >>
> >> @@ -46,7 +49,7 @@ static int crasher_write(struct file *file, const char *buffer,
> >> unsigned long count, void *data)
> >> {
> >> char value, *a;
> >> - spinlock_t mylock = SPIN_LOCK_UNLOCKED;
> >> + DEFINE_SPINLOCK(mylock);
> >>
> >> /* grab the first byte the user gave us, ignore the rest */
> >> if (copy_from_user(&value, buffer, 1))
> >> @@ -94,7 +97,6 @@ int crasher_init(void)
> >>
> >> crasher_proc->read_proc = crasher_read;
> >> crasher_proc->write_proc = crasher_write;
> >> - crasher_proc->owner = THIS_MODULE;
> >> return 0;
> >> }
> >>
> >> --
> >> 1.7.1
> >>
> >>
> >> >From f58a6316dc168781daa76edf4d78a217e2af2628 Mon Sep 17 00:00:00 2001
> >> From: Sweekar Pinto <sweekar.pinto@oracle.com>
> >> Date: Wed, 22 Jan 2014 17:05:01 -0500
> >> Subject: [PATCH 2/3] Fix passwordless ssh for network(ssh) dump test
> >>
> >> -Force ssh to use kdumps rsa key to run commands remotely
> >>
> >> Signed-off-by: Sweekar Pinto <sweekar.pinto@oracle.com>
> >> ---
> >> testcases/kdump/runkdump.sh | 6 +++---
> >> 1 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/testcases/kdump/runkdump.sh b/testcases/kdump/runkdump.sh
> >> index e2e681c..cd6ee1c 100755
> >> --- a/testcases/kdump/runkdump.sh
> >> +++ b/testcases/kdump/runkdump.sh
> >> @@ -95,7 +95,7 @@ PrepareVerify ()
> >> exit 1
> >> fi
> >>
> >> - file=$(ssh "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore \
> >> + file=$(ssh -i ~/.ssh/kdump_id_rsa "${SCP_PATH}" "ls -t ${COREDIR}/*/vmcore* \
> >> 2>/dev/null | head -1")
> >>
> >> mkdir -p "${COREDIR}/${last}"
> >> @@ -103,7 +103,7 @@ PrepareVerify ()
> >> if [ "${file}" ]; then
> >> # Not fatal error.
> >> set +e
> >> - scp "${SCP_PATH}:${file}" "${COREDIR}/${last}"
> >> + scp -i ~/.ssh/kdump_id_rsa "${SCP_PATH}:${file}" "${COREDIR}/${last}"
> >> set -e
> >> fi
> >>
> >> @@ -116,7 +116,7 @@ PrepareVerify ()
> >> COREDIR=/mnt"${COREDIR}"
> >> fi
> >>
> >> - vmcore=$(ls -t "${COREDIR}"/*/vmcore 2>/dev/null | head -1)
> >> + vmcore=$(ls -t "${COREDIR}"/*/vmcore* 2>/dev/null | head -1)
> Some versions of kexec-tools append the date to the vmcore file. Hence
> the vmcore*.
This is missing from the commit message. Imagine that you are trying to
figure out why this change was needed, without a proper description in
the commit message this will take hours to figure out.
> > This change is not explained in the commit message.
> >
> >> }
> >>
> >> VerifyTest ()
> >> --
> >> 1.7.1
> >>
> >>
> >> >From 76ab06883327fdcdf038af5dd96a036e0b077818 Mon Sep 17 00:00:00 2001
> >> From: Sweekar Pinto <sweekar.pinto@oracle.com>
> >> Date: Wed, 22 Jan 2014 17:08:23 -0500
> >> Subject: [PATCH 3/3] Change crashkernel param to 256M@128M
> >>
> >> -Change the crashkernel parm of x86 and default arch to 256M@128M as this is found to be the best fit
> > Can you elaborate further? The kernel documentation
> > (Documentation/kdump/kdump.txt) still says 64M@16M.
> We always get a "crashkernel reservation failed - memory is in use" with
> crashkernel=64M@16M on all of our test hardware.
> 256M@128M seems to be the best fit based on empirical data.
Ok, this explanation should be in the commit message so that anybody who
looks at the commit can figure out why the numbers were changed this
way.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-19 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 22:13 [LTP] [PATCH 1/3] Fixed compile errors in crasher.c Sweekar Pinto
2014-02-13 17:50 ` chrubis
[not found] ` <5301EB5E.2010606@oracle.com>
2014-02-19 17:51 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox