From: Jan Stancek <jstancek@redhat.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH v2] cgroups/cpuacct_setup: fix task_kill() search for process
Date: Wed, 20 Apr 2011 16:00:38 +0200 [thread overview]
Message-ID: <4DAEE706.309@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
1. "i* in "grep cpuacct_taski*" seems pointless as
its target is cpuacct_task01
2. using cut fails when ps indents the output as following:
99 cpuacct_task01
112 cpuacct_task01
1111 cpuacct_task01
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
.../kernel/controllers/cpuacct/cpuacct_setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Attachment #2: 0001-cgroups-cpuacct_setup-fix-task_kill-search-for-proce.patch --]
[-- Type: text/x-patch, Size: 470 bytes --]
diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
index 47cd1da..2443a28 100755
--- a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
+++ b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
@@ -58,7 +58,7 @@ cleanup ()
}
task_kill ()
{
- for i in `ps -e | grep cpuacct_taski* | cut -d" " -f1`
+ for i in `ps -e | grep cpuacct_task | awk '{print $1}'`
do
kill -SIGUSR1 $i
done
[-- Attachment #3: Type: text/plain, Size: 438 bytes --]
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2011-04-20 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 14:00 Jan Stancek [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-07 14:19 [LTP] [PATCH v2] cgroups/cpuacct_setup: fix task_kill() search for process Jan Stancek
2011-07-11 13:49 ` Cyril Hrubis
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=4DAEE706.309@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/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