public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Barry Song <Barry.Song@csr.com>
To: Ltp-list@lists.sourceforge.net
Cc: workgroup.linux@csr.com
Subject: [LTP] [PATCH] thp01: make "true" applet foundable for busybox
Date: Wed, 7 Nov 2012 18:03:21 +0800	[thread overview]
Message-ID: <1352282601-7377-1-git-send-email-Barry.Song@csr.com> (raw)

Many embedded systems use busybox. busybox only has one binary, so it depends
on argv[0] as the applet name to execute right command. in thp01 case, it is
"true" command.
this fixes the issue thp01 case always reports "applet not found" for embedded
systems and make the case pass on those systems using busybox.
At the same time, this fix doesn't destory the validation of the test case.

Signed-off-by: Barry Song <Barry.Song@csr.com>
---
 testcases/kernel/mem/thp/thp01.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/mem/thp/thp01.c b/testcases/kernel/mem/thp/thp01.c
index dec6c24..fbb814e 100644
--- a/testcases/kernel/mem/thp/thp01.c
+++ b/testcases/kernel/mem/thp/thp01.c
@@ -81,7 +81,8 @@ int main(int argc, char **argv)
 		case 0:
 			memset(arg, 'c', length - 1);
 			arg[length - 1] = '\0';
-			for (i = 0; i < ARRAY_SZ - 1; i++)
+			array[0] = "true";
+			for (i = 1; i < ARRAY_SZ - 1; i++)
 				array[i] = arg;
 			array[ARRAY_SZ - 1] = NULL;
 			if (setrlimit(RLIMIT_STACK, &rl) == -1) {
-- 
1.7.0.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2012-11-07 10:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07 10:03 Barry Song [this message]
2012-11-07 11:57 ` [LTP] [PATCH] thp01: make "true" applet foundable for busybox Wanlong Gao

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=1352282601-7377-1-git-send-email-Barry.Song@csr.com \
    --to=barry.song@csr.com \
    --cc=Ltp-list@lists.sourceforge.net \
    --cc=workgroup.linux@csr.com \
    /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