Hi!
Pushed after moving the getpwnam() into setup() (see bellow), thanks.

diff --git a/testcases/kernel/syscalls/acct/acct01.c 
b/testcases/kernel/syscalls/acct/acct01.c
index 8513fdc..ee794cc 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -67,7 +67,7 @@ static struct test_case_t {
 
 char *TCID = "acct01";
 int TST_TOTAL = ARRAY_SIZE(test_cases);
-struct passwd *ltpuser;
+static struct passwd *ltpuser;
 static int exp_enos[] = { EISDIR, EACCES, ENOENT, ENOTDIR, EPERM, 0 };
 
 int main(int argc, char *argv[])
@@ -97,6 +97,8 @@ static void setup(void)
 
        tst_tmpdir();
 
+       ltpuser = SAFE_GETPWNAM(cleanup, "nobody");
+
        fd = SAFE_CREAT(cleanup, TEST_FILE5, 0777);
        SAFE_CLOSE(cleanup, fd);
 
@@ -143,7 +145,6 @@ static void acct_verify(int i)
 
 static void setup2(void)
 {
-       ltpuser = SAFE_GETPWNAM(cleanup, "nobody");
        SAFE_SETEUID(cleanup, ltpuser->pw_uid);
 }

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to