public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
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: Tue, 07 Jun 2011 16:19:52 +0200	[thread overview]
Message-ID: <4DEE3388.5010307@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: 318 bytes --]

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

[-- 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

             reply	other threads:[~2011-06-07 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 14:19 Jan Stancek [this message]
2011-07-11 13:49 ` [LTP] [PATCH v2] cgroups/cpuacct_setup: fix task_kill() search for process Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2011-04-20 14:00 Jan Stancek

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=4DEE3388.5010307@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