Change tst_resm() followed by tst_exit() to tst_brkm()

Created with coccinelle patch:

@@
expression list L;
expression C != {TINFO, TPASS};
@@
- tst_resm
+ tst_brkm
   (C,
+   NULL,
    L);
- tst_exit();

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/testcases/kernel/containers/mqns/mqns_01.c b/testcases/kernel/containers/mqns/mqns_01.c
index a8e481d..5f0651e 100644
--- a/testcases/kernel/containers/mqns/mqns_01.c
+++ b/testcases/kernel/containers/mqns/mqns_01.c
@@ -109,8 +109,7 @@
 		0777, NULL);
 	if (mqd == -1) {
 		perror("mq_open");
-		tst_resm(TFAIL, "mq_open failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "mq_open failed");
 	}
 
 	tst_resm(TINFO, "Checking namespaces isolation from parent to child");
diff --git a/testcases/kernel/containers/netns/netns_par_chld_ipv6.c b/testcases/kernel/containers/netns/netns_par_chld_ipv6.c
index 1e50f24..e42f31a 100644
--- a/testcases/kernel/containers/netns/netns_par_chld_ipv6.c
+++ b/testcases/kernel/containers/netns/netns_par_chld_ipv6.c
@@ -80,16 +80,15 @@
 		ret = unshare(flags);
 		if (ret < 0) {
 			perror("unshare");
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "Error:Unshare syscall failed for network namespace");
-			tst_exit();
 		}
 #else
 		tst_resm(TCONF, "System doesn't have unshare support");
 #endif
 		if (crtchild(CHILD_SCRIPT, NULL) != 0) {
-			tst_resm(TFAIL, "Failed running child script");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "Failed running child script");
 		}
 	} else {
 
@@ -108,9 +107,9 @@
 		ret = waitpid(pid, &status, __WALL);
 		status = WEXITSTATUS(status);
 		if (status != 0 || ret == -1) {
-			tst_resm(TFAIL, "waitpid() returns %d, errno %d", ret,
+			tst_brkm(TFAIL, NULL,
+				 "waitpid() returns %d, errno %d", ret,
 				 errno);
-			tst_exit();
 		}
 		tst_resm(TPASS, "par child ipv6");
 		tst_exit();
diff --git a/testcases/kernel/containers/netns/netns_two_children_ns.c b/testcases/kernel/containers/netns/netns_two_children_ns.c
index 0a032d0..558c846 100644
--- a/testcases/kernel/containers/netns/netns_two_children_ns.c
+++ b/testcases/kernel/containers/netns/netns_two_children_ns.c
@@ -71,8 +71,7 @@
 	flags |= CLONE_NEWNET;
 
 #if ! HAVE_UNSHARE
-	tst_resm(TCONF, "System doesn't support unshare.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "System doesn't support unshare.");
 #endif
 
 	/* Checking for Kernel Version */
@@ -94,14 +93,14 @@
 			ret = unshare(flags);
 			if (ret < 0) {
 				perror("Unshare");
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Error:Unshare syscall failed for network namespace");
-				tst_exit();
 			}
 #endif
 			if (crtchild(child[i], NULL) != 0) {
-				tst_resm(TFAIL, "Failed running child script");
-				tst_exit();
+				tst_brkm(TFAIL, NULL,
+					 "Failed running child script");
 			}
 		} else {
 			//Parent
@@ -109,9 +108,9 @@
 			ret = system(par[i]);
 			status = WEXITSTATUS(ret);
 			if (ret == -1 || status != 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Error while running the scripts");
-				tst_exit();
 			}
 		}
 	}			//End of FOR Loop
diff --git a/testcases/kernel/containers/sysvipc/mesgq_nstest.c b/testcases/kernel/containers/sysvipc/mesgq_nstest.c
index c2abfab..094972b 100644
--- a/testcases/kernel/containers/sysvipc/mesgq_nstest.c
+++ b/testcases/kernel/containers/sysvipc/mesgq_nstest.c
@@ -99,9 +99,8 @@
 
 	if (argc != 2) {
 		tst_resm(TFAIL, "Usage: %s <clone|unshare|none>", argv[0]);
-		tst_resm(TFAIL, " where clone, unshare, or fork specifies"
+		tst_brkm(TFAIL, NULL, " where clone, unshare, or fork specifies"
 			 " unshare method.");
-		tst_exit();
 	}
 
 	/* Using PIPE's to sync between container and Parent */
@@ -143,8 +142,7 @@
 	/* fire off the test */
 	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_mesgq, NULL);
 	if (ret < 0) {
-		tst_resm(TFAIL, "%s failed", tsttype);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "%s failed", tsttype);
 	}
 
 	close(p1[0]);
diff --git a/testcases/kernel/containers/sysvipc/sem_nstest.c b/testcases/kernel/containers/sysvipc/sem_nstest.c
index 9ba3128..c9881ee 100644
--- a/testcases/kernel/containers/sysvipc/sem_nstest.c
+++ b/testcases/kernel/containers/sysvipc/sem_nstest.c
@@ -82,9 +82,8 @@
 
 	if (argc != 2) {
 		tst_resm(TFAIL, "Usage: %s <clone| unshare| none>", argv[0]);
-		tst_resm(TFAIL, " where clone, unshare, or fork specifies"
+		tst_brkm(TFAIL, NULL, " where clone, unshare, or fork specifies"
 			 " unshare method.");
-		tst_exit();
 	}
 
 	/* Using PIPE's to sync between container and Parent */
@@ -111,14 +110,12 @@
 		perror("Semaphore create");
 		if (errno != EEXIST) {
 			perror("semget failure");
-			tst_resm(TBROK, "Semaphore creation failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "Semaphore creation failed");
 		}
 		id = semget(MY_KEY, 1, 0);
 		if (id == -1) {
 			perror("Semaphore create");
-			tst_resm(TBROK, "Semaphore operation failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "Semaphore operation failed");
 		}
 	}
 
@@ -128,8 +125,7 @@
 	    do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_semaphore,
 				  NULL);
 	if (ret < 0) {
-		tst_resm(TFAIL, "%s failed", tsttype);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "%s failed", tsttype);
 	}
 
 	close(p1[0]);
diff --git a/testcases/kernel/containers/sysvipc/semtest_2ns.c b/testcases/kernel/containers/sysvipc/semtest_2ns.c
index dfe6b45..f309513 100644
--- a/testcases/kernel/containers/sysvipc/semtest_2ns.c
+++ b/testcases/kernel/containers/sysvipc/semtest_2ns.c
@@ -75,15 +75,13 @@
 	/* Checking the semlock and simulating as if the crit-sec is updated */
 	if (semop(id, &semop_lock[0], 2) < 0) {
 		perror("sem lock error");
-		tst_resm(TBROK, "semop failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "semop failed");
 	}
 	tst_resm(TINFO, "Sem1: File locked, Critical section is updated...");
 	sleep(2);
 	if (semop(id, &semop_unlock[0], 1) < 0) {
 		perror("sem unlock error");
-		tst_resm(TBROK, "semop failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "semop failed");
 	}
 }
 
@@ -103,14 +101,12 @@
 		perror("Semaphore create");
 		if (errno != EEXIST) {
 			perror("semget failure");
-			tst_resm(TBROK, "semget failure");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "semget failure");
 		}
 		id1 = semget(MY_KEY, 1, 0);
 		if (id1 == -1) {
 			perror("Semaphore create");
-			tst_resm(TBROK, "semget failure");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "semget failure");
 		}
 	}
 
@@ -201,14 +197,12 @@
 	/* Create 2 containers */
 	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_sem1, NULL);
 	if (ret < 0) {
-		tst_resm(TFAIL, "clone/unshare failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "clone/unshare failed");
 	}
 
 	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_sem2, NULL);
 	if (ret < 0) {
-		tst_resm(TFAIL, "clone/unshare failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "clone/unshare failed");
 	}
 	close(p2[1]);
 	read(p2[0], buf, 7);
diff --git a/testcases/kernel/containers/sysvipc/shmnstest.c b/testcases/kernel/containers/sysvipc/shmnstest.c
index deccc04..1b8aefd 100644
--- a/testcases/kernel/containers/sysvipc/shmnstest.c
+++ b/testcases/kernel/containers/sysvipc/shmnstest.c
@@ -84,9 +84,9 @@
 
 	if (argc != 2) {
 		tst_resm(TFAIL, "Usage: %s <clone|unshare|none>", argv[0]);
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 " where clone, unshare, or fork specifies unshare method.");
-		tst_exit();
 	}
 	if (pipe(p1) == -1) {
 		perror("pipe");
@@ -109,16 +109,14 @@
 	id = shmget(TESTKEY, 100, IPC_CREAT);
 	if (id == -1) {
 		perror("shmget");
-		tst_resm(TFAIL, "shmget failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "shmget failed");
 	}
 
 	tst_resm(TINFO, "shmid namespaces test : %s", tsttype);
 	/* fire off the test */
 	r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmid, NULL);
 	if (r < 0) {
-		tst_resm(TFAIL, "%s failed", tsttype);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "%s failed", tsttype);
 	}
 
 	close(p1[0]);
diff --git a/testcases/kernel/containers/utsname/utstest.c b/testcases/kernel/containers/utsname/utstest.c
index c70f90b..8405297 100644
--- a/testcases/kernel/containers/utsname/utstest.c
+++ b/testcases/kernel/containers/utsname/utstest.c
@@ -134,18 +134,18 @@
 			tst_resm(TPASS, "test 1 (%s): success", tsttype);
 			tst_exit();
 		}
-		tst_resm(TFAIL, "test 1 (%s): hostname 1 %s, hostname 2 %s",
+		tst_brkm(TFAIL, NULL,
+			 "test 1 (%s): hostname 1 %s, hostname 2 %s",
 			 tsttype, hostname, rhostname);
-		tst_exit();
 	case 2:
 		gethostname(hostname, HLEN);
 		picknewhostname(hostname, newhostname);
 		err = sethostname(newhostname, strlen(newhostname));
 		write(p2fd[1], "1", 1);
 		if (err == -1) {
-			tst_resm(TFAIL, "test 2 (%s): failed to sethostname",
+			tst_brkm(TFAIL, NULL,
+				 "test 2 (%s): failed to sethostname",
 				 tsttype);
-			tst_exit();
 		}
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
@@ -153,36 +153,36 @@
 			tst_resm(TPASS, "test 2 (%s): success", tsttype);
 			tst_exit();
 		}
-		tst_resm(TFAIL, "test 2 (%s) hostname 1 %s, hostname 2 %s",
+		tst_brkm(TFAIL, NULL,
+			 "test 2 (%s) hostname 1 %s, hostname 2 %s",
 			 tsttype, newhostname, rhostname);
-		tst_exit();
 	case 3:
 		gethostname(hostname, HLEN);
 		picknewhostname(hostname, newhostname);
 		err = sethostname(newhostname, strlen(newhostname));
 		write(p2fd[1], "1", 1);
 		if (err == -1) {
-			tst_resm(TFAIL, "test 3 (%s): failed to sethostname",
+			tst_brkm(TFAIL, NULL,
+				 "test 3 (%s): failed to sethostname",
 				 tsttype);
-			tst_exit();
 		}
 
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
 		if (strcmp(newhostname, rhostname) == 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "test 3 (%s): hostname 1 %s, hostname 2 %s, these should have been different",
 				 tsttype, newhostname, rhostname);
-			tst_exit();
 		}
 		if (strcmp(hostname, rhostname) == 0) {
 			tst_resm(TPASS, "test 3 (%s): success", tsttype);
 			tst_exit();
 		}
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "test 3 (%s): hostname 1 %s, hostname 2 %s, should have been same",
 			 tsttype, hostname, rhostname);
-		tst_exit();
 
 	case 4:
 		gethostname(hostname, HLEN);
@@ -191,16 +191,16 @@
 		len = read(p1fd[0], rhostname, HLEN);
 		gethostname(newhostname, HLEN);
 		if (strcmp(hostname, newhostname) != 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "test 4 (%s): hostname 1 %s, hostname 2 %s, should be same",
 				 tsttype, hostname, newhostname);
-			tst_exit();
 		}
 		if (strcmp(hostname, rhostname) == 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "test 4 (%s): hostname 1 %s, hostname 2 %s, should be different",
 				 tsttype, hostname, rhostname);
-			tst_exit();
 		}
 		tst_resm(TPASS, "test 4 (%s): successful", tsttype);
 		tst_exit();
@@ -210,10 +210,10 @@
 		len = read(p1fd[0], rhostname, HLEN);
 		gethostname(newhostname, HLEN);
 		if (strcmp(rhostname, newhostname) != 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "test 5 (%s): hostnames %s and %s should be same",
 				 tsttype, rhostname, newhostname);
-			tst_exit();
 		}
 		tst_resm(TPASS, "test 5 (%s): successful", tsttype);
 		tst_exit();
@@ -335,8 +335,7 @@
 		}
 		if (pid == 0) {
 			if (!drop_root()) {
-				tst_resm(TFAIL, "failed to drop root.");
-				tst_exit();
+				tst_brkm(TFAIL, NULL, "failed to drop root.");
 			}
 			r = do_clone_unshare_test(use_clone, CLONE_NEWUTS,
 						  P1, vtest);
diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
index 15259e7..1151b96 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
@@ -139,7 +139,7 @@
 #else
 int main(void)
 {
-	tst_resm(TCONF, "System doesn't have required mempolicy support");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "System doesn't have required mempolicy support");
 }
 #endif
diff --git a/testcases/kernel/controllers/freezer/vfork.c b/testcases/kernel/controllers/freezer/vfork.c
index 371220f..eeec89d 100644
--- a/testcases/kernel/controllers/freezer/vfork.c
+++ b/testcases/kernel/controllers/freezer/vfork.c
@@ -105,8 +105,7 @@
 		else if (child > 0)
 			count--;
 		else {
-			tst_resm(TFAIL | TERRNO, "vfork failed");
-			tst_exit();
+			tst_brkm(TFAIL | TERRNO, NULL, "vfork failed");
 		}
 	}
 
@@ -340,9 +339,8 @@
 
 			/* Set up ptrace */
 			if (ptrace(PTRACE_ATTACH, child, NULL, NULL) == -1) {
-				tst_resm(TBROK | TERRNO,
-					 "ptrace(ATTACH) failed");
-				tst_exit();
+				tst_brkm(TBROK | TERRNO,
+					 NULL, "ptrace(ATTACH) failed");
 			}
 			if (waitpid(child, NULL, 0) != child) {
 				tst_resm(TBROK | TERRNO, "waitpid(%d) failed",
diff --git a/testcases/kernel/fs/ftest/ftest01.c b/testcases/kernel/fs/ftest/ftest01.c
index 09a223f..9800dc5 100644
--- a/testcases/kernel/fs/ftest/ftest01.c
+++ b/testcases/kernel/fs/ftest/ftest01.c
@@ -269,32 +269,32 @@
 	nchunks = max_size / csize;
 
 	if ((bits = calloc((nchunks + 7) / 8, 1)) == 0) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Test broken due to inability of malloc(bits).");
-		tst_exit();
 	}
 
 	if ((hold_bits = calloc((nchunks + 7) / 8, 1)) == 0) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Test broken due to inability of malloc(hold_bits).");
-		tst_exit();
 	}
 
 	if ((buf = (calloc(csize, 1))) == 0) {
-		tst_resm(TBROK, "Test broken due to inability of malloc(buf).");
-		tst_exit();
+		tst_brkm(TBROK, NULL,
+			 "Test broken due to inability of malloc(buf).");
 	}
 
 	if ((val_buf = (calloc(csize, 1))) == 0) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Test broken due to inability of malloc(val_buf).");
-		tst_exit();
 	}
 
 	if ((zero_buf = (calloc(csize, 1))) == 0) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Test broken due to inability of malloc(zero_buf).");
-		tst_exit();
 	}
 
 	/*
@@ -338,17 +338,16 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Test[%d]: lseek(0) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-
-				tst_exit();
 			}
 			if ((xfr = read(fd, buf, csize)) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Test[%d]: read fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -360,10 +359,10 @@
 				++count;
 			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "Test[%d]: xfr=%d != %d, zero read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				if (memcmp(buf, zero_buf, csize)) {
 					tst_resm(TFAIL,
@@ -388,10 +387,10 @@
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, val read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				++collide;
 				if (memcmp(buf, val_buf, csize)) {
@@ -418,10 +417,10 @@
 			 * Write it.
 			 */
 			if (lseek(fd, -xfr, 1) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Test[%d]: lseek(1) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr = write(fd, val_buf, csize)) < csize) {
 				if (errno == ENOSPC) {
@@ -431,10 +430,10 @@
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "Test[%d]: write fail at %x xfr %d, errno = %d.",
 					 me, CHUNK(chunk), xfr, errno);
-				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
 				file_max = CHUNK(chunk) + csize;
diff --git a/testcases/kernel/fs/ftest/ftest02.c b/testcases/kernel/fs/ftest/ftest02.c
index 35cc0d8..70a5796 100644
--- a/testcases/kernel/fs/ftest/ftest02.c
+++ b/testcases/kernel/fs/ftest/ftest02.c
@@ -344,9 +344,9 @@
 	val = rmdir(dir);
 
 	if (val >= 0) {
-		tst_resm(TFAIL, "Test[%d]: rmdir of non-empty %s succeeds!", me,
+		tst_brkm(TFAIL, NULL,
+			 "Test[%d]: rmdir of non-empty %s succeeds!", me,
 			 dir);
-		tst_exit();
 	}
 
 	val = chdir(dir);
@@ -411,9 +411,8 @@
 {
 	int err = errno;
 
-	tst_resm(TBROK, "Test[%d]: error %d on %s %s",
+	tst_brkm(TBROK, NULL, "Test[%d]: error %d on %s %s",
 		 me, err, m1, (m2 ? m2 : ""));
-	tst_exit();
 }
 
 /*
@@ -430,8 +429,7 @@
 		return;
 	}
 
-	tst_resm(TBROK, "Child process exiting.");
-	tst_exit();
+	tst_brkm(TBROK, NULL, "Child process exiting.");
 }
 
 static void cleanup(void)
diff --git a/testcases/kernel/fs/ftest/ftest03.c b/testcases/kernel/fs/ftest/ftest03.c
index ccae483..c83747a 100644
--- a/testcases/kernel/fs/ftest/ftest03.c
+++ b/testcases/kernel/fs/ftest/ftest03.c
@@ -153,8 +153,8 @@
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0) {
-		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", fuss, errno);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tCan't chdir(%s), error %d.", fuss,
+			 errno);
 	}
 
 	/*
@@ -168,8 +168,7 @@
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
 		perror("sigset failed");
-		tst_resm(TBROK, " sigset failed: signo = 15");
-		tst_exit();
+		tst_brkm(TBROK, NULL, " sigset failed: signo = 15");
 	}
 }
 
@@ -188,9 +187,9 @@
 		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 		if (fd < 0) {
-			tst_resm(TBROK, "\tError %d creating %s/%s.", errno,
+			tst_brkm(TBROK, NULL, "\tError %d creating %s/%s.",
+				 errno,
 				 fuss, test_name);
-			tst_exit();
 		}
 
 		if ((child = fork()) == 0) {
@@ -304,13 +303,11 @@
 	whenmisc = 0;
 
 	if ((bits = malloc((nchunks + 7) / 8)) == 0) {
-		tst_resm(TBROK, "\tmalloc failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed");
 	}
 
 	if ((hold_bits = malloc((nchunks + 7) / 8)) == 0) {
-		tst_resm(TBROK, "\tmalloc failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed");
 	}
 
 	/*Allocate memory for the iovec buffers and init the iovec arrays */
@@ -334,27 +331,23 @@
 		}
 
 		if ((val_iovec[i].iov_base = calloc(w_ioveclen, 1)) == 0) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		val_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		if ((zero_iovec[i].iov_base = calloc(w_ioveclen, 1)) == 0) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		zero_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 	}
 	/*
@@ -411,16 +404,16 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: readv fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -432,10 +425,10 @@
 				++count;
 			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, zero read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
 					if (memcmp
@@ -465,10 +458,10 @@
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, val read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
@@ -500,10 +493,10 @@
 			 * Writev it.
 			 */
 			if (lseek(fd, -xfr, 1) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr =
 			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
@@ -514,10 +507,10 @@
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
 					 me, CHUNK(chunk), xfr, errno);
-				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
 				file_max = CHUNK(chunk) + csize;
@@ -561,9 +554,9 @@
 	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+			tst_brkm(TFAIL, NULL, "\tTest[%d]: fsync error %d.",
+				 me,
 				 errno);
-			tst_exit();
 		}
 		break;
 	case m_trunc:
@@ -572,18 +565,18 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: ftruncate error %d @ 0x%x.",
 					 me, errno, file_max);
-				tst_exit();
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: truncate error %d @ 0x%x.",
 					 me, errno, file_max);
-				tst_exit();
 			}
 			tr_flag = 1;
 		}
@@ -594,16 +587,15 @@
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me,
+			tst_brkm(TFAIL, NULL, "\tTest[%d]: fstat() error %d.",
+				 me,
 				 errno);
-			tst_exit();
 		}
 		if (sb.st_size != file_max) {
-			tst_resm(TFAIL,
-				 "\tTest[%d]: fstat() mismatch; st_size=%"
+			tst_brkm(TFAIL,
+				 NULL, "\tTest[%d]: fstat() mismatch; st_size=%"
 				 PRIx64 ",file_max=%x.", me,
 				 (int64_t) sb.st_size, file_max);
-			tst_exit();
 		}
 		break;
 	}
diff --git a/testcases/kernel/fs/ftest/ftest04.c b/testcases/kernel/fs/ftest/ftest04.c
index 28e4e48..70d4f66 100644
--- a/testcases/kernel/fs/ftest/ftest04.c
+++ b/testcases/kernel/fs/ftest/ftest04.c
@@ -125,8 +125,8 @@
 
 	fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	if (fd < 0) {
-		tst_resm(TBROK, "Error %d creating file %s", errno, filename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Error %d creating file %s", errno,
+			 filename);
 	}
 	close(fd);
 
@@ -140,8 +140,7 @@
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_resm(TFAIL, "first sigset failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "first sigset failed");
 	}
 
 	local_flag = PASSED;
@@ -157,10 +156,11 @@
 		if ((child = fork()) == 0) {
 			fd = open(filename, O_RDWR);
 			if (fd < 0) {
-				tst_resm(TBROK,
-					 "\tTest[%d]: error %d openning %s.", i,
+				tst_brkm(TBROK,
+					 NULL,
+					 "\tTest[%d]: error %d openning %s.",
+					 i,
 					 errno, filename);
-				tst_exit();
 			}
 			dotest(nchild, i, fd);
 			close(fd);
@@ -240,8 +240,7 @@
 	whenmisc = 0;
 
 	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
-		tst_resm(TBROK, "\tmalloc failed(bits)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed(bits)");
 	}
 
 	/*Allocate memory for the iovec buffers and init the iovec arrays
@@ -254,8 +253,7 @@
 
 	for (i = 0; i < MAXIOVCNT; i++) {
 		if ((r_iovec[i].iov_base = malloc(r_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(r_iovec[])");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(r_iovec[])");
 		}
 		r_iovec[i].iov_len = r_ioveclen;
 
@@ -263,32 +261,27 @@
 		 * make things more diffult for the OS.
 		 */
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		if ((val0_iovec[i].iov_base = malloc(w_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(val0_iovec[])");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(val0_iovec[])");
 		}
 
 		val0_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		if ((val_iovec[i].iov_base = malloc(w_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(iov_base)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(iov_base)");
 		}
 
 		val_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 	}
 
@@ -337,16 +330,16 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: readv fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -357,10 +350,10 @@
 				bits[chunk / 8] |= (1 << (chunk % 8));
 			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, zero read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
 					if (memcmp
@@ -381,10 +374,10 @@
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, val read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
@@ -407,10 +400,10 @@
 			 * Write it.
 			 */
 			if (lseek(fd, -xfr, 1) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr =
 			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
@@ -421,10 +414,10 @@
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
 					 me, CHUNK(chunk), xfr, errno);
-				tst_exit();
 			}
 			/*
 			 * If hit "misc" interval, do it.
@@ -447,17 +440,17 @@
 			for (i = 0; i < nchunks; i++) {
 				if ((bits[i / 8] & (1 << (i % 8))) == 0) {
 					if (lseek(fd, CHUNK(i), 0) < 0) {
-						tst_resm(TFAIL,
+						tst_brkm(TFAIL,
+							 NULL,
 							 "\tTest[%d]: lseek fail at %x, errno = %d.",
 							 me, CHUNK(i), errno);
-						tst_exit();
 					}
 					if (writev(fd, &val_iovec[0], MAXIOVCNT)
 					    != csize) {
-						tst_resm(TFAIL,
+						tst_brkm(TFAIL,
+							 NULL,
 							 "\tTest[%d]: writev fail at %x, errno = %d.",
 							 me, CHUNK(i), errno);
-						tst_exit();
 					}
 				}
 			}
@@ -480,8 +473,8 @@
 static void domisc(int me, int fd)
 {
 	if (fsync(fd) < 0) {
-		tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me, errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "\tTest[%d]: fsync error %d.", me,
+			 errno);
 	}
 
 	++misc_cnt[1];
diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c
index 6f6b0d1..ae51841 100644
--- a/testcases/kernel/fs/ftest/ftest06.c
+++ b/testcases/kernel/fs/ftest/ftest06.c
@@ -364,9 +364,9 @@
 	val = rmdir(dir);
 
 	if (val >= 0) {
-		tst_resm(TFAIL, "Test[%d]: rmdir of non-empty %s succeeds!", me,
+		tst_brkm(TFAIL, NULL,
+			 "Test[%d]: rmdir of non-empty %s succeeds!", me,
 			 dir);
-		tst_exit();
 	}
 
 	val = chdir(dir);
@@ -431,9 +431,8 @@
 {
 	int err = errno;
 
-	tst_resm(TFAIL, "Test[%d]: error %d on %s %s",
+	tst_brkm(TFAIL, NULL, "Test[%d]: error %d on %s %s",
 		 me, err, m1, (m2 ? m2 : ""));
-	tst_exit();
 }
 
 static void term(int sig LTP_ATTRIBUTE_UNUSED)
@@ -449,8 +448,7 @@
 		return;
 	}
 
-	tst_resm(TBROK, "Term: Child process exiting.");
-	tst_exit();
+	tst_brkm(TBROK, NULL, "Term: Child process exiting.");
 }
 
 static void cleanup(void)
diff --git a/testcases/kernel/fs/ftest/ftest07.c b/testcases/kernel/fs/ftest/ftest07.c
index 03fa32e..4e69ec0 100644
--- a/testcases/kernel/fs/ftest/ftest07.c
+++ b/testcases/kernel/fs/ftest/ftest07.c
@@ -144,8 +144,7 @@
 	 * Save starting directory.
 	 */
 	if ((cwd = getcwd(homedir, sizeof(homedir))) == NULL) {
-		tst_resm(TBROK, "Failed to get corrent directory");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Failed to get corrent directory");
 	}
 
 	parent_pid = getpid();
@@ -157,8 +156,8 @@
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0) {
-		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", fuss, errno);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tCan't chdir(%s), error %d.", fuss,
+			 errno);
 	}
 
 	/*
@@ -189,9 +188,9 @@
 		test_name[1] = '\0';
 		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 		if (fd < 0) {
-			tst_resm(TBROK, "\tError %d creating %s/%s.", errno,
+			tst_brkm(TBROK, NULL, "\tError %d creating %s/%s.",
+				 errno,
 				 fuss, test_name);
-			tst_exit();
 		}
 
 		if ((child = fork()) == 0) {
@@ -301,12 +300,10 @@
 	whenmisc = 0;
 
 	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
-		tst_resm(TBROK, "\tmalloc failed(bits)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed(bits)");
 	}
 	if ((hold_bits = malloc((nchunks + 7) / 8)) == NULL) {
-		tst_resm(TBROK, "\tmalloc failed(hlod_bits)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed(hlod_bits)");
 	}
 
 	/*Allocate memory for the iovec buffers and init the iovec arrays
@@ -319,8 +316,8 @@
 
 	for (i = 0; i < MAXIOVCNT; i++) {
 		if ((r_iovec[i].iov_base = calloc(r_ioveclen, 1)) == NULL) {
-			tst_resm(TFAIL, "\tmalloc failed(r_iovec[i].iov_base)");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "\tmalloc failed(r_iovec[i].iov_base)");
 		}
 		r_iovec[i].iov_len = r_ioveclen;
 
@@ -329,8 +326,7 @@
 		 */
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed((i+1)*8)");
 		}
 		if ((val_iovec[i].iov_base = calloc(w_ioveclen, 1)) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed(val_iovec[i]");
@@ -339,18 +335,15 @@
 		val_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed((i+1)*8)");
 		}
 		if ((zero_iovec[i].iov_base = calloc(w_ioveclen, 1)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(zero_iover)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(zero_iover)");
 		}
 		zero_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed((i+1)*8)");
 		}
 	}
 	/*
@@ -402,16 +395,16 @@
 			 * Read it.
 			 */
 			if (lseek64(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek64(0) fail at %Lx, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: readv fail at %Lx, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -423,10 +416,10 @@
 				++count;
 			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, zero read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
 					if (memcmp
@@ -456,10 +449,10 @@
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, val read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
@@ -491,10 +484,10 @@
 			 * Writev it.
 			 */
 			if (lseek64(fd, -((off64_t) xfr), 1) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: lseek64(1) fail at %Lx, errno = %d.",
 					 me, CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr =
 			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
@@ -505,10 +498,10 @@
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: writev fail at %Lx xfr %d, errno = %d.",
 					 me, CHUNK(chunk), xfr, errno);
-				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
 				file_max = CHUNK(chunk) + csize;
@@ -551,9 +544,9 @@
 	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+			tst_brkm(TFAIL, NULL, "\tTest[%d]: fsync error %d.",
+				 me,
 				 errno);
-			tst_exit();
 		}
 		break;
 	case m_trunc:
@@ -562,18 +555,18 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: ftruncate error %d @ 0x%x.",
 					 me, errno, file_max);
-				tst_exit();
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL,
+					 NULL,
 					 "\tTest[%d]: truncate error %d @ 0x%x.",
 					 me, errno, file_max);
-				tst_exit();
 			}
 			tr_flag = 1;
 		}
@@ -587,16 +580,15 @@
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me,
+			tst_brkm(TFAIL, NULL, "\tTest[%d]: fstat() error %d.",
+				 me,
 				 errno);
-			tst_exit();
 		}
 		if (sb.st_size != file_max) {
-			tst_resm(TFAIL,
-				 "\tTest[%d]: fstat() mismatch; st_size=%"
+			tst_brkm(TFAIL,
+				 NULL, "\tTest[%d]: fstat() mismatch; st_size=%"
 				 PRIx64 ",file_max=%x.", me,
 				 (int64_t) sb.st_size, file_max);
-			tst_exit();
 		}
 		break;
 	}
diff --git a/testcases/kernel/fs/ftest/ftest08.c b/testcases/kernel/fs/ftest/ftest08.c
index 5f4e3dd..bf7114c 100644
--- a/testcases/kernel/fs/ftest/ftest08.c
+++ b/testcases/kernel/fs/ftest/ftest08.c
@@ -130,8 +130,8 @@
 	fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 	if (fd < 0) {
-		tst_resm(TBROK, "Error %d creating file %s", errno, filename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Error %d creating file %s", errno,
+			 filename);
 	}
 
 	close(fd);
@@ -162,10 +162,11 @@
 		if ((child = fork()) == 0) {
 			fd = open(filename, O_RDWR);
 			if (fd < 0) {
-				tst_resm(TFAIL,
-					 "\tTest[%d]: error %d openning %s.", i,
+				tst_brkm(TFAIL,
+					 NULL,
+					 "\tTest[%d]: error %d openning %s.",
+					 i,
 					 errno, filename);
-				tst_exit();
 			}
 			dotest(nchild, i, fd);
 			close(fd);
@@ -246,8 +247,7 @@
 	whenmisc = 0;
 
 	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
-		tst_resm(TBROK, "\tmalloc failed(bits)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "\tmalloc failed(bits)");
 	}
 
 	/* Allocate memory for the iovec buffers and init the iovec arrays */
@@ -258,8 +258,7 @@
 	 */
 	for (i = 0; i < MAXIOVCNT; i++) {
 		if ((r_iovec[i].iov_base = malloc(r_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(iov_base)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(iov_base)");
 		}
 		r_iovec[i].iov_len = r_ioveclen;
 
@@ -267,31 +266,26 @@
 		 * make things more diffult for the OS.
 		 */
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed((i+1)*8)");
 		}
 
 		if ((val0_iovec[i].iov_base = malloc(w_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(val0_iovec)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(val0_iovec)");
 		}
 
 		val0_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed((i+1)*8)");
 		}
 
 		if ((val_iovec[i].iov_base = malloc(w_ioveclen)) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(iov_base)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(iov_base)");
 		}
 		val_iovec[i].iov_len = w_ioveclen;
 
 		if (malloc((i + 1) * 8) == NULL) {
-			tst_resm(TBROK, "\tmalloc failed(((i+1)*8)");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "\tmalloc failed(((i+1)*8)");
 		}
 	}
 
@@ -343,18 +337,16 @@
 			 * Read it.
 			 */
 			if (lseek64(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL,
-					 "\tTest[%d]: lseek64(0) fail at %"
+				tst_brkm(TFAIL,
+					 NULL, "\tTest[%d]: lseek64(0) fail at %"
 					 PRIx64 "x, errno = %d.", me,
 					 CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL,
-					 "\tTest[%d]: readv fail at %" PRIx64
+				tst_brkm(TFAIL,
+					 NULL, "\tTest[%d]: readv fail at %" PRIx64
 					 "x, errno = %d.", me, CHUNK(chunk),
 					 errno);
-				tst_exit();
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -365,10 +357,10 @@
 				bits[chunk / 8] |= (1 << (chunk % 8));
 			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, zero read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
 					if (memcmp
@@ -391,10 +383,10 @@
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL,
+					tst_brkm(TFAIL,
+						 NULL,
 						 "\tTest[%d]: xfr=%d != %d, val read.",
 						 me, xfr, csize);
-					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
@@ -419,11 +411,10 @@
 			 * Write it.
 			 */
 			if (lseek64(fd, -xfr, 1) < 0) {
-				tst_resm(TFAIL,
-					 "\tTest[%d]: lseek64(1) fail at %"
+				tst_brkm(TFAIL,
+					 NULL, "\tTest[%d]: lseek64(1) fail at %"
 					 PRIx64 ", errno = %d.", me,
 					 CHUNK(chunk), errno);
-				tst_exit();
 			}
 			if ((xfr =
 			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
@@ -434,11 +425,10 @@
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL,
-					 "\tTest[%d]: writev fail at %" PRIx64
+				tst_brkm(TFAIL,
+					 NULL, "\tTest[%d]: writev fail at %" PRIx64
 					 "x xfr %d, errno = %d.", me,
 					 CHUNK(chunk), xfr, errno);
-				tst_exit();
 			}
 			/*
 			 * If hit "misc" interval, do it.
@@ -462,21 +452,19 @@
 				if ((bits[i / 8] & (1 << (i % 8))) == 0) {
 					if (lseek64(fd, CHUNK(i), 0) <
 					    (off64_t) 0) {
-						tst_resm(TFAIL,
-							 "\tTest[%d]: lseek64 fail at %"
+						tst_brkm(TFAIL,
+							 NULL, "\tTest[%d]: lseek64 fail at %"
 							 PRIx64
 							 "x, errno = %d.", me,
 							 CHUNK(i), errno);
-						tst_exit();
 					}
 					if (writev(fd, &val_iovec[0], MAXIOVCNT)
 					    != csize) {
-						tst_resm(TFAIL,
-							 "\tTest[%d]: writev fail at %"
+						tst_brkm(TFAIL,
+							 NULL, "\tTest[%d]: writev fail at %"
 							 PRIx64
 							 "x, errno = %d.", me,
 							 CHUNK(i), errno);
-						tst_exit();
 					}
 				}
 			}
@@ -511,9 +499,9 @@
 	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+			tst_brkm(TFAIL, NULL, "\tTest[%d]: fsync error %d.",
+				 me,
 				 errno);
-			tst_exit();
 		}
 		break;
 	case m_sync:
diff --git a/testcases/kernel/fs/stream/stream01.c b/testcases/kernel/fs/stream/stream01.c
index 146cf64..bd1be9d 100644
--- a/testcases/kernel/fs/stream/stream01.c
+++ b/testcases/kernel/fs/stream/stream01.c
@@ -71,9 +71,9 @@
 	/*--------------------------------------------------------------------*/
 		//block0:
 		if ((stream = fopen(tempfile1, "a+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile1,
+			tst_brkm(TFAIL, NULL, "fopen(%s) a+ failed: %s",
+				 tempfile1,
 				 strerror(errno));
-			tst_exit();
 		}
 		fwrite("a", 1, 1, stream);
 		if ((stream = freopen(tempfile2, "a+", stream)) == NULL) {
diff --git a/testcases/kernel/fs/stream/stream03.c b/testcases/kernel/fs/stream/stream03.c
index 19e0411..2ae4e9b 100644
--- a/testcases/kernel/fs/stream/stream03.c
+++ b/testcases/kernel/fs/stream/stream03.c
@@ -61,8 +61,7 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	local_flag = PASSED;
@@ -75,9 +74,9 @@
 		//block0:
 
 		if ((stream = fopen(tempfile1, "a+")) == NULL) {
-			tst_resm(TBROK, "fopen(%s) a+ failed: %s", tempfile1,
+			tst_brkm(TBROK, NULL, "fopen(%s) a+ failed: %s",
+				 tempfile1,
 				 strerror(errno));
-			tst_exit();
 		}
 
 		/* make sure offset of zero at start */
@@ -90,8 +89,8 @@
 
 		/* write something and check */
 		if (fwrite(junk, sizeof(*junk), strlen(junk), stream) == 0) {
-			tst_resm(TFAIL, "fwrite failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fwrite failed: %s",
+				 strerror(errno));
 		}
 
 		pos = ftell(stream);
@@ -116,8 +115,8 @@
 
 		/* seek from current position and then check */
 		if (fseek(stream, strlen(junk), 1) != 0) {
-			tst_resm(TFAIL, "fseek failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseek failed: %s",
+				 strerror(errno));
 		}
 
 		pos = ftell(stream);
@@ -131,8 +130,8 @@
 
 		/* seek from end of file and then check */
 		if (fseek(stream, 0, 2) != 0) {
-			tst_resm(TFAIL, "fseek failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseek failed: %s",
+				 strerror(errno));
 		}
 
 		pos = ftell(stream);
@@ -146,8 +145,8 @@
 
 		/* rewind with seek and then check */
 		if (fseek(stream, 0, 0) != 0) {
-			tst_resm(TFAIL, "fseek failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseek failed: %s",
+				 strerror(errno));
 		}
 
 		pos = ftell(stream);
@@ -186,9 +185,9 @@
 	/*--------------------------------------------------------------------*/
 		//block1:
 		if ((stream = fopen(tempfile1, "a+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile1,
+			tst_brkm(TFAIL, NULL, "fopen(%s) a+ failed: %s",
+				 tempfile1,
 				 strerror(errno));
-			tst_exit();
 		}
 
 		/* make sure offset of zero at start */
@@ -203,8 +202,8 @@
 
 		/* write something and check */
 		if (fwrite(junk, sizeof(*junk), strlen(junk), stream) == 0) {
-			tst_resm(TFAIL, "fwrite failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fwrite failed: %s",
+				 strerror(errno));
 		}
 
 		opos = ftello(stream);
@@ -229,8 +228,8 @@
 
 		/* seek from current position and then check */
 		if (fseeko(stream, strlen(junk), 1) != 0) {
-			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseeko failed: %s",
+				 strerror(errno));
 		}
 
 		opos = ftello(stream);
@@ -244,8 +243,8 @@
 
 		/* seek from end of file and then check */
 		if (fseeko(stream, 0, 2) != 0) {
-			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseeko failed: %s",
+				 strerror(errno));
 		}
 
 		opos = ftello(stream);
@@ -259,8 +258,8 @@
 
 		/* rewind with seek and then check */
 		if (fseeko(stream, 0, 0) != 0) {
-			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "fseeko failed: %s",
+				 strerror(errno));
 		}
 
 		opos = ftello(stream);
diff --git a/testcases/kernel/fs/stream/stream05.c b/testcases/kernel/fs/stream/stream05.c
index a909f42..2a864cc 100644
--- a/testcases/kernel/fs/stream/stream05.c
+++ b/testcases/kernel/fs/stream/stream05.c
@@ -77,17 +77,17 @@
 	/*--------------------------------------------------------------------*/
 		//block0:
 		if ((stream = fopen(tempfile, "a+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) a+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		fprintf(stream, "a");
 		fclose(stream);
 
 		if ((stream = fopen(tempfile, "r+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) r+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) r+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 
 		/* check that ferror returns zero */
@@ -111,8 +111,8 @@
 		/* check that fileno returns valid file descriptor */
 		fd = fileno(stream);
 		if ((nr = read(fd, buf, 1)) < 0) {
-			tst_resm(TFAIL, "read failed: %s", strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "read failed: %s",
+				 strerror(errno));
 		}
 		if (nr != 1) {
 			tst_resm(TFAIL, "read did not read right number");
@@ -136,9 +136,9 @@
 		fclose(stream);
 
 		if ((stream = fopen(tempfile, "r+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) r+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) r+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		if (feof(stream) != 0) {
 			tst_resm(TFAIL,
@@ -183,44 +183,44 @@
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "rb")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) rb failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) rb failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "wb")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) wb failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) wb failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "ab")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) ab failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) ab failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "rb+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) rb+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) rb+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "wb+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) wb+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) wb+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "ab+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) ab+ failed: %s", tempfile,
+			tst_brkm(TFAIL, NULL, "fopen(%s) ab+ failed: %s",
+				 tempfile,
 				 strerror(errno));
-			tst_exit();
 		}
 		(void)fclose(stream);
 
diff --git a/testcases/kernel/io/aio/aio01/aio01.c b/testcases/kernel/io/aio/aio01/aio01.c
index 68d6c66..0905924 100644
--- a/testcases/kernel/io/aio/aio01/aio01.c
+++ b/testcases/kernel/io/aio/aio01/aio01.c
@@ -435,8 +435,7 @@
 
 int main(void)
 {
-	tst_resm(TCONF, "libaio missing");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "libaio missing");
 }
 
 #endif
diff --git a/testcases/kernel/io/direct_io/diotest1.c b/testcases/kernel/io/direct_io/diotest1.c
index 5995479..8c0458c 100644
--- a/testcases/kernel/io/direct_io/diotest1.c
+++ b/testcases/kernel/io/direct_io/diotest1.c
@@ -68,8 +68,7 @@
 {
 	fprintf(stderr,
 		"Usage: diotest1 [-b bufsize] [-n numblks] [-i infile] [-o outfile]\n");
-	tst_resm(TBROK, "usage");
-	tst_exit();
+	tst_brkm(TBROK, NULL, "usage");
 }
 
 /*
@@ -81,8 +80,7 @@
 	close(fd2);
 	unlink(infile);
 	unlink(outfile);
-	tst_resm(TFAIL, "Test failed");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed");
 }
 
 int main(int argc, char *argv[])
@@ -130,24 +128,24 @@
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd = open(infile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "O_DIRECT is not supported by this filesystem.");
-		tst_exit();
 	} else {
 		close(fd);
 	}
 
 	/* Open files */
 	if ((fd1 = open(infile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
-		tst_resm(TFAIL, "open infile failed: %s", strerror(errno));
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "open infile failed: %s",
+			 strerror(errno));
 	}
 
 	if ((fd2 = open(outfile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
 		close(fd1);
 		unlink(infile);
-		tst_resm(TFAIL, "open outfile failed: %s", strerror(errno));
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "open outfile failed: %s",
+			 strerror(errno));
 	}
 
 	/* Allocate for buf, Create input file */
@@ -209,7 +207,6 @@
 
 int main()
 {
-	tst_resm(TCONF, "O_DIRECT is not defined.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "O_DIRECT is not defined.");
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/mem/mem/mem02.c b/testcases/kernel/mem/mem/mem02.c
index 9608575..a5f3cbe 100644
--- a/testcases/kernel/mem/mem/mem02.c
+++ b/testcases/kernel/mem/mem/mem02.c
@@ -99,15 +99,14 @@
 	/* check out calloc/free */
 	if ((pm2 = pm1 = calloc(memsize, 1)) == NULL) {
 
-		tst_resm(TFAIL, "calloc - alloc of %dMB failed",
+		tst_brkm(TFAIL, NULL, "calloc - alloc of %dMB failed",
 			 memsize / 1024 / 1024);
-		tst_exit();
 	}
 
 	for (i = 0; i < memsize; i++)
 		if (*pm2++ != 0) {
-			tst_resm(TFAIL, "calloc returned non zero memory");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "calloc returned non zero memory");
 		}
 
 	pm2 = pm1;
@@ -116,8 +115,8 @@
 	pm2 = pm1;
 	for (i = 0; i < memsize; i++)
 		if (*pm2++ != 'X') {
-			tst_resm(TFAIL, "could not write/verify memory ");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "could not write/verify memory ");
 		}
 
 	free(pm1);
@@ -129,8 +128,7 @@
 
 	/* check out malloc/free */
 	if ((pm2 = pm1 = malloc(memsize)) == NULL) {
-		tst_resm(TFAIL, "malloc did not alloc memory ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "malloc did not alloc memory ");
 	}
 
 	for (i = 0; i < memsize; i++)
@@ -138,8 +136,8 @@
 	pm2 = pm1;
 	for (i = 0; i < memsize; i++)
 		if (*pm2++ != 'X') {
-			tst_resm(TFAIL, "could not write/verify memory ");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "could not write/verify memory ");
 		}
 
 	free(pm1);
@@ -162,8 +160,8 @@
 	/* verify contents did not change */
 	for (i = 0; i < 5; i++) {
 		if (*pm4++ != 'X') {
-			tst_resm(TFAIL, "realloc changed memory contents");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "realloc changed memory contents");
 		}
 	}
 
@@ -176,8 +174,8 @@
 	/* verify contents did not change */
 	for (i = 0; i < 5; i++) {
 		if (*pm3++ != 'X') {
-			tst_resm(TFAIL, "realloc changed memory contents");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "realloc changed memory contents");
 		}
 	}
 
@@ -194,8 +192,8 @@
 	 * be dumped on failures.
 	 */
 	if ((signal(SIGSEGV, on_mem_fault)) == SIG_ERR) {
-		tst_resm(TFAIL, "Could not get signal handler for SIGSEGV");
-		tst_exit();
+		tst_brkm(TFAIL, NULL,
+			 "Could not get signal handler for SIGSEGV");
 	}
 
 	srand(1);		/* Ensure Determinism         */
@@ -215,8 +213,8 @@
 		 */
 		laddr = (long)memptr;
 		if (((laddr >> pagesize) << pagesize) != laddr) {
-			tst_resm(TFAIL, "Valloc returned unaligned data");
-			tst_exit();
+			tst_brkm(TFAIL, NULL,
+				 "Valloc returned unaligned data");
 		}
 
 		free(memptr);
@@ -235,6 +233,5 @@
  */
 void on_mem_fault(int sig)
 {
-	tst_resm(TFAIL, "\tTest failed on receipt of a SIGSEGV signal");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "\tTest failed on receipt of a SIGSEGV signal");
 }
diff --git a/testcases/kernel/mem/mmapstress/mmapstress01.c b/testcases/kernel/mem/mmapstress/mmapstress01.c
index 7daf272..4f222aa 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress01.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress01.c
@@ -164,8 +164,7 @@
 	progname = *argv;
 	tst_tmpdir();
 	if (argc < 2) {
-		tst_resm(TBROK, "usage: %s %s\n", progname, usage);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "usage: %s %s\n", progname, usage);
 	}
 
 	while ((c = getopt(argc, argv, "S:omdlrf:p:t:")) != -1) {
diff --git a/testcases/kernel/mem/mmapstress/mmapstress03.c b/testcases/kernel/mem/mmapstress/mmapstress03.c
index 2af4c66..c7c8c7f 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress03.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress03.c
@@ -224,8 +224,7 @@
 
 int anyfail()
 {
-	tst_resm(TFAIL, "Test failed");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed");
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress06.c b/testcases/kernel/mem/mmapstress/mmapstress06.c
index 899fa66..770be4c 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress06.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress06.c
@@ -111,8 +111,7 @@
 
 int anyfail()
 {
-	tst_resm(TFAIL, "Test failed\n");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed\n");
 }
 
 /*****	**	**	*****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress08.c b/testcases/kernel/mem/mmapstress/mmapstress08.c
index c706187..54eba74 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress08.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress08.c
@@ -115,15 +115,13 @@
 
 int anyfail()
 {
-	tst_resm(TFAIL, "Test failed\n");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed\n");
 }
 
 #else /* defined(__i386__) || defined(__x86_64__) */
 int main(void)
 {
-	tst_resm(TCONF, "Test is only applicable for IA-32 and x86-64.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "Test is only applicable for IA-32 and x86-64.");
 }
 #endif
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress09.c b/testcases/kernel/mem/mmapstress/mmapstress09.c
index 1865d11..5a9b6d1 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress09.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress09.c
@@ -495,8 +495,7 @@
 
 int anyfail()
 {
-	tst_resm(TFAIL, "Test failed\n");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed\n");
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/page/page01.c b/testcases/kernel/mem/page/page01.c
index b4e9c4d..bc95bc5 100644
--- a/testcases/kernel/mem/page/page01.c
+++ b/testcases/kernel/mem/page/page01.c
@@ -126,14 +126,14 @@
 				if (i < 2) {
 					tst_resm(TBROK,
 						 "This should not happen for first two children.\n");
-					tst_resm(TFAIL, "Child %d - fail.\n",
+					tst_brkm(TFAIL, NULL,
+						 "Child %d - fail.\n",
 						 i);
-					tst_exit();
 				} else {
 					tst_resm(TCONF,
 						 "This is ok for all but first two children.\n");
-					tst_resm(TCONF, "Child %d - ok.\n", i);
-					tst_exit();
+					tst_brkm(TCONF, NULL,
+						 "Child %d - ok.\n", i);
 				}
 			}
 			number_pointer = memory_pointer;
diff --git a/testcases/kernel/mem/page/page02.c b/testcases/kernel/mem/page/page02.c
index 29afaa5..1013f1f 100644
--- a/testcases/kernel/mem/page/page02.c
+++ b/testcases/kernel/mem/page/page02.c
@@ -226,15 +226,13 @@
 int bd_arg(str)
 char *str;
 {
-	tst_resm(TCONF, "\tCannot parse %s as a number.\n", str);
-	tst_exit();
+	tst_brkm(TCONF, NULL, "\tCannot parse %s as a number.\n", str);
 }
 
 int chld()
 {
 	if (signal(SIGUSR1, (void (*)())chld) == SIG_ERR) {
-		tst_resm(TBROK, "signal failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "signal failed");
 	}
 	chld_flag++;
 	return 0;
diff --git a/testcases/kernel/mem/shmt/shmt02.c b/testcases/kernel/mem/shmt/shmt02.c
index c5734cb..d97e57b 100644
--- a/testcases/kernel/mem/shmt/shmt02.c
+++ b/testcases/kernel/mem/shmt/shmt02.c
@@ -67,9 +67,9 @@
 
 	if ((shmid = shmget(key, 16 * K_1, IPC_CREAT | 0666)) < 0) {
 		perror("shmget");
-		tst_resm(TFAIL, "shmget Failed: shmid = %d, errno = %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "shmget Failed: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 
 	tst_resm(TPASS, "shmget");
@@ -113,10 +113,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt03.c b/testcases/kernel/mem/shmt/shmt03.c
index 88c324a..8f4ad99 100644
--- a/testcases/kernel/mem/shmt/shmt03.c
+++ b/testcases/kernel/mem/shmt/shmt03.c
@@ -68,9 +68,9 @@
 
 	if ((shmid = shmget(key, 16 * K_1, IPC_CREAT | 0666)) < 0) {
 		perror("shmget");
-		tst_resm(TFAIL, "shmget Failed: shmid = %d, errno = %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "shmget Failed: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 
 	tst_resm(TPASS, "shmget");
@@ -126,10 +126,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
index 9858902..d4f9836 100644
--- a/testcases/kernel/mem/shmt/shmt04.c
+++ b/testcases/kernel/mem/shmt/shmt04.c
@@ -79,8 +79,7 @@
 	pid = fork();
 	switch (pid) {
 	case -1:
-		tst_resm(TBROK, "fork failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork failed");
 	case 0:
 		child();
 	}
@@ -191,10 +190,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt05.c b/testcases/kernel/mem/shmt/shmt05.c
index 591dce2..ba6211b 100644
--- a/testcases/kernel/mem/shmt/shmt05.c
+++ b/testcases/kernel/mem/shmt/shmt05.c
@@ -119,10 +119,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
index cc0adf3..75a2310 100644
--- a/testcases/kernel/mem/shmt/shmt06.c
+++ b/testcases/kernel/mem/shmt/shmt06.c
@@ -78,8 +78,7 @@
 	pid = fork();
 	switch (pid) {
 	case -1:
-		tst_resm(TBROK, "fork failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork failed");
 	case 0:
 		child();
 	}
@@ -214,10 +213,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt07.c b/testcases/kernel/mem/shmt/shmt07.c
index c905a42..02958d5 100644
--- a/testcases/kernel/mem/shmt/shmt07.c
+++ b/testcases/kernel/mem/shmt/shmt07.c
@@ -72,9 +72,9 @@
 
 	if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
 		perror("shmget");
-		tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "Error: shmget: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	cp = shmat(shmid, NULL, 0);
 
@@ -97,8 +97,7 @@
 	pid = fork();
 	switch (pid) {
 	case -1:
-		tst_resm(TBROK, "fork failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork failed");
 
 	case 0:
 		if (*cp != '1') {
@@ -125,10 +124,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt08.c b/testcases/kernel/mem/shmt/shmt08.c
index 1239692..8687e3d 100644
--- a/testcases/kernel/mem/shmt/shmt08.c
+++ b/testcases/kernel/mem/shmt/shmt08.c
@@ -65,9 +65,9 @@
 
 	if ((shmid = shmget(key, 24 * K_1, IPC_CREAT | 0666)) < 0) {
 		perror("shmget");
-		tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "Error: shmget: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 
 	cp = shmat(shmid, NULL, 0);
@@ -110,10 +110,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt09.c b/testcases/kernel/mem/shmt/shmt09.c
index 2f2f8c6..3309a5a 100644
--- a/testcases/kernel/mem/shmt/shmt09.c
+++ b/testcases/kernel/mem/shmt/shmt09.c
@@ -82,22 +82,22 @@
 
 	if ((unsigned long)sbrk(16384) >= (-4095UL)) {
 		perror("sbrk");
-		tst_resm(TFAIL, "Error: sbrk failed, errno = %d\n", errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Error: sbrk failed, errno = %d\n",
+			 errno);
 	}
 
 	if ((unsigned long)sbrk(-4097) >= (-4095UL)) {
 		perror("sbrk");
-		tst_resm(TFAIL, "Error: sbrk failed, errno = %d\n", errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Error: sbrk failed, errno = %d\n",
+			 errno);
 	}
 
 	if ((shmid = shmget(key, 10 * K_1, IPC_CREAT | 0666)) < 0) {
 		perror("shmget");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "Error: shmget Failed, shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 
 	c1 = shmat(shmid, NULL, 0);
@@ -192,10 +192,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
diff --git a/testcases/kernel/mem/shmt/shmt10.c b/testcases/kernel/mem/shmt/shmt10.c
index 35b70c0..d680fa6 100644
--- a/testcases/kernel/mem/shmt/shmt10.c
+++ b/testcases/kernel/mem/shmt/shmt10.c
@@ -89,9 +89,8 @@
 			iter = atoi(optarg);
 			break;
 		default:
-			tst_resm(TCONF, "usage: %s [-i <# iterations>]",
+			tst_brkm(TCONF, NULL, "usage: %s [-i <# iterations>]",
 				 argv[0]);
-			tst_exit();
 		}
 	}
 
@@ -99,15 +98,13 @@
 
 	if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) {
 		tst_resm(TFAIL, "shmget");
-		tst_resm(TFAIL, "Error: shmid = %d\n", shmid);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Error: shmid = %d\n", shmid);
 	}
 
 	pid = fork();
 	switch (pid) {
 	case -1:
-		tst_resm(TBROK, "fork failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork failed");
 	case 0:
 		child(iter);
 		tst_exit();
@@ -138,10 +135,10 @@
 {
 	if (shmctl(shmid, IPC_RMID, NULL) == -1) {
 		perror("shmctl");
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "shmctl Failed to remove: shmid = %d, errno = %d\n",
 			 shmid, errno);
-		tst_exit();
 	}
 	return (0);
 }
@@ -154,15 +151,15 @@
 
 	for (i = 0; i < iter; i++) {
 		if ((c1 = shmat(shmid, NULL, 0)) == (char *)-1) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "Error:child proc: shmat: iter %d, shmid = %d\n",
 				 i, shmid);
-			tst_exit();
 		}
 		if (shmdt(c1) < 0) {
-			tst_resm(TFAIL,
-				 "Error: child proc: shmdt: iter %d ", i);
-			tst_exit();
+			tst_brkm(TFAIL,
+				 NULL, "Error: child proc: shmdt: iter %d ",
+				 i);
 		}
 	}
 	return (0);
diff --git a/testcases/kernel/mem/vmtests/data_space.c b/testcases/kernel/mem/vmtests/data_space.c
index 61a31ff..db17038 100644
--- a/testcases/kernel/mem/vmtests/data_space.c
+++ b/testcases/kernel/mem/vmtests/data_space.c
@@ -96,8 +96,7 @@
 {
 	tst_resm(TCONF, "Usage: %s <nchild> <size> <chunk_size> <iterations>",
 		 prog);
-	tst_resm(TCONF, "DEFAULTS: 10 1024*1024 4096 25");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "DEFAULTS: 10 1024*1024 4096 25");
 }
 
 int main(argc, argv)
@@ -493,9 +492,9 @@
 		tst_resm(TINFO, "\tThis is ok - probably swap space limit.\n");
 		tst_exit();
 	} else {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "\tThis is not ok for first child - check parameters.\n");
-		tst_exit();
 	}
 
 	return 0;
diff --git a/testcases/kernel/mem/vmtests/stack_space.c b/testcases/kernel/mem/vmtests/stack_space.c
index 71c2591..6ab4472 100644
--- a/testcases/kernel/mem/vmtests/stack_space.c
+++ b/testcases/kernel/mem/vmtests/stack_space.c
@@ -76,8 +76,7 @@
 int usage(char *prog)
 {
 	tst_resm(TCONF, "Usage: %s <nchild> <chunk_size> <iterations>", prog);
-	tst_resm(TCONF, "DEFAULTS: 20 1024 50");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "DEFAULTS: 20 1024 50");
 }
 
 int main(argc, argv)
@@ -91,8 +90,7 @@
 	parent_pid = getpid();
 
 	if (signal(SIGTERM, term) == SIG_ERR) {
-		tst_resm(TBROK, "first sigset failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "first sigset failed");
 
 	}
 
@@ -105,16 +103,16 @@
 		if (sscanf(argv[i++], "%d", &nchild) != 1)
 			bd_arg(argv[i - 1]);
 		if (nchild > MAXCHILD) {
-			tst_resm(TBROK, "Too many children, max is %d\n",
+			tst_brkm(TBROK, NULL,
+				 "Too many children, max is %d\n",
 				 MAXCHILD);
-			tst_exit();
 		}
 		if (sscanf(argv[i++], "%d", &csize) != 1)
 			bd_arg(argv[i - 1]);
 		if (csize > MAXSIZE) {
-			tst_resm(TBROK, "Chunk size too large , max is %d\n",
+			tst_brkm(TBROK, NULL,
+				 "Chunk size too large , max is %d\n",
 				 MAXSIZE);
-			tst_exit();
 		}
 		if (sscanf(argv[i++], "%d", &iterations) != 1)
 			bd_arg(argv[i - 1]);
@@ -131,9 +129,9 @@
 int bd_arg(str)
 char *str;
 {
-	tst_resm(TCONF, "Bad argument - %s - could not parse as number.\n",
+	tst_brkm(TCONF, NULL,
+		 "Bad argument - %s - could not parse as number.\n",
 		 str);
-	tst_exit();
 }
 
 int runtest()
@@ -224,8 +222,7 @@
 	zero_buf = (char *)(malloc(csize));
 
 	if (bits == 0 || val_buf == 0 || zero_buf == 0) {
-		tst_resm(TFAIL, "\tmalloc failed, pid: %d\n", getpid());
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "\tmalloc failed, pid: %d\n", getpid());
 	}
 
 	/*
diff --git a/testcases/kernel/pty/ptem01.c b/testcases/kernel/pty/ptem01.c
index b232a2f..6c4f97a 100644
--- a/testcases/kernel/pty/ptem01.c
+++ b/testcases/kernel/pty/ptem01.c
@@ -61,84 +61,68 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK | TERRNO, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK | TERRNO, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK, "unlockpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "unlockpt() call failed");
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL, "Could not open %s", slavename);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Could not open %s", slavename);
 	}
 
 	if (ioctl(slavefd, TCGETS, &termios) != 0) {
-		tst_resm(TFAIL, "TCGETS");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCGETS");
 	}
 
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL, "TCSETS");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETS");
 	}
 
 	if (ioctl(slavefd, TCSETSW, &termios) != 0) {
-		tst_resm(TFAIL, "TCSETSW");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETSW");
 	}
 
 	if (ioctl(slavefd, TCSETSF, &termios) != 0) {
-		tst_resm(TFAIL, "TCSETSF");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETSF");
 	}
 
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL, "TCSETS");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETS");
 	}
 
 	if (ioctl(slavefd, TCGETA, &termio) != 0) {
-		tst_resm(TFAIL, "TCGETA");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCGETA");
 	}
 
 	if (ioctl(slavefd, TCSETA, &termio) != 0) {
-		tst_resm(TFAIL, "TCSETA");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETA");
 	}
 
 	if (ioctl(slavefd, TCSETAW, &termio) != 0) {
-		tst_resm(TFAIL, "TCSETAW");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETAW");
 	}
 
 	if (ioctl(slavefd, TCSETAF, &termio) != 0) {
-		tst_resm(TFAIL, "TCSETAF");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCSETAF");
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK, "close slave");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close slave");
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK, "close master");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close master");
 	}
 	tst_resm(TPASS, "test1");
 
@@ -159,85 +143,70 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK | TERRNO, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK | TERRNO, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK, "unlockpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "unlockpt() call failed");
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK, "Could not open %s", slavename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Could not open %s", slavename);
 	}
 
 	if (ioctl(masterfd, TIOCSWINSZ, &wsz1) != 0) {
-		tst_resm(TFAIL, "TIOCSWINSZ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TIOCSWINSZ");
 	}
 
 	if (ioctl(slavefd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL, "TIOCGWINSZ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TIOCGWINSZ");
 	}
 
 	if (wsz.ws_row != wsz1.ws_row || wsz.ws_col != wsz1.ws_col ||
 	    wsz.ws_xpixel != wsz1.ws_xpixel ||
 	    wsz.ws_ypixel != wsz1.ws_ypixel) {
-		tst_resm(TFAIL, "unexpected window size returned");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "unexpected window size returned");
 	}
 
 	if (ioctl(masterfd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL, "TIOCGWINSZ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TIOCGWINSZ");
 	}
 
 	if (wsz.ws_row != wsz1.ws_row || wsz.ws_col != wsz1.ws_col ||
 	    wsz.ws_xpixel != wsz1.ws_xpixel ||
 	    wsz.ws_ypixel != wsz1.ws_ypixel) {
-		tst_resm(TFAIL, "unexpected window size returned");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "unexpected window size returned");
 	}
 
 	if (ioctl(slavefd, TIOCSWINSZ, &wsz2) != 0) {
-		tst_resm(TFAIL, "TIOCSWINSZ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TIOCSWINSZ");
 	}
 
 	if (ioctl(slavefd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL, "TIOCGWINSZ");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TIOCGWINSZ");
 	}
 
 	if (wsz.ws_row != wsz2.ws_row || wsz.ws_col != wsz2.ws_col ||
 	    wsz.ws_xpixel != wsz2.ws_xpixel ||
 	    wsz.ws_ypixel != wsz2.ws_ypixel) {
-		tst_resm(TFAIL, "unexpected window size returned");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "unexpected window size returned");
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK, "close");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close");
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK, "close");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close");
 	}
 	tst_resm(TPASS, "test2");
 
@@ -255,49 +224,40 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK | TERRNO, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK | TERRNO, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK, "unlockpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "unlockpt() call failed");
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK, "Could not open %s", slavename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Could not open %s", slavename);
 	}
 
 	if (tcsendbreak(masterfd, 10) != 0) {
-		tst_resm(TFAIL, "tcsendbreak");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "tcsendbreak");
 	}
 
 	if (tcsendbreak(slavefd, 10) != 0) {
-		tst_resm(TFAIL, "tcsendbreak");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "tcsendbreak");
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK, "close slave");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close slave");
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK, "close master");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close master");
 	}
 	tst_resm(TPASS, "test3");
 
@@ -315,56 +275,46 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK | TERRNO, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK | TERRNO, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK, "unlockpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "unlockpt() call failed");
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK, "Could not open %s", slavename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Could not open %s", slavename);
 	}
 
 	if ((slavefd2 = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL, "Could not open %s (again)", slavename);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Could not open %s (again)", slavename);
 	}
 
 	if ((slavefd3 = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL, "Could not open %s (once more)", slavename);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Could not open %s (once more)",
+			 slavename);
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK, "close slave");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close slave");
 	}
 	if (close(slavefd2) != 0) {
-		tst_resm(TBROK, "close slave again");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close slave again");
 	}
 	if (close(slavefd3) != 0) {
-		tst_resm(TBROK, "close slave once more");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close slave once more");
 	}
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK, "close master");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close master");
 	}
 	tst_resm(TPASS, "test4");
 
@@ -402,36 +352,33 @@
 
 		slavename = ptsname(masterfd[i]);
 		if (slavename == NULL) {
-			tst_resm(TBROK | TERRNO, "ptsname() call failed");
-			tst_exit();
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "ptsname() call failed");
 		}
 
 		if (grantpt(masterfd[i]) != 0) {
-			tst_resm(TBROK | TERRNO, "grantpt() call failed");
-			tst_exit();
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "grantpt() call failed");
 		}
 
 		if (unlockpt(masterfd[i]) != 0) {
-			tst_resm(TBROK, "unlockpt() call failed");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "unlockpt() call failed");
 		}
 
 		if ((slavefd[i] = open(slavename, O_RDWR)) < 0) {
-			tst_resm(TFAIL, "Iteration %d: Could not open %s", i,
+			tst_brkm(TFAIL, NULL,
+				 "Iteration %d: Could not open %s", i,
 				 slavename);
-			tst_exit();
 		}
 
 	}
 
 	for (i = 0; i < NUMOPENS; ++i) {
 		if (close(slavefd[i]) != 0) {
-			tst_resm(TBROK, "Iteration %d: close slave", i);
-			tst_exit();
+			tst_brkm(TBROK, NULL, "Iteration %d: close slave", i);
 		}
 		if (close(masterfd[i]) != 0) {
-			tst_resm(TBROK, "close master");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "close master");
 		}
 	}
 	tst_resm(TPASS, "test5");
@@ -452,50 +399,41 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK | TERRNO, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK | TERRNO, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK, "unlockpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "unlockpt() call failed");
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK, "Could not open %s", slavename);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Could not open %s", slavename);
 	}
 
 	if (ioctl(slavefd, TCGETS, &termios) != 0) {
-		tst_resm(TFAIL, "TCGETS");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCGETS");
 	}
 
 	termios.c_cflag &= ~CBAUD;
 	termios.c_cflag |= B0 & CBAUD;
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL, "TCGETS");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "TCGETS");
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK, "close");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close");
 	}
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK, "close");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "close");
 	}
 	tst_resm(TPASS, "test6");
 
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
index c6e8945..3f286f1 100644
--- a/testcases/kernel/pty/pty01.c
+++ b/testcases/kernel/pty/pty01.c
@@ -288,19 +288,16 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK, "%s", MASTERCLONE);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "%s", MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK, "ptsname() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK, "grantpt() call failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
diff --git a/testcases/kernel/sched/nptl/nptl01.c b/testcases/kernel/sched/nptl/nptl01.c
index 8f62736..e7afaef 100644
--- a/testcases/kernel/sched/nptl/nptl01.c
+++ b/testcases/kernel/sched/nptl/nptl01.c
@@ -287,8 +287,8 @@
 	cleanup();
 
 #else
-	tst_resm(TCONF, "Skipping Execution - This system is not using NPTL");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "Skipping Execution - This system is not using NPTL");
 #endif
 
 	return 1;
diff --git a/testcases/kernel/security/cap_bound/cap_bounds_r.c b/testcases/kernel/security/cap_bound/cap_bounds_r.c
index d511155..934ed83 100644
--- a/testcases/kernel/security/cap_bound/cap_bounds_r.c
+++ b/testcases/kernel/security/cap_bound/cap_bounds_r.c
@@ -65,9 +65,9 @@
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, -1) returned %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "prctl(PR_CAPBSET_READ, -1) returned %d\n",
 			 ret);
-		tst_exit();
 	}
 
 	/* Ideally I'd check CAP_LAST_CAP+1, but userspace
diff --git a/testcases/kernel/security/cap_bound/cap_bounds_rw.c b/testcases/kernel/security/cap_bound/cap_bounds_rw.c
index 8b23ff8..2b54169 100644
--- a/testcases/kernel/security/cap_bound/cap_bounds_rw.c
+++ b/testcases/kernel/security/cap_bound/cap_bounds_rw.c
@@ -48,9 +48,9 @@
 		ret = -1;
 #endif
 		if (ret == -1) {
-			tst_resm(TBROK,
+			tst_brkm(TBROK,
+				 NULL,
 				 "Failed to read bounding set during sanity check\n");
-			tst_exit();
 		}
 		if (ret == 1) {
 			tst_resm(TFAIL,
@@ -68,9 +68,9 @@
 		ret = -1;
 #endif
 		if (ret == -1) {
-			tst_resm(TBROK,
+			tst_brkm(TBROK,
+				 NULL,
 				 "Failed to read bounding set during sanity check\n");
-			tst_exit();
 		}
 		if (ret == 0) {
 			tst_resm(TFAIL,
@@ -96,9 +96,9 @@
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, -1) returned %d\n",
+		tst_brkm(TFAIL, NULL,
+			 "prctl(PR_CAPBSET_DROP, -1) returned %d\n",
 			 ret);
-		tst_exit();
 	}
 	/* Ideally I'd check CAP_LAST_CAP+1, but userspace
 	 * tends to be far too unreliable to trust CAP_LAST_CAP>
@@ -136,15 +136,15 @@
 		}
 		ret = check_remaining_caps(i);
 		if (ret > 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "after dropping bits 0..%d, %d was still in bounding set\n",
 				 i, ret);
-			tst_exit();
 		} else if (ret < 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "after dropping bits 0..%d, %d was not in bounding set\n",
 				 i, -ret);
-			tst_exit();
 		}
 	}
 	tst_resm(TPASS, "PR_CAPBSET_DROP tests passed\n");
diff --git a/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c b/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
index da982ca..feb7fbd 100644
--- a/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
+++ b/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
@@ -52,31 +52,29 @@
 	/* make sure we have the capability now */
 	ret = prctl(PR_CAPBSET_READ, CAP_SYS_ADMIN);
 	if (ret != 1) {
-		tst_resm(TBROK, "Not starting with CAP_SYS_ADMIN\n");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Not starting with CAP_SYS_ADMIN\n");
 	}
 
 	/* Make sure it's in pI */
 	cur = cap_from_text("all=eip");
 	if (!cur) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Failed to create cap_sys_admin+i cap_t (errno %d)\n",
 			 errno);
-		tst_exit();
 	}
 	ret = cap_set_proc(cur);
 	if (ret) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
 			 ret, errno);
-		tst_exit();
 	}
 	cap_free(cur);
 	cur = cap_get_proc();
 	ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f);
 	if (ret || f != CAP_SET) {
-		tst_resm(TBROK, "Failed to add CAP_SYS_ADMIN to pI\n");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Failed to add CAP_SYS_ADMIN to pI\n");
 	}
 	cap_free(cur);
 
@@ -93,9 +91,9 @@
 	cur = cap_get_proc();
 	ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f);
 	if (ret || f != CAP_SET) {
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "CAP_SYS_ADMIN not in pI after dropping from bounding set\n");
-		tst_exit();
 	}
 	tst_resm(TPASS,
 		 "CAP_SYS_ADMIN remains in pI after removing from bounding set\n");
@@ -104,21 +102,21 @@
 	v[0] = CAP_SYS_ADMIN;
 	ret = cap_set_flag(tmpcap, CAP_INHERITABLE, 1, v, CAP_CLEAR);
 	if (ret) {
-		tst_resm(TFAIL, "Failed to drop CAP_SYS_ADMIN from cap_t\n");
-		tst_exit();
+		tst_brkm(TFAIL, NULL,
+			 "Failed to drop CAP_SYS_ADMIN from cap_t\n");
 	}
 	ret = cap_set_proc(tmpcap);
 	if (ret) {
-		tst_resm(TFAIL, "Failed to drop CAP_SYS_ADMIN from pI\n");
-		tst_exit();
+		tst_brkm(TFAIL, NULL,
+			 "Failed to drop CAP_SYS_ADMIN from pI\n");
 	}
 	cap_free(tmpcap);
 	/* test 2: can we put it back in pI? */
 	ret = cap_set_proc(cur);
 	if (ret == 0) {		/* success means pI was not bounded by X */
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "Managed to put CAP_SYS_ADMIN back into pI though not in X\n");
-		tst_exit();
 	}
 	cap_free(cur);
 
diff --git a/testcases/kernel/security/cap_bound/check_pe.c b/testcases/kernel/security/cap_bound/check_pe.c
index 3fb30ec..c4453ec 100644
--- a/testcases/kernel/security/cap_bound/check_pe.c
+++ b/testcases/kernel/security/cap_bound/check_pe.c
@@ -49,20 +49,18 @@
 	int n;
 
 	if (argc != 2) {
-		tst_resm(TBROK, "Usage: check_pe [0|1]\n");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Usage: check_pe [0|1]\n");
 	}
 	n = atoi(argv[1]);
 	if (n != 0 && n != 1) {
-		tst_resm(TBROK, "Usage: check_pe [0|1]\n");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Usage: check_pe [0|1]\n");
 	}
 
 	cur = cap_get_proc();
 	ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_EFFECTIVE, &f);
 	if (ret) {
-		tst_resm(TBROK, "cap_get_flag failed (errno %d)\n", errno);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "cap_get_flag failed (errno %d)\n",
+			 errno);
 	}
 
 	cap_free(cur);
@@ -71,8 +69,7 @@
 			tst_resm(TPASS, "cap is in pE\n");
 			tst_exit();
 		}
-		tst_resm(TFAIL, "cap is not in pE\n");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "cap is not in pE\n");
 	}
 	if (f == CAP_CLEAR) {
 		tst_resm(TPASS, "cap is not in pE\n");
diff --git a/testcases/kernel/security/cap_bound/exec_with_inh.c b/testcases/kernel/security/cap_bound/exec_with_inh.c
index 2050311..dd9ddb5 100644
--- a/testcases/kernel/security/cap_bound/exec_with_inh.c
+++ b/testcases/kernel/security/cap_bound/exec_with_inh.c
@@ -49,24 +49,23 @@
 	/* Make sure CAP_SYS_ADMIN is in pI */
 	cur = cap_from_text("all=eip");
 	if (!cur) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Failed to create cap_sys_admin+i cap_t (errno %d)\n",
 			 errno);
-		tst_exit();
 	}
 	ret = cap_set_proc(cur);
 	if (ret) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
 			 ret, errno);
-		tst_exit();
 	}
 	cap_free(cur);
 	cur = cap_get_proc();
 	ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f);
 	if (ret || f != CAP_SET) {
-		tst_resm(TBROK, "Failed to add CAP_SYS_ADMIN to pI\n");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Failed to add CAP_SYS_ADMIN to pI\n");
 	}
 	cap_free(cur);
 
diff --git a/testcases/kernel/security/cap_bound/exec_without_inh.c b/testcases/kernel/security/cap_bound/exec_without_inh.c
index f27b831..29b3123 100644
--- a/testcases/kernel/security/cap_bound/exec_without_inh.c
+++ b/testcases/kernel/security/cap_bound/exec_without_inh.c
@@ -56,9 +56,9 @@
 		if (!ret)
 			ret = cap_set_proc(cur);
 		if (ret) {
-			tst_resm(TBROK,
+			tst_brkm(TBROK,
+				 NULL,
 				 "Failed to drop cap_sys_admin from pI\n");
-			tst_exit();
 		}
 	} else if (ret) {
 		tst_brkm(TBROK | TERRNO, NULL, "Failed to add \
diff --git a/testcases/kernel/security/filecaps/inh_capped.c b/testcases/kernel/security/filecaps/inh_capped.c
index dd94832..03ad9e4 100644
--- a/testcases/kernel/security/filecaps/inh_capped.c
+++ b/testcases/kernel/security/filecaps/inh_capped.c
@@ -68,38 +68,33 @@
 	ret = set_caps_from_text("all=eip");
 	debug_print_caps("after raising all caps");
 	if (ret) {
-		tst_resm(TFAIL, "failed to raise all caps");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "failed to raise all caps");
 	}
 
 	ret = set_caps_from_text("all=iep cap_sys_admin-iep");
 	debug_print_caps("after first drop cap_sys_admin");
 	if (ret) {
-		tst_resm(TFAIL, "failed to drop capsysadmin from pI");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "failed to drop capsysadmin from pI");
 	}
 
 	/* we can't regain cap_sys_admin in pE or pP, only pI */
 	ret = set_caps_from_text("all=eip cap_sys_admin-ep+i");
 	debug_print_caps("after first raise cap_sys_admin");
 	if (ret) {
-		tst_resm(TFAIL, "failed to raise capsysadmin in pI");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "failed to raise capsysadmin in pI");
 	}
 
 	ret = set_caps_from_text("all=ip cap_setpcap-e+ip cap_sys_admin+i-ep");
 	debug_print_caps("after drop cappset");
 	if (ret) {
-		tst_resm(TFAIL, "failed to drop cappset from pE");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "failed to drop cappset from pE");
 	}
 
 	ret = set_caps_from_text("all=iep cap_sys_admin-iep cap_setpcap-e+ip");
 	debug_print_caps("after second drop cap_sys_admin");
 	if (ret) {
-		tst_resm(TFAIL, "failed to drop capsysadmin from pI "
+		tst_brkm(TFAIL, NULL, "failed to drop capsysadmin from pI "
 			 "after dropping cappset from pE");
-		tst_exit();
 	}
 
 	ret = set_caps_from_text("all=iep cap_sys_admin-ep+i cap_setpcap-e+ip");
diff --git a/testcases/kernel/security/securebits/check_keepcaps.c b/testcases/kernel/security/securebits/check_keepcaps.c
index 83042cf..b025492 100644
--- a/testcases/kernel/security/securebits/check_keepcaps.c
+++ b/testcases/kernel/security/securebits/check_keepcaps.c
@@ -85,8 +85,7 @@
 		tst_exit();
 	}
 	if (!have_privs && expect_privs == EXPECT_PRIVS) {
-		tst_resm(TFAIL, "expected to keep privs but did not");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "expected to keep privs but did not");
 	}
 	if (!have_privs && expect_privs == EXPECT_NOPRIVS) {
 		tst_resm(TPASS, "dropped privs as expected");
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index 87b0be5..e8652e4 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -115,11 +115,9 @@
 	/* check if acct is implemented in kernel */
 	if (acct(NULL) == -1) {
 		if (errno == ENOSYS) {
-			tst_resm(TCONF,
-				 "BSD process accounting is not configured in "
+			tst_brkm(TCONF,
+				 NULL, "BSD process accounting is not configured in "
 				 "this kernel");
-
-			tst_exit();
 		}
 	}
 }
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
index df9b99c..5335fab 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
@@ -121,9 +121,9 @@
 		}
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 ||
 	    (fd2 = eventfd2(0, EFD_SEMLIKE)) == -1) {
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate04.c b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
index d5779e4..45522e6 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate04.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
@@ -252,8 +252,7 @@
 #endif
 
 	if ((fd = open(filename, O_RDWR)) < 0) {
-		tst_resm(TFAIL, "child open");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "child open");
 	}
 	lseek(fd, 0, SEEK_SET);
 	flocks.l_type = F_WRLCK;
@@ -261,13 +260,11 @@
 	flocks.l_start = recstart;
 	flocks.l_len = reclen;
 	if (fcntl(fd, F_SETLKW, &flocks) < 0) {
-		tst_resm(TFAIL, "child fcntl failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "child fcntl failed");
 	}
 
 	if (kill(ppid, SIGUSR1) < 0) {
-		tst_resm(TFAIL, "child kill");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "child kill");
 	}
 
 	if (sync_pipe_notify(sync_pipes) == -1)
@@ -292,8 +289,7 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	}
 #ifdef UCLINUX
diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
index 5be244a..7c073a6 100644
--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
@@ -201,8 +201,7 @@
 	set = malloc(sizeof(cpu_set_t));
 #endif
 	if (set == NULL) {
-		tst_resm(TFAIL, "CPU_ALLOC:errno:%d", errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno);
 	}
 #if __GLIBC_PREREQ(2, 7)
 	size = CPU_ALLOC_SIZE(nrcpus);
@@ -237,8 +236,7 @@
 #endif
 	if (sched_setaffinity(0, size, set) < 0) {
 		CPU_FREE(set);
-		tst_resm(TFAIL, "sched_setaffinity:errno:%d", errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno);
 	}
 	CPU_FREE(set);
 	return cpu_max;
diff --git a/testcases/kernel/syscalls/getrusage/getrusage03.c b/testcases/kernel/syscalls/getrusage/getrusage03.c
index 09495e4..8b0768f 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage03.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage03.c
@@ -349,8 +349,7 @@
 	/* Disable test if the version of the kernel is less than 2.6.32 */
 	if ((tst_kvercmp(2, 6, 32)) < 0) {
 		tst_resm(TCONF, "This ru_maxrss field is not supported");
-		tst_resm(TCONF, "before kernel 2.6.32");
-		tst_exit();
+		tst_brkm(TCONF, NULL, "before kernel 2.6.32");
 	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
index 9d607fb..b9fd938 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
@@ -78,8 +78,7 @@
 	TEST(msgget(key, IPC_CREAT | IPC_EXCL));
 	msqid = TEST_RETURN;
 	if (TEST_RETURN == -1) {
-		tst_resm(TFAIL | TTERRNO, "msgget() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TTERRNO, NULL, "msgget() failed");
 	}
 
 	TEST(msgctl(msqid, IPC_STAT, &buf));
@@ -96,25 +95,24 @@
 	 */
 
 	if (buf.msg_qnum != 0) {
-		tst_resm(TFAIL, "error: unexpected nbr of messages %ld",
+		tst_brkm(TFAIL, NULL, "error: unexpected nbr of messages %ld",
 			 buf.msg_qnum);
-		tst_exit();
 	}
 	if (buf.msg_perm.uid != getuid()) {
-		tst_resm(TFAIL, "error: unexpected uid %d", buf.msg_perm.uid);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "error: unexpected uid %d",
+			 buf.msg_perm.uid);
 	}
 	if (buf.msg_perm.gid != getgid()) {
-		tst_resm(TFAIL, "error: unexpected gid %d", buf.msg_perm.gid);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "error: unexpected gid %d",
+			 buf.msg_perm.gid);
 	}
 	if (buf.msg_perm.cuid != getuid()) {
-		tst_resm(TFAIL, "error: unexpected cuid %d", buf.msg_perm.cuid);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "error: unexpected cuid %d",
+			 buf.msg_perm.cuid);
 	}
 	if (buf.msg_perm.cgid != getgid()) {
-		tst_resm(TFAIL, "error: unexpected cgid %d", buf.msg_perm.cgid);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "error: unexpected cgid %d",
+			 buf.msg_perm.cgid);
 	}
 
 	tst_resm(TPASS, "msgctl06 ran successfully!");
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
index 901259e..f3bb3cf 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
@@ -91,21 +91,19 @@
 
 	key = getipckey();
 	if ((msqid = msgget(key, IPC_CREAT | IPC_EXCL)) == -1) {
-		tst_resm(TFAIL | TERRNO, "msgget() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "msgget() failed");
 
 	}
 
 	pid = FORK_OR_VFORK();
 	if (pid < 0) {
 		(void)msgctl(msqid, IPC_RMID, NULL);
-		tst_resm(TFAIL, "\tFork failed (may be OK if under stress)");
-		tst_exit();
+		tst_brkm(TFAIL, NULL,
+			 "\tFork failed (may be OK if under stress)");
 	} else if (pid == 0) {
 #ifdef UCLINUX
 		if (self_exec(argv[0], "ndd", 1, msqid, c1_msgp.type) < 0) {
-			tst_resm(TFAIL, "\tself_exec failed");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "\tself_exec failed");
 		}
 #else
 		do_child_1();
@@ -139,21 +137,20 @@
 		wait(&status);
 	}
 	if ((status >> 8) == 1) {
-		tst_resm(TFAIL, "test failed. status = %d", (status >> 8));
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "test failed. status = %d",
+			 (status >> 8));
 	}
 
 	pid = FORK_OR_VFORK();
 	if (pid < 0) {
 		(void)msgctl(msqid, IPC_RMID, NULL);
-		tst_resm(TFAIL, "\tFork failed (may be OK if under stress)");
-		tst_exit();
+		tst_brkm(TFAIL, NULL,
+			 "\tFork failed (may be OK if under stress)");
 	} else if (pid == 0) {
 #ifdef UCLINUX
 		if (self_exec(argv[0], "ndddd", 1, msqid, c1_msgp.type,
 			      c2_msgp.type, c3_msgp.type) < 0) {
-			tst_resm(TFAIL, "\tself_exec failed");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "\tself_exec failed");
 		}
 #else
 		do_child_2();
@@ -205,8 +202,8 @@
 		wait(&status);
 	}
 	if ((status >> 8) == 1) {
-		tst_resm(TFAIL, "test failed. status = %d", (status >> 8));
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "test failed. status = %d",
+			 (status >> 8));
 	}
 	/*
 	 * Remove the message queue from the system
@@ -218,8 +215,7 @@
 	(void)msgctl(msqid, IPC_RMID, NULL);
 	if ((status = msgctl(msqid, IPC_STAT, NULL)) != -1) {
 		(void)msgctl(msqid, IPC_RMID, NULL);
-		tst_resm(TFAIL, "msgctl(msqid, IPC_RMID) failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "msgctl(msqid, IPC_RMID) failed");
 
 	}
 
@@ -243,18 +239,16 @@
 	int size;
 
 	if ((size = msgrcv(msqid, &c1_msgp, BYTES, 0, 0)) == -1) {
-		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "msgrcv() failed");
 	}
 	if (size != BYTES) {
-		tst_resm(TFAIL, "error: received %d bytes expected %d", size,
+		tst_brkm(TFAIL, NULL, "error: received %d bytes expected %d",
+			 size,
 			 BYTES);
-		tst_exit();
 	}
 	for (i = 0; i < BYTES; i++)
 		if (c1_msgp.text[i] != 'i') {
-			tst_resm(TFAIL, "error: corrup message");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "error: corrup message");
 		}
 	exit(0);
 }
@@ -265,46 +259,40 @@
 	int size;
 
 	if ((size = msgrcv(msqid, &c3_msgp, BYTES, 3, 0)) == -1) {
-		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "msgrcv() failed");
 	}
 	if (size != BYTES) {
-		tst_resm(TFAIL, "error: received %d bytes expected %d", size,
+		tst_brkm(TFAIL, NULL, "error: received %d bytes expected %d",
+			 size,
 			 BYTES);
-		tst_exit();
 	}
 	for (k = 0; k < BYTES; k++)
 		if (c3_msgp.text[k] != 'k') {
-			tst_resm(TFAIL, "error: corrupt message");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "error: corrupt message");
 		}
 	if ((size = msgrcv(msqid, &c2_msgp, BYTES, 2, 0)) == -1) {
-		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "msgrcv() failed");
 	}
 	if (size != BYTES) {
-		tst_resm(TFAIL, "error: received %d bytes expected %d", size,
+		tst_brkm(TFAIL, NULL, "error: received %d bytes expected %d",
+			 size,
 			 BYTES);
-		tst_exit();
 	}
 	for (j = 0; j < BYTES; j++)
 		if (c2_msgp.text[j] != 'j') {
-			tst_resm(TFAIL, "error: corrupt message");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "error: corrupt message");
 		}
 	if ((size = msgrcv(msqid, &c1_msgp, BYTES, 1, 0)) == -1) {
-		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "msgrcv() failed");
 	}
 	if (size != BYTES) {
-		tst_resm(TFAIL, "error: received %d bytes expected %d", size,
+		tst_brkm(TFAIL, NULL, "error: received %d bytes expected %d",
+			 size,
 			 BYTES);
-		tst_exit();
 	}
 	for (i = 0; i < BYTES; i++)
 		if (c1_msgp.text[i] != 'i') {
-			tst_resm(TFAIL, "error: corrupt message");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "error: corrupt message");
 		}
 
 	exit(0);
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
index 036b3e0..df0d7e0 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
@@ -120,10 +120,10 @@
 			nprocs = atoi(argv[2]);
 		}
 	} else {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 " Usage: %s [ number of iterations  number of processes ]",
 			 argv[0]);
-		tst_exit();
 	}
 
 	srand(getpid());
@@ -135,8 +135,7 @@
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTERM);
 	if (sigaction(SIGTERM, &act, NULL) < 0) {
-		tst_resm(TFAIL, "Sigset SIGTERM failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Sigset SIGTERM failed");
 	}
 	/* Set up array of unique keys for use in allocating message
 	 * queues
@@ -170,16 +169,15 @@
 	for (i = 0; i < nprocs; i++) {
 		fflush(stdout);
 		if ((pid = FORK_OR_VFORK()) < 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "\tFork failed (may be OK if under stress)");
-			tst_exit();
 		}
 		/* Child does this */
 		if (pid == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv[0], "ndd", 1, keyarray[i], i) < 0) {
-				tst_resm(TFAIL, "\tself_exec failed");
-				tst_exit();
+				tst_brkm(TFAIL, NULL, "\tself_exec failed");
 			}
 #else
 			procstat = 1;
@@ -193,9 +191,9 @@
 	while (1) {
 		if ((wait(&status)) > 0) {
 			if (status >> 8 != 0) {
-				tst_resm(TFAIL, "Child exit status = %d",
+				tst_brkm(TFAIL, NULL,
+					 "Child exit status = %d",
 					 status >> 8);
-				tst_exit();
 			}
 			count++;
 		} else {
@@ -209,10 +207,10 @@
 	}
 	/* Make sure proper number of children exited */
 	if (count != nprocs) {
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "Wrong number of children exited, Saw %d, Expected %d",
 			 count, nprocs);
-		tst_exit();
 	}
 
 	tst_resm(TPASS, "msgctl08 ran successfully!");
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
index f92a416..6fb3d83 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
@@ -134,10 +134,10 @@
 			nkids = atoi(argv[3]);
 		}
 	} else {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 " Usage: %s [ number of iterations  number of processes number of read/write pairs ]",
 			 argv[0]);
-		tst_exit();
 	}
 
 	procstat = 0;
@@ -146,8 +146,7 @@
 
 	/* Setup signal handleing routine */
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_resm(TFAIL, "Sigset SIGTERM failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Sigset SIGTERM failed");
 	}
 	/* Set up array of unique keys for use in allocating message
 	 * queues
@@ -180,16 +179,15 @@
 	for (i = 0; i < nprocs; i++) {
 		fflush(stdout);
 		if ((pid = FORK_OR_VFORK()) < 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "\tFork failed (may be OK if under stress)");
-			tst_exit();
 		}
 		/* Child does this */
 		if (pid == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv[0], "ndd", 1, keyarray[i], i) < 0) {
-				tst_resm(TFAIL, "\tself_exec failed");
-				tst_exit();
+				tst_brkm(TFAIL, NULL, "\tself_exec failed");
 			}
 #else
 			procstat = 1;
@@ -203,9 +201,9 @@
 	while (1) {
 		if ((wait(&status)) > 0) {
 			if (status >> 8 != PASS) {
-				tst_resm(TFAIL, "Child exit status = %d",
+				tst_brkm(TFAIL, NULL,
+					 "Child exit status = %d",
 					 status >> 8);
-				tst_exit();
 			}
 			count++;
 		} else {
@@ -219,10 +217,10 @@
 	}
 	/* Make sure proper number of children exited */
 	if (count != nprocs) {
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "Wrong number of children exited, Saw %d, Expected %d",
 			 count, nprocs);
-		tst_exit();
 	}
 
 	tst_resm(TPASS, "msgctl09 ran successfully!");
@@ -271,8 +269,7 @@
 	}
 
 	if (msgctl(tid, IPC_RMID, 0) < 0) {
-		tst_resm(TFAIL | TERRNO, "Msgctl error in cleanup");
-		tst_exit();
+		tst_brkm(TFAIL | TERRNO, NULL, "Msgctl error in cleanup");
 	}
 }
 
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
index 977881f..9914f66 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
@@ -117,10 +117,10 @@
 			nprocs = atoi(argv[2]);
 		}
 	} else {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 " Usage: %s [ number of iterations  number of processes ]",
 			 argv[0]);
-		tst_exit();
 	}
 
 	srand(getpid());
@@ -166,9 +166,9 @@
 	for (i = 0; i < nprocs; i++) {
 		fflush(stdout);
 		if ((pid = FORK_OR_VFORK()) < 0) {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "\tFork failed (may be OK if under stress)");
-			tst_exit();
 		}
 		/* Child does this */
 		if (pid == 0) {
@@ -187,9 +187,9 @@
 	while (1) {
 		if ((wait(&status)) > 0) {
 			if (status >> 8 != 0) {
-				tst_resm(TFAIL, "Child exit status = %d",
+				tst_brkm(TFAIL, NULL,
+					 "Child exit status = %d",
 					 status >> 8);
-				tst_exit();
 			}
 			count++;
 		} else {
@@ -203,10 +203,10 @@
 	}
 	/* Make sure proper number of children exited */
 	if (count != nprocs) {
-		tst_resm(TFAIL,
+		tst_brkm(TFAIL,
+			 NULL,
 			 "Wrong number of children exited, Saw %d, Expected %d",
 			 count, nprocs);
-		tst_exit();
 	}
 
 	tst_resm(TPASS, "msgctl10 ran successfully!");
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl06.c b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
index a9cbf68..50974cb 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl06.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
@@ -215,9 +215,8 @@
 				if (asprintf(&maxsemstring, "%s%s%d",
 					     maxsemstring, (j ? ":" : ""),
 					     maxsemvals[j]) < 0) {
-					tst_resm(TBROK, "Could not serialize "
+					tst_brkm(TBROK, NULL, "Could not serialize "
 						 "maxsemvals");
-					tst_exit();
 				}
 			}
 			if (self_exec(argv0, "dS", id, maxsemstring) < 0) {
@@ -298,14 +297,12 @@
 	tok = strtok(maxsemstring, ":");
 	for (i = 0; i < NSEMS; i++) {
 		if (strlen(tok) == 0) {
-			tst_resm(TBROK, "Invalid argument to -C option");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "Invalid argument to -C option");
 		}
 
 		maxsemvals[i] = strtol(tok, &endptr, 10);
 		if (*endptr != '\0') {
-			tst_resm(TBROK, "Invalid argument to -C option");
-			tst_exit();
+			tst_brkm(TBROK, NULL, "Invalid argument to -C option");
 		}
 		tok = strtok(NULL, ":");
 	}
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl07.c b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
index f4c7c8b..fce5c4b 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl07.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl07.c
@@ -171,8 +171,7 @@
 	nsems = 1;
 
 	if ((semid = semget(key, nsems, SEM_RA | IPC_CREAT)) == -1) {
-		tst_resm(TFAIL, "semget() failed errno = %d", errno);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "semget() failed errno = %d", errno);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
index 9226980..1af2359 100644
--- a/testcases/kernel/syscalls/kill/kill12.c
+++ b/testcases/kernel/syscalls/kill/kill12.c
@@ -119,9 +119,8 @@
 		if (pid == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv[0], "dd", temp, sig) < 0) {
-				tst_resm(TBROK, "self_exec FAILED - "
+				tst_brkm(TBROK, NULL, "self_exec FAILED - "
 					 "terminating test.");
-				tst_exit();
 			}
 #else
 			do_child();
@@ -267,8 +266,7 @@
 
 int forkfail(void)
 {
-	tst_resm(TBROK, "FORK FAILED - terminating test.");
-	tst_exit();
+	tst_brkm(TBROK, NULL, "FORK FAILED - terminating test.");
 }
 
 /****** ** **   *******/
diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
index 55f1849..1413c40 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
@@ -212,8 +212,8 @@
 
 	if ((pidlist = malloc((child_groups * NCHILD) * sizeof(int))) ==
 	    NULL) {
-		tst_resm(TWARN, "\tMalloc failed (may be OK if under stress)");
-		tst_exit();
+		tst_brkm(TWARN, NULL,
+			 "\tMalloc failed (may be OK if under stress)");
 	}
 
 	child_count = 0;
@@ -265,10 +265,10 @@
 	while (1) {
 		if ((child = wait(&status)) > 0) {
 			if (status != 0) {
-				tst_resm(TWARN,
+				tst_brkm(TWARN,
+					 NULL,
 					 "\tChild{%d} exited status = %0x",
 					 child, status);
-				tst_exit();
 			}
 			count++;
 		} else {
@@ -285,15 +285,14 @@
 
 	if (count != child_count) {
 		tst_resm(TWARN, "\tWrong number of children waited on!");
-		tst_resm(TWARN, "\tSaw %d, expected %d", count, NCHILD);
-		tst_exit();
+		tst_brkm(TWARN, NULL, "\tSaw %d, expected %d", count,
+			 NCHILD);
 	}
 
 	/* Check for core file in test directory. */
 
 	if (access("core", 0) == 0) {
-		tst_resm(TWARN, "\tCore file found in test directory.");
-		tst_exit();
+		tst_brkm(TWARN, NULL, "\tCore file found in test directory.");
 	}
 
 	/* Remove expected files */
@@ -301,10 +300,10 @@
 	for (j = 0; j < nfiles; j += NCHILD) {
 		sprintf(tmpdir, DIR_NAME, j);
 		if (rmdir(tmpdir) < 0) {
-			tst_resm(TWARN,
+			tst_brkm(TWARN,
+				 NULL,
 				 "\tError removing expected directory, ERRNO = %d",
 				 errno);
-			tst_exit();
 		}
 	}
 
@@ -373,8 +372,7 @@
 	/* Routine to handle SIGTERM signal. */
 
 	if (parent_pid == getpid()) {
-		tst_resm(TWARN, "\tsignal SIGTERM received by parent.");
-		tst_exit();
+		tst_brkm(TWARN, NULL, "\tsignal SIGTERM received by parent.");
 	}
 	sigterm++;
 	if (jump) {
diff --git a/testcases/kernel/syscalls/mlockall/mlockall03.c b/testcases/kernel/syscalls/mlockall/mlockall03.c
index 6600546..79ef3ab 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall03.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall03.c
@@ -121,8 +121,7 @@
 
 	/* allocate some space for buf */
 	if ((buf = malloc((size_t)sizeof(struct utsname))) == NULL) {
-		tst_resm(TFAIL, "malloc failed for buf");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "malloc failed for buf");
 	}
 
 	if (uname(buf) < 0) {
@@ -130,9 +129,9 @@
 	}
 
 	if ((compare(ref_release, buf->release)) <= 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "In Linux 2.6.8 and earlier this test will not run.");
-		tst_exit();
 	}
 
 	setup();
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
index c998003..75cb87e 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
@@ -263,9 +263,9 @@
 #elif HAVE_MODIFY_LDT
 int main(void)
 {
-	tst_resm(TCONF,
+	tst_brkm(TCONF,
+		 NULL,
 		 "modify_ldt is available but not tested on the platform than __i386__");
-	tst_exit();
 }
 
 #else
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
index 2aa03e4..0337fe6 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
@@ -236,9 +236,9 @@
 #elif HAVE_MODIFY_LDT
 int main(void)
 {
-	tst_resm(TCONF,
+	tst_brkm(TCONF,
+		 NULL,
 		 "modify_ldt is available but not tested on the platform than __i386__");
-	tst_exit();
 }
 
 #else /* if defined(__i386__) */
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c
index 50740ce..c142518 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c
@@ -94,10 +94,9 @@
 
 int main(void)
 {
-	tst_resm(TCONF,
-		 "modify_ldt is available but not tested on the platform than "
+	tst_brkm(TCONF,
+		 NULL, "modify_ldt is available but not tested on the platform than "
 		 "__i386__");
-	tst_exit();
 }
 
 #else /* if defined(__i386__) */
diff --git a/testcases/kernel/syscalls/move_pages/move_pages11.c b/testcases/kernel/syscalls/move_pages/move_pages11.c
index 2dcb3e3..600232b 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages11.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages11.c
@@ -213,13 +213,12 @@
 	check_config(TEST_NODES);
 
 	if ((ltpuser = getpwnam("nobody")) == NULL) {
-		tst_resm(TBROK, "'nobody' user not present");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "'nobody' user not present");
 	}
 
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TBROK, "setting uid to %d failed", ltpuser->pw_uid);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "setting uid to %d failed",
+			 ltpuser->pw_uid);
 	}
 
 	/* Pause if that option was specified
diff --git a/testcases/kernel/syscalls/nftw/tools.c b/testcases/kernel/syscalls/nftw/tools.c
index 04a50da..b5c7dfb 100644
--- a/testcases/kernel/syscalls/nftw/tools.c
+++ b/testcases/kernel/syscalls/nftw/tools.c
@@ -264,8 +264,7 @@
  */
 void fail_exit(void)
 {
-	tst_resm(TFAIL, "Test failed");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed");
 }
 
 /**************/
diff --git a/testcases/kernel/syscalls/nftw/tools64.c b/testcases/kernel/syscalls/nftw/tools64.c
index 6e9d499..3537a73 100644
--- a/testcases/kernel/syscalls/nftw/tools64.c
+++ b/testcases/kernel/syscalls/nftw/tools64.c
@@ -264,8 +264,7 @@
  */
 void fail_exit(void)
 {
-	tst_resm(TFAIL, "Test failed");
-	tst_exit();
+	tst_brkm(TFAIL, NULL, "Test failed");
 }
 
 /**************/
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_01.c b/testcases/kernel/syscalls/pipe2/pipe2_01.c
index e813f11..d4cc766 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_01.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_01.c
@@ -139,9 +139,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_02.c b/testcases/kernel/syscalls/pipe2/pipe2_02.c
index 5850825..09ac043 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_02.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_02.c
@@ -130,9 +130,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace04.c b/testcases/kernel/syscalls/ptrace/ptrace04.c
index d09e671..574cb2d 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace04.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace04.c
@@ -119,8 +119,8 @@
 	tst_resm(TINFO, "After exec() in child");
 	errno = 0;
 	if (ptrace(PTRACE_SYSCALL, pid, NULL, NULL) && errno) {
-		tst_resm(TFAIL, "PTRACE_SYSCALL failed: %s", strerror(errno));
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "PTRACE_SYSCALL failed: %s",
+			 strerror(errno));
 	}
 	compare_registers(0x00);
 	compare_registers(0xff);
diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c
index 7b27fa9..43c0f45 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace05.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace05.c
@@ -67,18 +67,18 @@
 		end_signum = (int)strtol((const char *)*(argv + 2), NULL, 10);
 		/* Parse the signal value. */
 		if (end_signum == 0 && errno != 0) {
-			tst_resm(TBROK, "argument (%s) isn't a valid number.\n",
+			tst_brkm(TBROK, NULL,
+				 "argument (%s) isn't a valid number.\n",
 				 *(argv + 2));
-			tst_exit();
 		}
 		/* FALLTHROUGH */
 	case 2:
 		start_signum = (int)strtol((const char *)*(argv + 1), NULL, 10);
 		/* Parse the signal value. */
 		if (end_signum == 0 && errno != 0) {
-			tst_resm(TBROK, "argument (%s) isn't a valid number.\n",
+			tst_brkm(TBROK, NULL,
+				 "argument (%s) isn't a valid number.\n",
 				 *(argv + 1));
-			tst_exit();
 		}
 		break;
 	case 1:
diff --git a/testcases/kernel/syscalls/pwrite/pwrite04.c b/testcases/kernel/syscalls/pwrite/pwrite04.c
index 4b3e83d..e11901d 100644
--- a/testcases/kernel/syscalls/pwrite/pwrite04.c
+++ b/testcases/kernel/syscalls/pwrite/pwrite04.c
@@ -233,8 +233,8 @@
 	for (i = 0; i < NBUFS; i++) {
 		wbuf[i] = malloc(K1);
 		if (wbuf[i] == NULL) {
-			tst_resm(TBROK, "ib: malloc failed: errno=%d", errno);
-			tst_exit();
+			tst_brkm(TBROK, NULL, "ib: malloc failed: errno=%d",
+				 errno);
 		}
 		memset(wbuf[i], i, K1);
 	}
@@ -250,9 +250,9 @@
 	off_t offloc;
 
 	if ((offloc = lseek(fdesc, offset, whence)) != checkoff) {
-		tst_resm(TFAIL, "(%ld = lseek(%d, %ld, %d)) != %ld) errno = %d",
+		tst_brkm(TFAIL, NULL,
+			 "(%ld = lseek(%d, %ld, %d)) != %ld) errno = %d",
 			 offloc, fdesc, offset, whence, checkoff, errno);
-		tst_exit();
 	}
 }
 
diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
index 28774a0..5810db7 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl01.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
@@ -189,8 +189,7 @@
 #ifdef BROKEN_QUOTACTL
 int main(void)
 {
-	tst_resm(TBROK, "This system doesn't support quota v2");
-	tst_exit();
+	tst_brkm(TBROK, NULL, "This system doesn't support quota v2");
 }
 #else
 int cmd[] = {
diff --git a/testcases/kernel/syscalls/rename/rename14.c b/testcases/kernel/syscalls/rename/rename14.c
index 1aab157..5f119f2 100644
--- a/testcases/kernel/syscalls/rename/rename14.c
+++ b/testcases/kernel/syscalls/rename/rename14.c
@@ -85,8 +85,7 @@
 	act.sa_mask = set;
 	act.sa_flags = 0;
 	if (sigaction(SIGTERM, &act, &oact)) {
-		tst_resm(TBROK, "Sigaction(SIGTERM)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Sigaction(SIGTERM)");
 	}
 
 	sigemptyset(&set);
@@ -94,8 +93,7 @@
 	act.sa_mask = set;
 	act.sa_flags = 0;
 	if (sigaction(SIGALRM, &act, 0)) {
-		tst_resm(TBROK, "Sigaction(SIGALRM)");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "Sigaction(SIGALRM)");
 	}
 	parent_pid = getpid();
 	tst_tmpdir();
@@ -103,8 +101,7 @@
 
 	pid = FORK_OR_VFORK();
 	if (pid < 0) {
-		tst_resm(TBROK, "fork() returned %d", pid);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork() returned %d", pid);
 	}
 	if (pid == 0) {
 #ifdef UCLINUX
@@ -120,8 +117,7 @@
 	if (pid < 0) {
 		(void)kill(kidpid[0], SIGTERM);
 		(void)unlink("./rename14");
-		tst_resm(TBROK, "fork() returned %d", pid);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "fork() returned %d", pid);
 	}
 	if (pid == 0) {
 #ifdef UCLINUX
diff --git a/testcases/kernel/syscalls/sendfile/sendfile08.c b/testcases/kernel/syscalls/sendfile/sendfile08.c
index ab886c1..a10fa56 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile08.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile08.c
@@ -99,8 +99,7 @@
 	/* Disable test if the version of the kernel is less than 2.6.33 */
 	if ((tst_kvercmp(2, 6, 33)) < 0) {
 		tst_resm(TCONF, "The out_fd must be socket before kernel");
-		tst_resm(TCONF, "2.6.33, see kernel commit cc56f7d");
-		tst_exit();
+		tst_brkm(TCONF, NULL, "2.6.33, see kernel commit cc56f7d");
 	}
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/setsid/setsid01.c b/testcases/kernel/syscalls/setsid/setsid01.c
index eee6edb..9e62da3 100644
--- a/testcases/kernel/syscalls/setsid/setsid01.c
+++ b/testcases/kernel/syscalls/setsid/setsid01.c
@@ -165,14 +165,12 @@
 	}
 
 	if ((pid = FORK_OR_VFORK()) == -1) {
-		tst_resm(TFAIL, "Fork failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Fork failed");
 	}
 	if (pid == 0) {
 #ifdef UCLINUX
 		if (self_exec(argv0, "n", 2) < 0) {
-			tst_resm(TFAIL, "self_exec failed");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "self_exec failed");
 		}
 #else
 		do_child_2();
diff --git a/testcases/kernel/syscalls/signalfd/signalfd01.c b/testcases/kernel/syscalls/signalfd/signalfd01.c
index f9b5669..b12fafc 100644
--- a/testcases/kernel/syscalls/signalfd/signalfd01.c
+++ b/testcases/kernel/syscalls/signalfd/signalfd01.c
@@ -79,8 +79,7 @@
 #ifdef USE_STUB
 int main(int argc, char **argv)
 {
-	tst_resm(TCONF, "System doesn't support execution of the test");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
 }
 
 #else
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
index 7d29649..75b0e4e 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
@@ -137,9 +137,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
index ff75d0b..2347338 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
@@ -132,9 +132,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/socket/socket02.c b/testcases/kernel/syscalls/socket/socket02.c
index 87f6b04..1149691 100644
--- a/testcases/kernel/syscalls/socket/socket02.c
+++ b/testcases/kernel/syscalls/socket/socket02.c
@@ -140,9 +140,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/socket/socket03.c b/testcases/kernel/syscalls/socket/socket03.c
index 56696b8..fe96a6b 100644
--- a/testcases/kernel/syscalls/socket/socket03.c
+++ b/testcases/kernel/syscalls/socket/socket03.c
@@ -127,9 +127,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/splice/splice02.c b/testcases/kernel/syscalls/splice/splice02.c
index ab5b11d..ee7798b 100644
--- a/testcases/kernel/syscalls/splice/splice02.c
+++ b/testcases/kernel/syscalls/splice/splice02.c
@@ -72,8 +72,8 @@
 	setup();
 
 	if (ac < 2) {
-		tst_resm(TFAIL, "%s failed - Usage: %s outfile", TCID, av[0]);
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "%s failed - Usage: %s outfile", TCID,
+			 av[0]);
 	}
 
 	fd = SAFE_OPEN(cleanup, av[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
diff --git a/testcases/kernel/syscalls/switch/endian_switch01.c b/testcases/kernel/syscalls/switch/endian_switch01.c
index 8ca003d..a71ef29 100644
--- a/testcases/kernel/syscalls/switch/endian_switch01.c
+++ b/testcases/kernel/syscalls/switch/endian_switch01.c
@@ -116,9 +116,9 @@
 {
 
 	if ((tst_kvercmp(2, 6, 26)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.26 and higher");
-		tst_exit();
 	}
 	setup();
 	for (; *auxv != AT_NULL && *auxv != AT_HWCAP; auxv += 2) ;
@@ -130,8 +130,7 @@
 	if (sigsetjmp(jb, 1) == 0)
 		do_le_switch();
 	if (got_sigill) {
-		tst_resm(TFAIL, "Got SIGILL - test failed");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "Got SIGILL - test failed");
 	}
 	tst_resm(TPASS, "endian_switch() syscall tests passed");
 	tst_exit();
diff --git a/testcases/kernel/syscalls/sysctl/sysctl01.c b/testcases/kernel/syscalls/sysctl/sysctl01.c
index aec4c52..9cfd169 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl01.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl01.c
@@ -200,7 +200,7 @@
 int main(void)
 {
 
-	tst_resm(TCONF, "This test needs a kernel that has sysctl syscall.");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "This test needs a kernel that has sysctl syscall.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/sysctl/sysctl03.c b/testcases/kernel/syscalls/sysctl/sysctl03.c
index bdec288..cb71ff9 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl03.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl03.c
@@ -224,7 +224,7 @@
 int main(void)
 {
 
-	tst_resm(TCONF, "This test needs a kernel that has sysctl syscall.");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "This test needs a kernel that has sysctl syscall.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/sysctl/sysctl04.c b/testcases/kernel/syscalls/sysctl/sysctl04.c
index a8b067c..08d25b6 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl04.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl04.c
@@ -177,7 +177,7 @@
 int main(void)
 {
 
-	tst_resm(TCONF, "This test needs a kernel that has sysctl syscall.");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "This test needs a kernel that has sysctl syscall.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/sysctl/sysctl05.c b/testcases/kernel/syscalls/sysctl/sysctl05.c
index 9cc7169..4036b50 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl05.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl05.c
@@ -204,7 +204,7 @@
 int main(void)
 {
 
-	tst_resm(TCONF, "This test needs a kernel that has sysctl syscall.");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "This test needs a kernel that has sysctl syscall.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/syslog/syslogtst.c b/testcases/kernel/syscalls/syslog/syslogtst.c
index 0935503..b976698 100644
--- a/testcases/kernel/syscalls/syslog/syslogtst.c
+++ b/testcases/kernel/syscalls/syslog/syslogtst.c
@@ -169,9 +169,9 @@
 #endif
 			flag3 = 1;
 		} else {
-			tst_resm(TFAIL,
+			tst_brkm(TFAIL,
+				 NULL,
 				 "Cannot move /var/log/messages. Setup failed...exiting...");
-			tst_exit();
 		}
 		sleep(10);
 
@@ -190,9 +190,9 @@
 			status = 0;
 #endif
 			if (status != 0) {
-				tst_resm(TFAIL,
-					 "Restoring /var/log/messages failed...");
-				tst_exit();
+				tst_brkm(TFAIL,
+					 NULL,
+				         "Restoring /var/log/messages failed...");
 			}
 #ifdef DEBUG
 			else
diff --git a/testcases/kernel/syscalls/timerfd/timerfd01.c b/testcases/kernel/syscalls/timerfd/timerfd01.c
index 96c0bb7..02d2efe 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd01.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd01.c
@@ -274,7 +274,7 @@
 int main(void)
 {
 
-	tst_resm(TCONF, "This test needs a kernel that has timerfd syscall.");
-	tst_exit();
+	tst_brkm(TCONF, NULL,
+		 "This test needs a kernel that has timerfd syscall.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/timerfd/timerfd02.c b/testcases/kernel/syscalls/timerfd/timerfd02.c
index 56f2e3d..b09a424 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd02.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd02.c
@@ -135,9 +135,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/timerfd/timerfd03.c b/testcases/kernel/syscalls/timerfd/timerfd03.c
index d1ad676..3960d50 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd03.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd03.c
@@ -131,9 +131,9 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF,
+			 NULL,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/umount/umount01.c b/testcases/kernel/syscalls/umount/umount01.c
index 7c2213d..763547d 100644
--- a/testcases/kernel/syscalls/umount/umount01.c
+++ b/testcases/kernel/syscalls/umount/umount01.c
@@ -63,12 +63,10 @@
 			TEST(umount(mntpoint));
 			if (TEST_RETURN != 0) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL, "umount(2) Failed while "
+				tst_brkm(TFAIL, NULL, "umount(2) Failed while "
 					 " unmounting %s errno = %d : %s",
 					 mntpoint, TEST_ERRNO,
 					 strerror(TEST_ERRNO));
-				/* Exit here, otherwise subsequent test fails */
-				tst_exit();
 			} else {
 				tst_resm(TPASS, "umount(2) Passed ");
 			}
diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c
index 16b0a76..bfc3c95 100644
--- a/testcases/kernel/syscalls/unshare/unshare01.c
+++ b/testcases/kernel/syscalls/unshare/unshare01.c
@@ -293,7 +293,6 @@
 #else
 int main(void)
 {
-	tst_resm(TCONF, "unshare is undefined.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "unshare is undefined.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/unshare/unshare02.c b/testcases/kernel/syscalls/unshare/unshare02.c
index 5a71165..47e0d1d 100644
--- a/testcases/kernel/syscalls/unshare/unshare02.c
+++ b/testcases/kernel/syscalls/unshare/unshare02.c
@@ -220,7 +220,6 @@
 #else
 int main(void)
 {
-	tst_resm(TCONF, "unshare is undefined.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "unshare is undefined.");
 }
 #endif
diff --git a/testcases/kernel/syscalls/waitid/waitid01.c b/testcases/kernel/syscalls/waitid/waitid01.c
index 9fda13a..551d12c 100644
--- a/testcases/kernel/syscalls/waitid/waitid01.c
+++ b/testcases/kernel/syscalls/waitid/waitid01.c
@@ -140,9 +140,9 @@
 			} else {
 				TEST(waitid(P_ALL, getpid(), &infop, WEXITED));
 				if (TEST_RETURN == -1) {
-					tst_resm(TFAIL | TTERRNO,
+					tst_brkm(TFAIL | TTERRNO,
+						 NULL,
 						 "waitid(getpid()) failed");
-					tst_exit();
 				} else
 					display_status(&infop);	//CLD_EXITED = 1
 			}
@@ -155,9 +155,8 @@
 			} else {
 				TEST(waitid(P_ALL, 0, &infop, WEXITED));
 				if (TEST_RETURN == -1) {
-					tst_resm(TFAIL | TTERRNO,
-						 "waitid(0) failed");
-					tst_exit();
+					tst_brkm(TFAIL | TTERRNO,
+						 NULL, "waitid(0) failed");
 				} else
 					display_status(&infop);	//CLD_DUMPED = 3 ; SIGFPE = 8
 			}
@@ -170,8 +169,8 @@
 			TEST(kill(pid, SIGHUP));
 			TEST(waitid(P_ALL, 0, &infop, WEXITED));
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL | TTERRNO, "waitid(0) failed");
-				tst_exit();
+				tst_brkm(TFAIL | TTERRNO, NULL,
+					 "waitid(0) failed");
 			} else
 				display_status(&infop);	//CLD_KILLED = 2 ; SIGHUP = 1
 		}
diff --git a/testcases/kernel/syscalls/waitpid/waitpid07.c b/testcases/kernel/syscalls/waitpid/waitpid07.c
index 60854b9..ad7d620 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid07.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid07.c
@@ -179,9 +179,8 @@
 		}
 
 		if (ret_val < 0) {
-			tst_resm(TFAIL, "Fork kid %d failed. "
+			tst_brkm(TFAIL, NULL, "Fork kid %d failed. "
 				 "errno = %d", kid_count, errno);
-			tst_exit();
 		}
 
 		/* parent */
@@ -207,9 +206,8 @@
 	 */
 	for (i = 0; i < MAXKIDS; i++) {
 		if (kill(fork_kid_pid[i], SIGINT) < 0) {
-			tst_resm(TFAIL, "Kill of child %d "
+			tst_brkm(TFAIL, NULL, "Kill of child %d "
 				 "failed, errno = %d", i, errno);
-			tst_exit();
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/waitpid/waitpid08.c b/testcases/kernel/syscalls/waitpid/waitpid08.c
index 7408064..ce6149c 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid08.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid08.c
@@ -208,9 +208,8 @@
 	 */
 	for (i = 0; i < MAXKIDS; i++) {
 		if (kill(fork_kid_pid[i], SIGINT) < 0) {
-			tst_resm(TFAIL, "Kill of child %d "
+			tst_brkm(TFAIL, NULL, "Kill of child %d "
 				 "failed, errno = %d", i, errno);
-			tst_exit();
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/waitpid/waitpid10.c b/testcases/kernel/syscalls/waitpid/waitpid10.c
index 5570b64..4beda37 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid10.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid10.c
@@ -467,14 +467,13 @@
 	for (i = 0; i < 50; i++) {
 		fork_pid = FORK_OR_VFORK();
 		if (fork_pid < 0) {
-			tst_resm(TFAIL, "Fork failed");
-			tst_exit();
+			tst_brkm(TFAIL, NULL, "Fork failed");
 		}
 		if (fork_pid == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv0, "n", 5) < 0) {
-				tst_resm(TFAIL, "do_fork self_exec failed");
-				tst_exit();
+				tst_brkm(TFAIL, NULL,
+					 "do_fork self_exec failed");
 			}
 #else
 			do_mkdir();
diff --git a/testcases/misc/f00f/f00f.c b/testcases/misc/f00f/f00f.c
index 1ca88ee..90de0c4 100644
--- a/testcases/misc/f00f/f00f.c
+++ b/testcases/misc/f00f/f00f.c
@@ -68,16 +68,15 @@
 	 * we shouldn't get here, the f00f instruction should trigger
 	 * a SIGILL or lock the system.
 	 */
-	tst_resm(TFAIL, "f00f instruction did not properly cause SIGILL");
-	tst_exit();
+	tst_brkm(TFAIL, NULL,
+		 "f00f instruction did not properly cause SIGILL");
 }
 
 #else /* __i386__ */
 
 int main()
 {
-	tst_resm(TCONF, "f00f bug test only for i386");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "f00f bug test only for i386");
 }
 
 #endif /* __i386__ */
diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong.c b/testcases/network/tcp_cmds/perf_lan/pingpong.c
index 59bca58..d02b552 100644
--- a/testcases/network/tcp_cmds/perf_lan/pingpong.c
+++ b/testcases/network/tcp_cmds/perf_lan/pingpong.c
@@ -133,9 +133,8 @@
 #endif
 			hostname = hp->h_name;
 		} else {
-			tst_resm(TBROK, "%s: unknown host, couldn't get "
+			tst_brkm(TBROK, NULL, "%s: unknown host, couldn't get "
 				 "address", argv[0]);
-			tst_exit();
 		}
 
 	}
@@ -146,16 +145,14 @@
 	if (argc >= 3)
 		datalen = atoi(argv[2]);
 	if (datalen < 0) {
-		tst_resm(TBROK, "datalen must be an integer.");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "datalen must be an integer.");
 	} else
 		datalen = 64;
 
 	datalen -= 8;
 
 	if (datalen > MAXPACKET) {
-		tst_resm(TBROK, "packet size too large");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "packet size too large");
 	}
 	if (datalen >= sizeof(struct timeval))
 		timing = 1;
diff --git a/testcases/network/tcp_cmds/sendfile/testsf_c.c b/testcases/network/tcp_cmds/sendfile/testsf_c.c
index d4327c3..05c8ad7 100644
--- a/testcases/network/tcp_cmds/sendfile/testsf_c.c
+++ b/testcases/network/tcp_cmds/sendfile/testsf_c.c
@@ -39,9 +39,9 @@
 	int port;
 
 	if (argc != 6) {
-		tst_resm(TBROK,
+		tst_brkm(TBROK,
+			 NULL,
 			 "usage: server-ip port client-file server-file file-len");
-		tst_exit();
 	}
 
 	int i;
@@ -50,8 +50,7 @@
 
 	/* open socket to server */
 	if ((s = socket(AFI, SOCK_STREAM, 0)) < 0) {
-		tst_resm(TBROK, "socket error = %d\n", errno);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "socket error = %d\n", errno);
 	}
 
 	clnt_fname = argv[3];	/* filename to create */
@@ -76,8 +75,7 @@
 			 argv[1], gai_strerror(gai));
 	}
 	if (!hp || !hp->ai_addr || hp->ai_addr->sa_family != AFI) {
-		tst_resm(TBROK, "getaddrinfo failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "getaddrinfo failed");
 	}
 
 	tst_resm(TINFO, "rbuf => %s\n", rbuf);
@@ -113,9 +111,9 @@
 	while ((nbyte = read(s, rbuf, PATH_MAX)) > 0) {
 		nlen += nbyte;
 		if (write(fd, rbuf, nbyte) != nbyte) {
-			tst_resm(TBROK, "Error writing to file %s on client\n",
+			tst_brkm(TBROK, NULL,
+				 "Error writing to file %s on client\n",
 				 clnt_fname);
-			tst_exit();
 		}
 	}
 
diff --git a/testcases/network/tcp_cmds/sendfile/testsf_s.c b/testcases/network/tcp_cmds/sendfile/testsf_s.c
index 4f7870f..792fdd6 100644
--- a/testcases/network/tcp_cmds/sendfile/testsf_s.c
+++ b/testcases/network/tcp_cmds/sendfile/testsf_s.c
@@ -44,14 +44,12 @@
 	int port;
 
 	if (argc != 3) {
-		tst_resm(TBROK, "usage: listen-address listen-port");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "usage: listen-address listen-port");
 	}
 
 	/* open socket */
 	if ((s = socket(AFI, SOCK_STREAM, 0)) < 0) {
-		tst_resm(TBROK, "socket error = %d\n", errno);
-		tst_exit();
+		tst_brkm(TBROK, NULL, "socket error = %d\n", errno);
 	}
 
 	signal(SIGCHLD, SIG_IGN);	/* ignore signals from children */
@@ -59,12 +57,10 @@
 	memset(&hints, 0, sizeof(hints));
 	hints.ai_family = PFI;
 	if ((gai = getaddrinfo(argv[1], NULL, &hints, &hp)) != 0) {
-		tst_resm(TBROK, "getaddrinfo failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "getaddrinfo failed");
 	}
 	if (!hp || !hp->ai_addr || hp->ai_addr->sa_family != AFI) {
-		tst_resm(TBROK, "getaddrinfo failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "getaddrinfo failed");
 	}
 
 	/* server IP and port */