When TERM environment variable is not available, the case may be fail. The patch use the following steps: 1. unset a predetermined env variable if it's present. 2. set it to a known value 3. Make sure that the env variable set in 2. matches both in the child and parent.
Signed-off-by: Peng Haitao <[email protected]> --- testcases/kernel/syscalls/clone/clone06.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/clone/clone06.c b/testcases/kernel/syscalls/clone/clone06.c index 1734776..5701e4a 100644 --- a/testcases/kernel/syscalls/clone/clone06.c +++ b/testcases/kernel/syscalls/clone/clone06.c @@ -165,6 +165,15 @@ int main(int ac, char **av) void setup() { + char *term; + + term = getenv("TERM"); + if (term) + if (unsetenv("TERM") == -1) + tst_brkm(TBROK|TERRNO, NULL, "unsetenv failed"); + if (setenv("TERM", "xterm", 1) == -1) + tst_brkm(TBROK|TERRNO, NULL, "setenv failed"); + tst_sig(NOFORK, DEF_HANDLER, cleanup); TEST_PAUSE; -- 1.7.1 -- Best Regards, Peng ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
