Remove dead code

Garret is not as pedantic as he was before.

Moreover since we now have a function to propagate exit value from a
child process, limited amount of tst_* functions can be used in child
processes as well.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/lib/Makefile b/lib/Makefile
index c92225c..24d1faa 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -26,8 +26,6 @@
 
 CFLAGS			+= -I.
 
-#CPPFLAGS		+= -DGARRETT_IS_A_PEDANTIC_BASTARD
-
 FILTER_OUT_LIBSRCS	:= mount_utils.c
 
 LIB			:= libltp.a
diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index 1249ce9..2ec4d0c 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -53,10 +53,6 @@
 /* The timing information block. */
 struct tblock tblock = { 0, ((long)-1) >> 1, 0, 0 };
 
-#ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-extern pid_t spawned_program_pid;
-#endif
-
 /* Define flags and args for standard options */
 int STD_TIMING_ON = 0;		/* flag indicating to print timing stats */
 static int STD_PAUSE = 0;	/* flag indicating to pause before actual start, */
@@ -180,11 +176,6 @@
 	 * If not the first time this function is called, release the old STD_opt_arr
 	 * vector.
 	 */
-
-#ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-	spawned_program_pid = getpid();
-#endif
-
 	if (STD_opt_arr != NULL) {
 		free(STD_opt_arr);
 		STD_opt_arr = NULL;
diff --git a/lib/tst_res.c b/lib/tst_res.c
index 7619ea2..02fb04a 100644
--- a/lib/tst_res.c
+++ b/lib/tst_res.c
@@ -83,11 +83,6 @@
 int TEST_ERRNO;
 struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO];
 
-/* Break bad habits. */
-#ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-pid_t spawned_program_pid;
-#endif
-
 #define VERBOSE      1		/* flag values for the T_mode variable */
 #define NOPASS       3
 #define DISCARD      4
@@ -373,27 +368,6 @@
 	char message[USERMESG];
 	size_t size;
 
-#ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-	/* Don't execute these APIs unless you have the same pid as main! */
-	if (spawned_program_pid != 0) {
-		/*
-		 * Die quickly and noisily so people get the cluebat that the
-		 * test needs to be fixed. These APIs should _not_ be called
-		 * from forked processes because of the fact that it can confuse
-		 * end-users with printouts, cleanup will potentially blow away
-		 * directories and/or files still in use introducing
-		 * non-determinism, etc.
-		 *
-		 * assert will not return (by design in accordance with POSIX
-		 * 1003.1) if the assertion fails. Read abort(3) for more
-		 * details. So don't worry about saving / restoring the signal
-		 * handler, unless you have a buggy OS that you've hacked 15
-		 * different ways to Sunday.
-		 */
-		assert(spawned_program_pid == getpid());
-	}
-#endif
-
 #if DEBUG
 	printf("IN tst_print: tnum = %d, ttype = %d, tmesg = %s\n",
 	       tnum, ttype, tmesg);