syscalls: Remove acct02.

This adds a test for EPERM with acct(NULL) to acct01 and drops acct02
which is messy and all the cases are now covered by the acct01.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/doc/testcases/kernel.txt b/doc/testcases/kernel.txt
index e84e1ae..9d181fd 100644
--- a/doc/testcases/kernel.txt
+++ b/doc/testcases/kernel.txt
@@ -688,16 +688,6 @@
 		ltp/testcases/kernel/syscalls/acct/acct01.c
 	<\test_location>
 <\testname>
-<testname=acct02>
-	<description>
-		Issues calls to acct() and tests the returned values against expected
-		results
-
-	<\description>
-	<test_location>
-		ltp/testcases/kernel/syscalls/acct/acct02.c
-	<\test_location>
-<\testname>
 <testname=adjtimex01>
 	<description>
 		Basic test for adjtimex().
diff --git a/runtest/ltplite b/runtest/ltplite
index 8ff55ee..60140e2 100644
--- a/runtest/ltplite
+++ b/runtest/ltplite
@@ -68,7 +68,6 @@
 access05 access05
 
 acct01 acct01
-acct02 acct02
 
 adjtimex01 adjtimex01
 adjtimex02 adjtimex02
diff --git a/runtest/stress.part3 b/runtest/stress.part3
index 0533d4d..7e7f1b7 100644
--- a/runtest/stress.part3
+++ b/runtest/stress.part3
@@ -10,7 +10,6 @@
 access05 access05
 
 acct01 acct01
-acct02 acct02
 
 adjtimex01 adjtimex01
 adjtimex02 adjtimex02
diff --git a/runtest/syscalls b/runtest/syscalls
index 09e5f7f..0486b95 100644
--- a/runtest/syscalls
+++ b/runtest/syscalls
@@ -11,7 +11,6 @@
 access05 access05
 
 acct01 acct01
-acct02 acct02
 
 add_key01 add_key01
 add_key02 add_key02
diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore
index ad23c2e..0effa6b 100644
--- a/testcases/kernel/syscalls/.gitignore
+++ b/testcases/kernel/syscalls/.gitignore
@@ -7,7 +7,6 @@
 /access/access04
 /access/access05
 /acct/acct01
-/acct/acct02
 /add_key/add_key01
 /add_key/add_key02
 /adjtimex/adjtimex01
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index ee794cc..c38d4db 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -63,6 +63,7 @@
 	{TEST_FILE3, "ENOENT",  ENOENT,  NULL,   NULL},
 	{TEST_FILE4, "ENOTDIR", ENOTDIR, NULL,   NULL},
 	{TEST_FILE5, "EPERM",   EPERM,   setup2, cleanup2},
+	{NULL,       "EPERM",   EPERM,   setup2, cleanup2},
 };
 
 char *TCID = "acct01";
diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c
deleted file mode 100644
index f1c7bf6..0000000
--- a/testcases/kernel/syscalls/acct/acct02.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- *   Copyright (c) International Business Machines  Corp., 2002
- *
- *   This program is free software;  you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
- *   the GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program;  if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* 12/03/2002   Port to LTP     robbiew@us.ibm.com */
-/* 06/30/2001	Port to Linux	nsharoff@us.ibm.com */
-
-/*
- * NAME
- *	acct02.c  -- test acct
- *
- * CALLS
- *	acct
- *
- * ALGORITHM
- *	issue calls to acct and test the returned values against
- *	expected results
- *
- * RESTRICTIONS
- *	This must run root since the acct call may only be done
- *	by root.   Use the TERM flag, to clean up files.
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <sys/types.h>
-
-/** LTP Port **/
-#include "test.h"
-#include "usctest.h"
-
-#define FAILED 0
-#define PASSED 1
-
-char *TCID = "acct02";
-int TST_TOTAL = 2;
-/**************/
-
-char fname[80];
-struct passwd *ltpuser;
-
-/*--------------------------------------------------------------*/
-int main(argc, argv)
-int argc;
-char *argv[];
-{
-
-	/* Get the user id "nobody" */
-	if ((ltpuser = getpwnam("nobody")) == NULL) {
-		tst_resm(TBROK, "nobody not found in /etc/passwd");
-		tst_exit();
-	}
-
-	/* Switch to "nobody" */
-	setuid(ltpuser->pw_uid);
-
-/*--------------------------------------------------------------*/
-
-	/* Attempt to turn off acct as non-root
-	 */
-	if (acct(NULL) != -1) {
-		tst_resm(TBROK | TERRNO,
-			 "Non-root attempting to disable acct: didn't fail");
-		tst_exit();
-	}
-
-	if (errno != EPERM) {
-		if (errno == ENOSYS) {
-			tst_resm(TCONF,
-				 "BSD process accounting is not configured in this kernel.");
-			tst_resm(TCONF, "Test will not run.");
-			tst_exit();
-		} else {
-			tst_resm(TBROK | TERRNO,
-				 "Non-root acct disable failed as we wanted EPERM errno");
-			tst_exit();
-		}
-	} else
-		tst_resm(TPASS, "Received expected error: EPERM");
-
-//-------------------------------------------------
-	if (acct("/anystring") != -1) {
-		tst_resm(TBROK | TERRNO,
-			 "Non-root attempting to enable acct: didn't fail");
-		tst_exit();
-	}
-
-	if (errno != EPERM) {
-		tst_resm(TFAIL | TERRNO,
-			 "Non-root acct enable failed as we wanted EPERM errno");
-		tst_exit();
-	} else
-		tst_resm(TPASS, "Received expected error: EPERM");
-
-//-------------------------------------------------
-
-	tst_exit();		/* THIS CALL DOES NOT RETURN - EXITS!!  */
-/*--------------------------------------------------------------*/
-	tst_exit();
-}