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 <[email protected]> --- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
