Merge branch 'master' into ltp-broom

Checkpoint work.

Conflicts:
	doc/man3/tst_res.3
	lib/tst_res.c
	testcases/commands/ade/size/test.c
	testcases/kernel/containers/pidns/pidns04.c
	testcases/kernel/device-drivers/agp/kernel_space/tagp.c
	testcases/kernel/device-drivers/base/tbase/tbase.c
	testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
	testcases/kernel/device-drivers/pci/tpci/tpci.c
	testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
	testcases/kernel/device-drivers/usb/tusb/tusb.c
	testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
	testcases/kernel/fs/acls/acl_file_test.c
	testcases/kernel/fs/acls/acl_link_test.c
	testcases/kernel/fs/doio/doio.c
	testcases/kernel/fs/doio/growfiles.c
	testcases/kernel/fs/doio/iogen.c
	testcases/kernel/fs/inode/inode02.c
	testcases/kernel/fs/mongo/mongo_compare.c
	testcases/kernel/fs/stream/stream01.c
	testcases/kernel/fs/stream/stream02.c
	testcases/kernel/fs/stream/stream04.c
	testcases/kernel/fs/stream/stream05.c
	testcases/kernel/hotplug/memory_hotplug/commands.c
	testcases/kernel/io/direct_io/diotest_routines.c
	testcases/kernel/io/disktest/parse.c
	testcases/kernel/io/ltp-aiodio/aio-stress.c
	testcases/kernel/io/ltp-aiodio/aiodio_append.c
	testcases/kernel/io/writetest/writetest.c
	testcases/kernel/ipc/pipeio/pipeio.c
	testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
	testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
	testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
	testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
	testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
	testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
	testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
	testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
	testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
	testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
	testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
	testcases/kernel/mem/mtest01/mtest01.c
	testcases/kernel/mem/vmtests/data_space.c
	testcases/kernel/module/create_module/create_module01.c
	testcases/kernel/module/create_module/create_module02.c
	testcases/kernel/module/delete_module/delete_module02.c
	testcases/kernel/module/delete_module/delete_module03.c
	testcases/kernel/module/query_module/query_module01.c
	testcases/kernel/module/query_module/query_module03.c
	testcases/kernel/numa/support_numa.c
	testcases/kernel/sched/process_stress/process.c
	testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_lease.c
	testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_chroot.c
	testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_hostname.c
	testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_nice.c
	testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_rawio.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_fcntl.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_lock.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_mmap.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_mprotect.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_nofcntl.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_seek.c
	testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
	testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_ioctl.c
	testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_noioctl.c
	testcases/kernel/syscalls/abort/abort01.c
	testcases/kernel/syscalls/accept/accept01.c
	testcases/kernel/syscalls/access/access01.c
	testcases/kernel/syscalls/access/access02.c
	testcases/kernel/syscalls/access/access03.c
	testcases/kernel/syscalls/access/access04.c
	testcases/kernel/syscalls/access/access05.c
	testcases/kernel/syscalls/add_key/add_key01.c
	testcases/kernel/syscalls/add_key/add_key02.c
	testcases/kernel/syscalls/adjtimex/adjtimex01.c
	testcases/kernel/syscalls/adjtimex/adjtimex02.c
	testcases/kernel/syscalls/alarm/alarm01.c
	testcases/kernel/syscalls/alarm/alarm02.c
	testcases/kernel/syscalls/alarm/alarm03.c
	testcases/kernel/syscalls/alarm/alarm05.c
	testcases/kernel/syscalls/alarm/alarm06.c
	testcases/kernel/syscalls/alarm/alarm07.c
	testcases/kernel/syscalls/asyncio/asyncio02.c
	testcases/kernel/syscalls/bdflush/bdflush01.c
	testcases/kernel/syscalls/bind/bind01.c
	testcases/kernel/syscalls/cacheflush/cacheflush01.c
	testcases/kernel/syscalls/capget/capget01.c
	testcases/kernel/syscalls/capget/capget02.c
	testcases/kernel/syscalls/capset/capset01.c
	testcases/kernel/syscalls/capset/capset02.c
	testcases/kernel/syscalls/chdir/chdir01.c
	testcases/kernel/syscalls/chdir/chdir02.c
	testcases/kernel/syscalls/chdir/chdir03.c
	testcases/kernel/syscalls/chdir/chdir04.c
	testcases/kernel/syscalls/chmod/chmod01.c
	testcases/kernel/syscalls/chmod/chmod03.c
	testcases/kernel/syscalls/chmod/chmod04.c
	testcases/kernel/syscalls/chmod/chmod05.c
	testcases/kernel/syscalls/chmod/chmod06.c
	testcases/kernel/syscalls/chmod/chmod07.c
	testcases/kernel/syscalls/chown/chown01.c
	testcases/kernel/syscalls/chown/chown02.c
	testcases/kernel/syscalls/chown/chown03.c
	testcases/kernel/syscalls/chown/chown04.c
	testcases/kernel/syscalls/chown/chown05.c
	testcases/kernel/syscalls/chroot/chroot01.c
	testcases/kernel/syscalls/chroot/chroot02.c
	testcases/kernel/syscalls/chroot/chroot03.c
	testcases/kernel/syscalls/chroot/chroot04.c
	testcases/kernel/syscalls/clock_getres/clock_getres01.c
	testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
	testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
	testcases/kernel/syscalls/clone/clone01.c
	testcases/kernel/syscalls/clone/clone02.c
	testcases/kernel/syscalls/clone/clone03.c
	testcases/kernel/syscalls/clone/clone04.c
	testcases/kernel/syscalls/clone/clone05.c
	testcases/kernel/syscalls/clone/clone06.c
	testcases/kernel/syscalls/clone/clone07.c
	testcases/kernel/syscalls/close/close01.c
	testcases/kernel/syscalls/close/close02.c
	testcases/kernel/syscalls/close/close08.c
	testcases/kernel/syscalls/connect/connect01.c
	testcases/kernel/syscalls/creat/creat01.c
	testcases/kernel/syscalls/creat/creat03.c
	testcases/kernel/syscalls/creat/creat04.c
	testcases/kernel/syscalls/creat/creat05.c
	testcases/kernel/syscalls/creat/creat06.c
	testcases/kernel/syscalls/creat/creat07.c
	testcases/kernel/syscalls/creat/creat09.c
	testcases/kernel/syscalls/dup2/dup201.c
	testcases/kernel/syscalls/dup2/dup203.c
	testcases/kernel/syscalls/dup2/dup204.c
	testcases/kernel/syscalls/dup3/dup3_01.c
	testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
	testcases/kernel/syscalls/eventfd2/eventfd2_01.c
	testcases/kernel/syscalls/eventfd2/eventfd2_02.c
	testcases/kernel/syscalls/execl/execl01.c
	testcases/kernel/syscalls/execle/execle01.c
	testcases/kernel/syscalls/execlp/execlp01.c
	testcases/kernel/syscalls/execv/execv01.c
	testcases/kernel/syscalls/execve/execve01.c
	testcases/kernel/syscalls/execve/execve02.c
	testcases/kernel/syscalls/execve/execve03.c
	testcases/kernel/syscalls/execve/execve04.c
	testcases/kernel/syscalls/execve/execve05.c
	testcases/kernel/syscalls/execvp/execvp01.c
	testcases/kernel/syscalls/exit/exit02.c
	testcases/kernel/syscalls/exit_group/exit_group01.c
	testcases/kernel/syscalls/faccessat/faccessat01.c
	testcases/kernel/syscalls/fadvise/posix_fadvise01.c
	testcases/kernel/syscalls/fadvise/posix_fadvise02.c
	testcases/kernel/syscalls/fadvise/posix_fadvise03.c
	testcases/kernel/syscalls/fadvise/posix_fadvise04.c
	testcases/kernel/syscalls/fallocate/fallocate01.c
	testcases/kernel/syscalls/fallocate/fallocate02.c
	testcases/kernel/syscalls/fallocate/fallocate03.c
	testcases/kernel/syscalls/fchdir/fchdir01.c
	testcases/kernel/syscalls/fchdir/fchdir02.c
	testcases/kernel/syscalls/fchdir/fchdir03.c
	testcases/kernel/syscalls/fchmod/fchmod01.c
	testcases/kernel/syscalls/fchmod/fchmod02.c
	testcases/kernel/syscalls/fchmod/fchmod03.c
	testcases/kernel/syscalls/fchmod/fchmod04.c
	testcases/kernel/syscalls/fchmod/fchmod05.c
	testcases/kernel/syscalls/fchmod/fchmod06.c
	testcases/kernel/syscalls/fchmod/fchmod07.c
	testcases/kernel/syscalls/fchmodat/fchmodat01.c
	testcases/kernel/syscalls/fchown/fchown01.c
	testcases/kernel/syscalls/fchown/fchown02.c
	testcases/kernel/syscalls/fchown/fchown03.c
	testcases/kernel/syscalls/fchown/fchown04.c
	testcases/kernel/syscalls/fchown/fchown05.c
	testcases/kernel/syscalls/fchownat/fchownat01.c
	testcases/kernel/syscalls/fcntl/fcntl01.c
	testcases/kernel/syscalls/fcntl/fcntl02.c
	testcases/kernel/syscalls/fcntl/fcntl03.c
	testcases/kernel/syscalls/fcntl/fcntl04.c
	testcases/kernel/syscalls/fcntl/fcntl05.c
	testcases/kernel/syscalls/fcntl/fcntl06.c
	testcases/kernel/syscalls/fcntl/fcntl09.c
	testcases/kernel/syscalls/fcntl/fcntl10.c
	testcases/kernel/syscalls/fcntl/fcntl11.c
	testcases/kernel/syscalls/fcntl/fcntl12.c
	testcases/kernel/syscalls/fcntl/fcntl13.c
	testcases/kernel/syscalls/fcntl/fcntl14.c
	testcases/kernel/syscalls/fcntl/fcntl15.c
	testcases/kernel/syscalls/fcntl/fcntl16.c
	testcases/kernel/syscalls/fcntl/fcntl17.c
	testcases/kernel/syscalls/fcntl/fcntl18.c
	testcases/kernel/syscalls/fcntl/fcntl19.c
	testcases/kernel/syscalls/fcntl/fcntl20.c
	testcases/kernel/syscalls/fcntl/fcntl21.c
	testcases/kernel/syscalls/fcntl/fcntl22.c
	testcases/kernel/syscalls/fcntl/fcntl23.c
	testcases/kernel/syscalls/fcntl/fcntl24.c
	testcases/kernel/syscalls/fcntl/fcntl25.c
	testcases/kernel/syscalls/fcntl/fcntl26.c
	testcases/kernel/syscalls/fcntl/fcntl27.c
	testcases/kernel/syscalls/fcntl/fcntl28.c
	testcases/kernel/syscalls/fork/fork01.c
	testcases/kernel/syscalls/fork/fork02.c
	testcases/kernel/syscalls/fork/fork03.c
	testcases/kernel/syscalls/fork/fork06.c
	testcases/kernel/syscalls/fork/fork07.c
	testcases/kernel/syscalls/fork/fork08.c
	testcases/kernel/syscalls/fork/fork09.c
	testcases/kernel/syscalls/fork/fork10.c
	testcases/kernel/syscalls/fork/fork11.c
	testcases/kernel/syscalls/fork/fork12.c
	testcases/kernel/syscalls/fstat/fstat01.c
	testcases/kernel/syscalls/fstat/fstat02.c
	testcases/kernel/syscalls/fstat/fstat03.c
	testcases/kernel/syscalls/fstat/fstat04.c
	testcases/kernel/syscalls/fstat/fstat05.c
	testcases/kernel/syscalls/fstatat/fstatat01.c
	testcases/kernel/syscalls/fstatfs/fstatfs01.c
	testcases/kernel/syscalls/fstatfs/fstatfs02.c
	testcases/kernel/syscalls/fsync/fsync01.c
	testcases/kernel/syscalls/fsync/fsync02.c
	testcases/kernel/syscalls/fsync/fsync03.c
	testcases/kernel/syscalls/ftruncate/ftruncate01.c
	testcases/kernel/syscalls/ftruncate/ftruncate02.c
	testcases/kernel/syscalls/futimesat/futimesat01.c
	testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
	testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
	testcases/kernel/syscalls/getcontext/getcontext01.c
	testcases/kernel/syscalls/getcpu/getcpu01.c
	testcases/kernel/syscalls/getcwd/getcwd01.c
	testcases/kernel/syscalls/getcwd/getcwd02.c
	testcases/kernel/syscalls/getcwd/getcwd03.c
	testcases/kernel/syscalls/getdents/getdents01.c
	testcases/kernel/syscalls/getdents/getdents02.c
	testcases/kernel/syscalls/getdents/getdents03.c
	testcases/kernel/syscalls/getdents/getdents04.c
	testcases/kernel/syscalls/getdomainname/getdomainname01.c
	testcases/kernel/syscalls/getegid/getegid01.c
	testcases/kernel/syscalls/getegid/getegid02.c
	testcases/kernel/syscalls/geteuid/geteuid01.c
	testcases/kernel/syscalls/getgid/getgid01.c
	testcases/kernel/syscalls/getgid/getgid03.c
	testcases/kernel/syscalls/getgroups/getgroups02.c
	testcases/kernel/syscalls/getgroups/getgroups03.c
	testcases/kernel/syscalls/getgroups/getgroups04.c
	testcases/kernel/syscalls/gethostid/gethostid01.c
	testcases/kernel/syscalls/gethostname/gethostname01.c
	testcases/kernel/syscalls/getitimer/getitimer01.c
	testcases/kernel/syscalls/getitimer/getitimer02.c
	testcases/kernel/syscalls/getitimer/getitimer03.c
	testcases/kernel/syscalls/getpagesize/getpagesize01.c
	testcases/kernel/syscalls/getpeername/getpeername01.c
	testcases/kernel/syscalls/getpgid/getpgid01.c
	testcases/kernel/syscalls/getpgid/getpgid02.c
	testcases/kernel/syscalls/getpgrp/getpgrp01.c
	testcases/kernel/syscalls/getpid/getpid01.c
	testcases/kernel/syscalls/getpid/getpid02.c
	testcases/kernel/syscalls/getppid/getppid01.c
	testcases/kernel/syscalls/getppid/getppid02.c
	testcases/kernel/syscalls/getpriority/getpriority01.c
	testcases/kernel/syscalls/getpriority/getpriority02.c
	testcases/kernel/syscalls/getresgid/getresgid01.c
	testcases/kernel/syscalls/getresgid/getresgid02.c
	testcases/kernel/syscalls/getresgid/getresgid03.c
	testcases/kernel/syscalls/getresuid/getresuid01.c
	testcases/kernel/syscalls/getresuid/getresuid02.c
	testcases/kernel/syscalls/getresuid/getresuid03.c
	testcases/kernel/syscalls/getrusage/getrusage01.c
	testcases/kernel/syscalls/getrusage/getrusage02.c
	testcases/kernel/syscalls/getsid/getsid01.c
	testcases/kernel/syscalls/getsid/getsid02.c
	testcases/kernel/syscalls/getsockname/getsockname01.c
	testcases/kernel/syscalls/getsockopt/getsockopt01.c
	testcases/kernel/syscalls/gettid/gettid01.c
	testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
	testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
	testcases/kernel/syscalls/getuid/getuid01.c
	testcases/kernel/syscalls/getuid/getuid02.c
	testcases/kernel/syscalls/inotify/inotify01.c
	testcases/kernel/syscalls/inotify/inotify02.c
	testcases/kernel/syscalls/inotify/inotify03.c
	testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
	testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
	testcases/kernel/syscalls/io_cancel/io_cancel01.c
	testcases/kernel/syscalls/io_destroy/io_destroy01.c
	testcases/kernel/syscalls/io_getevents/io_getevents01.c
	testcases/kernel/syscalls/io_setup/io_setup01.c
	testcases/kernel/syscalls/io_submit/io_submit01.c
	testcases/kernel/syscalls/ioctl/ioctl01.c
	testcases/kernel/syscalls/ioctl/ioctl02.c
	testcases/kernel/syscalls/ioperm/ioperm01.c
	testcases/kernel/syscalls/ioperm/ioperm02.c
	testcases/kernel/syscalls/iopl/iopl01.c
	testcases/kernel/syscalls/iopl/iopl02.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
	testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
	testcases/kernel/syscalls/ipc/msgget/msgget01.c
	testcases/kernel/syscalls/ipc/msgget/msgget02.c
	testcases/kernel/syscalls/ipc/msgget/msgget03.c
	testcases/kernel/syscalls/ipc/msgget/msgget04.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv04.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
	testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd03.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd04.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
	testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
	testcases/kernel/syscalls/ipc/semctl/semctl01.c
	testcases/kernel/syscalls/ipc/semctl/semctl02.c
	testcases/kernel/syscalls/ipc/semctl/semctl03.c
	testcases/kernel/syscalls/ipc/semctl/semctl04.c
	testcases/kernel/syscalls/ipc/semctl/semctl05.c
	testcases/kernel/syscalls/ipc/semctl/semctl06.c
	testcases/kernel/syscalls/ipc/semget/semget01.c
	testcases/kernel/syscalls/ipc/semget/semget02.c
	testcases/kernel/syscalls/ipc/semget/semget03.c
	testcases/kernel/syscalls/ipc/semget/semget05.c
	testcases/kernel/syscalls/ipc/semget/semget06.c
	testcases/kernel/syscalls/ipc/semop/semop01.c
	testcases/kernel/syscalls/ipc/semop/semop02.c
	testcases/kernel/syscalls/ipc/semop/semop03.c
	testcases/kernel/syscalls/ipc/semop/semop04.c
	testcases/kernel/syscalls/ipc/semop/semop05.c
	testcases/kernel/syscalls/ipc/shmat/shmat01.c
	testcases/kernel/syscalls/ipc/shmat/shmat02.c
	testcases/kernel/syscalls/ipc/shmat/shmat03.c
	testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
	testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
	testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
	testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
	testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
	testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
	testcases/kernel/syscalls/ipc/shmget/shmget01.c
	testcases/kernel/syscalls/ipc/shmget/shmget02.c
	testcases/kernel/syscalls/ipc/shmget/shmget03.c
	testcases/kernel/syscalls/ipc/shmget/shmget04.c
	testcases/kernel/syscalls/ipc/shmget/shmget05.c
	testcases/kernel/syscalls/keyctl/keyctl01.c
	testcases/kernel/syscalls/kill/kill01.c
	testcases/kernel/syscalls/kill/kill03.c
	testcases/kernel/syscalls/kill/kill04.c
	testcases/kernel/syscalls/kill/kill05.c
	testcases/kernel/syscalls/kill/kill06.c
	testcases/kernel/syscalls/kill/kill07.c
	testcases/kernel/syscalls/kill/kill08.c
	testcases/kernel/syscalls/kill/kill11.c
	testcases/kernel/syscalls/lchown/lchown01.c
	testcases/kernel/syscalls/lchown/lchown02.c
	testcases/kernel/syscalls/linkat/linkat01.c
	testcases/kernel/syscalls/listen/listen01.c
	testcases/kernel/syscalls/llseek/llseek01.c
	testcases/kernel/syscalls/llseek/llseek02.c
	testcases/kernel/syscalls/lseek/lseek06.c
	testcases/kernel/syscalls/lseek/lseek07.c
	testcases/kernel/syscalls/lseek/lseek08.c
	testcases/kernel/syscalls/lseek/lseek09.c
	testcases/kernel/syscalls/lseek/lseek10.c
	testcases/kernel/syscalls/lstat/lstat01.c
	testcases/kernel/syscalls/lstat/lstat02.c
	testcases/kernel/syscalls/lstat/lstat03.c
	testcases/kernel/syscalls/mbind/mbind01.c
	testcases/kernel/syscalls/mkdir/mkdir01.c
	testcases/kernel/syscalls/mkdir/mkdir02.c
	testcases/kernel/syscalls/mkdir/mkdir03.c
	testcases/kernel/syscalls/mkdir/mkdir04.c
	testcases/kernel/syscalls/mkdir/mkdir05.c
	testcases/kernel/syscalls/mkdir/mkdir08.c
	testcases/kernel/syscalls/mkdirat/mkdirat01.c
	testcases/kernel/syscalls/mknod/mknod02.c
	testcases/kernel/syscalls/mknod/mknod03.c
	testcases/kernel/syscalls/mknod/mknod04.c
	testcases/kernel/syscalls/mknod/mknod05.c
	testcases/kernel/syscalls/mknod/mknod06.c
	testcases/kernel/syscalls/mknod/mknod07.c
	testcases/kernel/syscalls/mknod/mknod08.c
	testcases/kernel/syscalls/mknod/mknod09.c
	testcases/kernel/syscalls/mknodat/mknodat01.c
	testcases/kernel/syscalls/mmap/mmap001.c
	testcases/kernel/syscalls/mmap/mmap01.c
	testcases/kernel/syscalls/mmap/mmap02.c
	testcases/kernel/syscalls/mmap/mmap03.c
	testcases/kernel/syscalls/mmap/mmap04.c
	testcases/kernel/syscalls/mmap/mmap05.c
	testcases/kernel/syscalls/mmap/mmap06.c
	testcases/kernel/syscalls/mmap/mmap07.c
	testcases/kernel/syscalls/mmap/mmap08.c
	testcases/kernel/syscalls/mmap/mmap09.c
	testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
	testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
	testcases/kernel/syscalls/mount/mount01.c
	testcases/kernel/syscalls/mount/mount02.c
	testcases/kernel/syscalls/mount/mount03.c
	testcases/kernel/syscalls/mprotect/mprotect01.c
	testcases/kernel/syscalls/mprotect/mprotect02.c
	testcases/kernel/syscalls/mprotect/mprotect03.c
	testcases/kernel/syscalls/mq_notify/mq_notify01.c
	testcases/kernel/syscalls/mq_open/mq_open01.c
	testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
	testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
	testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
	testcases/kernel/syscalls/mremap/mremap01.c
	testcases/kernel/syscalls/mremap/mremap02.c
	testcases/kernel/syscalls/mremap/mremap03.c
	testcases/kernel/syscalls/mremap/mremap04.c
	testcases/kernel/syscalls/msync/msync01.c
	testcases/kernel/syscalls/msync/msync02.c
	testcases/kernel/syscalls/msync/msync03.c
	testcases/kernel/syscalls/msync/msync04.c
	testcases/kernel/syscalls/msync/msync05.c
	testcases/kernel/syscalls/munmap/munmap01.c
	testcases/kernel/syscalls/munmap/munmap02.c
	testcases/kernel/syscalls/munmap/munmap03.c
	testcases/kernel/syscalls/nanosleep/nanosleep01.c
	testcases/kernel/syscalls/nanosleep/nanosleep02.c
	testcases/kernel/syscalls/nanosleep/nanosleep03.c
	testcases/kernel/syscalls/nanosleep/nanosleep04.c
	testcases/kernel/syscalls/newuname/newuname01.c
	testcases/kernel/syscalls/nice/nice01.c
	testcases/kernel/syscalls/nice/nice02.c
	testcases/kernel/syscalls/nice/nice03.c
	testcases/kernel/syscalls/nice/nice04.c
	testcases/kernel/syscalls/open/open01.c
	testcases/kernel/syscalls/open/open02.c
	testcases/kernel/syscalls/open/open03.c
	testcases/kernel/syscalls/open/open04.c
	testcases/kernel/syscalls/open/open05.c
	testcases/kernel/syscalls/open/open06.c
	testcases/kernel/syscalls/open/open07.c
	testcases/kernel/syscalls/open/open08.c
	testcases/kernel/syscalls/open/open10.c
	testcases/kernel/syscalls/openat/openat01.c
	testcases/kernel/syscalls/pathconf/pathconf01.c
	testcases/kernel/syscalls/pause/pause01.c
	testcases/kernel/syscalls/pause/pause02.c
	testcases/kernel/syscalls/pause/pause03.c
	testcases/kernel/syscalls/personality/personality01.c
	testcases/kernel/syscalls/personality/personality02.c
	testcases/kernel/syscalls/pipe/pipe01.c
	testcases/kernel/syscalls/pipe/pipe02.c
	testcases/kernel/syscalls/pipe/pipe03.c
	testcases/kernel/syscalls/pipe/pipe04.c
	testcases/kernel/syscalls/pipe/pipe05.c
	testcases/kernel/syscalls/pipe/pipe06.c
	testcases/kernel/syscalls/pipe/pipe07.c
	testcases/kernel/syscalls/pipe/pipe08.c
	testcases/kernel/syscalls/pipe/pipe09.c
	testcases/kernel/syscalls/pipe/pipe10.c
	testcases/kernel/syscalls/pipe/pipe11.c
	testcases/kernel/syscalls/pipe2/pipe2_01.c
	testcases/kernel/syscalls/pipe2/pipe2_02.c
	testcases/kernel/syscalls/poll/poll01.c
	testcases/kernel/syscalls/prctl/prctl01.c
	testcases/kernel/syscalls/prctl/prctl02.c
	testcases/kernel/syscalls/pread/pread01.c
	testcases/kernel/syscalls/pread/pread02.c
	testcases/kernel/syscalls/pread/pread03.c
	testcases/kernel/syscalls/ptrace/ptrace01.c
	testcases/kernel/syscalls/ptrace/ptrace02.c
	testcases/kernel/syscalls/ptrace/ptrace03.c
	testcases/kernel/syscalls/pwrite/pwrite01.c
	testcases/kernel/syscalls/pwrite/pwrite02.c
	testcases/kernel/syscalls/pwrite/pwrite03.c
	testcases/kernel/syscalls/read/read01.c
	testcases/kernel/syscalls/read/read02.c
	testcases/kernel/syscalls/read/read03.c
	testcases/kernel/syscalls/read/read04.c
	testcases/kernel/syscalls/readdir/readdir02.c
	testcases/kernel/syscalls/readlink/readlink01.c
	testcases/kernel/syscalls/readlink/readlink02.c
	testcases/kernel/syscalls/readlink/readlink03.c
	testcases/kernel/syscalls/readlink/readlink04.c
	testcases/kernel/syscalls/readlinkat/readlinkat01.c
	testcases/kernel/syscalls/readv/readv01.c
	testcases/kernel/syscalls/readv/readv02.c
	testcases/kernel/syscalls/readv/readv03.c
	testcases/kernel/syscalls/reboot/reboot01.c
	testcases/kernel/syscalls/reboot/reboot02.c
	testcases/kernel/syscalls/recv/recv01.c
	testcases/kernel/syscalls/recvfrom/recvfrom01.c
	testcases/kernel/syscalls/recvmsg/recvmsg01.c
	testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
	testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
	testcases/kernel/syscalls/rename/rename01.c
	testcases/kernel/syscalls/rename/rename02.c
	testcases/kernel/syscalls/rename/rename03.c
	testcases/kernel/syscalls/rename/rename04.c
	testcases/kernel/syscalls/rename/rename05.c
	testcases/kernel/syscalls/rename/rename06.c
	testcases/kernel/syscalls/rename/rename07.c
	testcases/kernel/syscalls/rename/rename08.c
	testcases/kernel/syscalls/rename/rename09.c
	testcases/kernel/syscalls/rename/rename10.c
	testcases/kernel/syscalls/rename/rename12.c
	testcases/kernel/syscalls/rename/rename13.c
	testcases/kernel/syscalls/rename/rename14.c
	testcases/kernel/syscalls/renameat/renameat01.c
	testcases/kernel/syscalls/rmdir/rmdir01.c
	testcases/kernel/syscalls/rmdir/rmdir02.c
	testcases/kernel/syscalls/rmdir/rmdir03.c
	testcases/kernel/syscalls/rmdir/rmdir04.c
	testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
	testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
	testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
	testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
	testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
	testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
	testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
	testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
	testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
	testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
	testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
	testcases/kernel/syscalls/sched_getparam/sched_getparam01.c
	testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
	testcases/kernel/syscalls/sched_getparam/sched_getparam03.c
	testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
	testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
	testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
	testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval02.c
	testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
	testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
	testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
	testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
	testcases/kernel/syscalls/sched_setparam/sched_setparam04.c
	testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
	testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
	testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
	testcases/kernel/syscalls/sched_yield/sched_yield01.c
	testcases/kernel/syscalls/send/send01.c
	testcases/kernel/syscalls/sendfile/sendfile02.c
	testcases/kernel/syscalls/sendfile/sendfile03.c
	testcases/kernel/syscalls/sendfile/sendfile04.c
	testcases/kernel/syscalls/sendfile/sendfile05.c
	testcases/kernel/syscalls/sendfile/sendfile06.c
	testcases/kernel/syscalls/sendfile/sendfile07.c
	testcases/kernel/syscalls/sendmsg/sendmsg01.c
	testcases/kernel/syscalls/sendto/sendto01.c
	testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
	testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
	testcases/kernel/syscalls/set_thread_area/set_thread_area02.c
	testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
	testcases/kernel/syscalls/setdomainname/setdomainname02.c
	testcases/kernel/syscalls/setdomainname/setdomainname03.c
	testcases/kernel/syscalls/setfsgid/setfsgid01.c
	testcases/kernel/syscalls/setfsgid/setfsgid02.c
	testcases/kernel/syscalls/setfsgid/setfsgid03.c
	testcases/kernel/syscalls/setfsuid/setfsuid01.c
	testcases/kernel/syscalls/setfsuid/setfsuid02.c
	testcases/kernel/syscalls/setfsuid/setfsuid03.c
	testcases/kernel/syscalls/setfsuid/setfsuid04.c
	testcases/kernel/syscalls/setgid/setgid01.c
	testcases/kernel/syscalls/setgid/setgid02.c
	testcases/kernel/syscalls/setgid/setgid03.c
	testcases/kernel/syscalls/setgroups/setgroups02.c
	testcases/kernel/syscalls/setgroups/setgroups03.c
	testcases/kernel/syscalls/setgroups/setgroups04.c
	testcases/kernel/syscalls/setitimer/setitimer01.c
	testcases/kernel/syscalls/setitimer/setitimer02.c
	testcases/kernel/syscalls/setitimer/setitimer03.c
	testcases/kernel/syscalls/setpgid/setpgid01.c
	testcases/kernel/syscalls/setpgid/setpgid02.c
	testcases/kernel/syscalls/setpgid/setpgid03.c
	testcases/kernel/syscalls/setpgrp/setpgrp02.c
	testcases/kernel/syscalls/setpriority/setpriority01.c
	testcases/kernel/syscalls/setpriority/setpriority02.c
	testcases/kernel/syscalls/setpriority/setpriority03.c
	testcases/kernel/syscalls/setpriority/setpriority04.c
	testcases/kernel/syscalls/setpriority/setpriority05.c
	testcases/kernel/syscalls/setregid/setregid01.c
	testcases/kernel/syscalls/setregid/setregid02.c
	testcases/kernel/syscalls/setregid/setregid03.c
	testcases/kernel/syscalls/setregid/setregid04.c
	testcases/kernel/syscalls/setresuid/setresuid04.c
	testcases/kernel/syscalls/setreuid/setreuid01.c
	testcases/kernel/syscalls/setreuid/setreuid07.c
	testcases/kernel/syscalls/setrlimit/setrlimit01.c
	testcases/kernel/syscalls/setrlimit/setrlimit02.c
	testcases/kernel/syscalls/setrlimit/setrlimit03.c
	testcases/kernel/syscalls/setsid/setsid01.c
	testcases/kernel/syscalls/setsockopt/setsockopt01.c
	testcases/kernel/syscalls/setuid/setuid02.c
	testcases/kernel/syscalls/setuid/setuid03.c
	testcases/kernel/syscalls/setuid/setuid04.c
	testcases/kernel/syscalls/sgetmask/sgetmask01.c
	testcases/kernel/syscalls/sigaction/sigaction01.c
	testcases/kernel/syscalls/sigaction/sigaction02.c
	testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
	testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
	testcases/kernel/syscalls/signal/signal02.c
	testcases/kernel/syscalls/signal/signal03.c
	testcases/kernel/syscalls/signal/signal04.c
	testcases/kernel/syscalls/signal/signal05.c
	testcases/kernel/syscalls/signalfd4/signalfd4_01.c
	testcases/kernel/syscalls/signalfd4/signalfd4_02.c
	testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
	testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
	testcases/kernel/syscalls/socket/socket01.c
	testcases/kernel/syscalls/socket/socket02.c
	testcases/kernel/syscalls/socket/socket03.c
	testcases/kernel/syscalls/socketpair/socketpair01.c
	testcases/kernel/syscalls/socketpair/socketpair02.c
	testcases/kernel/syscalls/sockioctl/sockioctl01.c
	testcases/kernel/syscalls/splice/splice02.c
	testcases/kernel/syscalls/ssetmask/ssetmask01.c
	testcases/kernel/syscalls/stat/stat01.c
	testcases/kernel/syscalls/stat/stat02.c
	testcases/kernel/syscalls/stat/stat03.c
	testcases/kernel/syscalls/stat/stat05.c
	testcases/kernel/syscalls/statfs/statfs01.c
	testcases/kernel/syscalls/statfs/statfs02.c
	testcases/kernel/syscalls/statfs/statfs03.c
	testcases/kernel/syscalls/statvfs/statvfs01.c
	testcases/kernel/syscalls/stime/stime01.c
	testcases/kernel/syscalls/stime/stime02.c
	testcases/kernel/syscalls/swapoff/swapoff01.c
	testcases/kernel/syscalls/swapoff/swapoff02.c
	testcases/kernel/syscalls/swapon/swapon01.c
	testcases/kernel/syscalls/swapon/swapon02.c
	testcases/kernel/syscalls/swapon/swapon03.c
	testcases/kernel/syscalls/symlink/symlink02.c
	testcases/kernel/syscalls/symlink/symlink03.c
	testcases/kernel/syscalls/symlink/symlink04.c
	testcases/kernel/syscalls/symlink/symlink05.c
	testcases/kernel/syscalls/symlinkat/symlinkat01.c
	testcases/kernel/syscalls/sync/sync01.c
	testcases/kernel/syscalls/sync/sync02.c
	testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
	testcases/kernel/syscalls/sysctl/sysctl01.c
	testcases/kernel/syscalls/sysctl/sysctl04.c
	testcases/kernel/syscalls/sysctl/sysctl05.c
	testcases/kernel/syscalls/sysinfo/sysinfo01.c
	testcases/kernel/syscalls/sysinfo/sysinfo02.c
	testcases/kernel/syscalls/tee/tee01.c
	testcases/kernel/syscalls/time/time01.c
	testcases/kernel/syscalls/time/time02.c
	testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
	testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
	testcases/kernel/syscalls/timerfd/timerfd02.c
	testcases/kernel/syscalls/timerfd/timerfd03.c
	testcases/kernel/syscalls/times/times01.c
	testcases/kernel/syscalls/tkill/tkill01.c
	testcases/kernel/syscalls/tkill/tkill02.c
	testcases/kernel/syscalls/truncate/truncate01.c
	testcases/kernel/syscalls/truncate/truncate02.c
	testcases/kernel/syscalls/truncate/truncate03.c
	testcases/kernel/syscalls/truncate/truncate04.c
	testcases/kernel/syscalls/umask/umask01.c
	testcases/kernel/syscalls/umask/umask03.c
	testcases/kernel/syscalls/uname/uname01.c
	testcases/kernel/syscalls/uname/uname02.c
	testcases/kernel/syscalls/uname/uname03.c
	testcases/kernel/syscalls/unlink/unlink05.c
	testcases/kernel/syscalls/unlinkat/unlinkat01.c
	testcases/kernel/syscalls/unshare/unshare01.c
	testcases/kernel/syscalls/unshare/unshare02.c
	testcases/kernel/syscalls/ustat/ustat01.c
	testcases/kernel/syscalls/ustat/ustat02.c
	testcases/kernel/syscalls/utime/utime01.c
	testcases/kernel/syscalls/utime/utime02.c
	testcases/kernel/syscalls/utime/utime03.c
	testcases/kernel/syscalls/utime/utime04.c
	testcases/kernel/syscalls/utime/utime05.c
	testcases/kernel/syscalls/utime/utime06.c
	testcases/kernel/syscalls/utimes/utimes01.c
	testcases/kernel/syscalls/vfork/vfork01.c
	testcases/kernel/syscalls/vfork/vfork02.c
	testcases/kernel/syscalls/vmsplice/vmsplice01.c
	testcases/kernel/syscalls/wait/wait02.c
	testcases/kernel/syscalls/wait4/wait401.c
	testcases/kernel/syscalls/wait4/wait402.c
	testcases/kernel/syscalls/waitid/waitid01.c
	testcases/kernel/syscalls/waitid/waitid02.c
	testcases/kernel/timers/clock_gettime/clock_gettime03.c
	testcases/kernel/timers/clock_settime/clock_settime03.c
	testcases/kernel/timers/timer_create/timer_create04.c
	testcases/misc/math/float/exp_log/genmodf.c
	testcases/misc/math/float/main.c
	testcases/network/sockets/ltpServer.c
	testcases/network/tcp_cmds/perf_lan/pingpong6.c
	testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
	testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
	testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
	testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
	testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
	testcases/open_posix_testsuite/conformance/interfaces/pthread_join/threads_scenarii.c
	testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
	testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/4-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
	testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
	testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
	testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
	testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
	testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
	testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
	testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
	testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
	testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
diff --git a/doc/man3/tst_res.3 b/doc/man3/tst_res.3
index d1a1c50..0d1bd00 100644
--- a/doc/man3/tst_res.3
+++ b/doc/man3/tst_res.3
@@ -263,6 +263,10 @@
 
 char *TCID = "tsttcs01"; /* set test case identifier */
 int TST_TOTAL = 15;      /* set total number of test results */
+<<<<<<< HEAD
+extern int Tst_count;    /* access count of results completed */
+=======
+>>>>>>> master
 
 main()
 {
diff --git a/include/cleanup.c b/include/cleanup.c
index 7875609..d398fe5 100644
--- a/include/cleanup.c
+++ b/include/cleanup.c
@@ -35,11 +35,11 @@
 #endif
 
 /* A freebie for defining the function prototype. */
-static void CLEANUP() __attribute__((unused));
+static void CLEANUP(void) __attribute__((unused));
 
 #ifdef USING_DUMMY_CLEANUP
 /* The stub function. Wewt.. */
-static void dummy_cleanup() { }
+static void dummy_cleanup(void) { }
 #endif
 
 #endif
diff --git a/include/test.h b/include/test.h
index 78ae4fe..2875e5c 100644
--- a/include/test.h
+++ b/include/test.h
@@ -189,9 +189,9 @@
 void tst_resm(int ttype, char *arg_fmt, ...)
 	__attribute__ ((format (printf, 2, 3)));
 void tst_brk(int ttype, char *fname, void (*func)(void), char *arg_fmt, ...)
-	__attribute__ ((format (printf, 4, 5)));
+	__attribute__ ((format (printf, 4, 5))) LTP_ATTRIBUTE_NORETURN;
 void tst_brkm(int ttype, void (*func)(void), char *arg_fmt, ...)
-	__attribute__ ((format (printf, 3, 4)));
+	__attribute__ ((format (printf, 3, 4))) LTP_ATTRIBUTE_NORETURN;
 void tst_require_root(void (*func)(void));
 int  tst_environ(void);
 void tst_exit(void) LTP_ATTRIBUTE_NORETURN;
diff --git a/lib/tst_res.c b/lib/tst_res.c
index 2debd44..9ee936d 100644
--- a/lib/tst_res.c
+++ b/lib/tst_res.c
@@ -183,16 +183,6 @@
 extern int  TST_TOTAL;  /* Total number of test cases from the test */
                         /* source */
 
-/*
- * This global is used by the temp. dir. maintenance functions,
- * tst_tmpdir()/tst_rmdir(), tst_wildcard()/tst_tr_rmdir().  It is the
- * name of the directory created (if any).  It is defined here, so that
- * it only has to be declared once and can then be referenced from more
- * than one module.  Also, since the temp. dir. maintenance functions
- * rely on the tst_res.c package this seemed like a reasonable place.
- */
-char *TESTDIR = NULL;
-
 struct pair {
 	const char *name;
 	int val;
@@ -354,8 +344,9 @@
 	int ttype_result = TTYPE_RESULT(ttype);
 
 #if DEBUG
-	printf("IN tst_condense: tcid = %s, tnum = %d, ttype = %d, tmesg = %s\n",
-	       TCID, tnum, ttype, tmesg);
+	printf( "IN tst_condense: tcid = %s, tnum = %d, ttype = %d, "
+		"tmesg = %s\n",
+		TCID, tnum, ttype, tmesg);
 	fflush(stdout);
 #endif
 
@@ -613,7 +604,7 @@
 	 */
 	if (ttype_result != TFAIL && ttype_result != TBROK &&
 	    ttype_result != TCONF && ttype_result != TRETR) {
-		sprintf(Warn_mesg, "tst_brk(): Invalid Type: %d.  Using TBROK",
+		sprintf(Warn_mesg, "tst_brk(): Invalid Type: %d. Using TBROK",
 			ttype_result);
 		tst_print(TCID, 0, TWARN, Warn_mesg);
 		ttype = TBROK;
@@ -644,7 +635,6 @@
 	tst_exit();
 }
 
-
 /*
  * tst_resm() - Interface to tst_res(), with no filename.
  */
@@ -717,7 +707,8 @@
 	while ((b_read = fread(buffer, 1, BUFSIZ, fp)) != 0) {
 		if ((b_written = fwrite(buffer, 1, b_read, T_out)) != b_read) {
 			sprintf(Warn_mesg,
-				"tst_res(): While trying to cat \"%s\", fwrite() wrote only %d of %d bytes",
+				"tst_res(): While trying to cat \"%s\", "
+				"fwrite() wrote only %d of %d bytes",
 				filename, b_written, b_read);
 			tst_print(TCID, 0, TWARN, Warn_mesg);
 			break;
@@ -726,14 +717,16 @@
 
 	if (!feof(fp)) {
 		sprintf(Warn_mesg,
-			"tst_res(): While trying to cat \"%s\", fread() failed, errno = %d: %s",
+			"tst_res(): While trying to cat \"%s\", fread() "
+			"failed, errno = %d: %s",
 			filename, errno, strerror(errno));
 		tst_print(TCID, 0, TWARN, Warn_mesg);
 	}
 
 	if (fclose(fp) != 0) {
 		sprintf(Warn_mesg,
-			"tst_res(): While trying to cat \"%s\", fclose() failed, errno = %d: %s",
+			"tst_res(): While trying to cat \"%s\", fclose() "
+			"failed, errno = %d: %s",
 			filename, errno, strerror(errno));
 		tst_print(TCID, 0, TWARN, Warn_mesg);
 	}
@@ -778,38 +771,38 @@
 		scanf("%d%c", &ttype, &chr);
 
 		switch (ttype) {
-			case -1:
-				tst_exit();
+		case -1:
+			tst_exit();
 			break;
 
-			case -2:
-				tst_flush();
+		case -2:
+			tst_flush();
 			break;
 
-			case -3:
-				printf("Enter the current type (%i=FAIL, %i=BROK, %i=RETR, %i=CONF): ",
-					TFAIL, TBROK, TRETR, TCONF);
-				scanf("%d%c", &ttype, &chr);
-				printf("Enter file name (<cr> for none): ");
-				gets(fname);
-				if (strcmp(fname, "") == 0)
-					tst_brkm(ttype, tst_exit, RESM, ttype);
-				else
-					tst_brk(ttype, fname, tst_exit, RES, ttype, fname);
-			break;
+		case -3:
+			printf("Enter the current type (%i=FAIL, %i=BROK, %i=RETR, %i=CONF): ",
+				TFAIL, TBROK, TRETR, TCONF);
+			scanf("%d%c", &ttype, &chr);
+			printf("Enter file name (<cr> for none): ");
+			gets(fname);
+			if (strcmp(fname, "") == 0)
+				tst_brkm(ttype, tst_exit, RESM, ttype);
+			else
+				tst_brk(ttype, fname, tst_exit, RES, ttype, fname);
+		break;
 
-			case -4:
-				printf("Enter the current type (%i,%i,%i,%i,%i,%i,%i): ",
-					TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
-				scanf("%d%c", &ttype, &chr);
-			default:
-				printf("Enter file name (<cr> for none): ");
-				gets(fname);
+		case -4:
+			printf("Enter the current type (%i,%i,%i,%i,%i,%i,%i): ",
+				TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
+			scanf("%d%c", &ttype, &chr);
+		default:
+			printf("Enter file name (<cr> for none): ");
+			gets(fname);
 
-				if (strcmp(fname, "") == 0)
-					tst_resm(ttype, RESM, ttype);
-				else
-					tst_res(ttype, fname, RES, ttype, fname);
+			if (strcmp(fname, "") == 0)
+				tst_resm(ttype, RESM, ttype);
+			else
+				tst_res(ttype, fname, RES, ttype, fname);
 			break;
 		}
 
diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
index 06dbe00..3fffe78 100644
--- a/lib/tst_tmpdir.c
+++ b/lib/tst_tmpdir.c
@@ -34,51 +34,52 @@
 
 /**********************************************************
  *
- *    OS Testing - Silicon Graphics, Inc.
+ *	 OS Testing - Silicon Graphics, Inc.
  *
- *    FUNCTION NAME     : tst_tmpdir, tst_rmdir
+ *	 FUNCTION NAME	  : tst_tmpdir, tst_rmdir
  *
- *    FUNCTION TITLE    : Create/remove a testing temp dir
+ *	 FUNCTION TITLE	 : Create/remove a testing temp dir
  *
- *    SYNOPSIS:
- *      void tst_tmpdir();
- *      void tst_rmdir();
+ *	 SYNOPSIS:
+ *		void tst_tmpdir();
+ *		void tst_rmdir();
  *
- *    AUTHOR            : Dave Fenner
+ *	 AUTHOR		 : Dave Fenner
  *
- *    INITIAL RELEASE   : UNICOS 8.0
+ *	 INITIAL RELEASE	: UNICOS 8.0
  *
- *    DESCRIPTION
- *      tst_tmpdir() is used to create a unique, temporary testing
- *      directory, and make it the current working directory.
- *      tst_rmdir() is used to remove the directory created by
- *      tst_tmpdir().
+ *	 DESCRIPTION
+ *		tst_tmpdir() is used to create a unique, temporary testing
+ *		directory, and make it the current working directory.
+ *		tst_rmdir() is used to remove the directory created by
+ *		tst_tmpdir().
  *
- *      Setting the env variable "TDIRECTORY" will override the creation
- *      of a new temp dir.  The directory specified by TDIRECTORY will
- *      be used as the temporary directory, and no removal will be done
- *      in tst_rmdir().
+ *		Setting the env variable "TDIRECTORY" will override the creation
+ *		of a new temp dir.  The directory specified by TDIRECTORY will
+ *		be used as the temporary directory, and no removal will be done
+ *		in tst_rmdir().
  *
- *    RETURN VALUE
- *      Neither tst_tmpdir() or tst_rmdir() has a return value.
+ *	 RETURN VALUE
+ *		Neither tst_tmpdir() or tst_rmdir() has a return value.
  *
  *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 #include <errno.h>
-#include <stdlib.h>        /* for getenv() */
-#include <string.h>        /* for string functions */
-#include <unistd.h>        /* for sysconf(), getcwd(), rmdir() */
-#include <sys/types.h>     /* for mkdir() */
-#include <sys/stat.h>      /* for mkdir() */
+#include <libgen.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "test.h"
 #include "rmobj.h"
 
 /*
  * Define some useful macros.
  */
-#define PREFIX_SIZE     4
-#define STRING_SIZE     256
-#define DIR_MODE        0777  /* mode of tmp dir that will be created */
+#define PREFIX_SIZE	  4
+#define STRING_SIZE	  256
+#define DIR_MODE	0777  /* mode of tmp dir that will be created */
 
 #ifndef PATH_MAX
 #ifdef MAXPATHLEN
@@ -96,55 +97,51 @@
 /*
  * Define global variables.
  */
-extern char *TCID;            /* defined/initialized in main() */
-extern int  TST_TOTAL;        /* defined/initialized in main() */
-extern char *TESTDIR;         /* the directory created; defined in */
-                              /* tst_res.c */
+extern char *TCID;		 /* defined/initialized in main() */
+extern int  TST_TOTAL;	/* defined/initialized in main() */
+static char *TESTDIR;	 /* the directory created */
 
 /*
  * tst_tmpdir() - Create a unique temporary directory and chdir() to it.
- *                It expects the caller to have defined/initialized the
- *                TCID/TST_TOTAL global variables.  The TESTDIR global
- *                variable will be set to the directory that gets used
- *                as the testing directory.
+ *		It expects the caller to have defined/initialized the
+ *		TCID/TST_TOTAL global variables.  The TESTDIR global
+ *		variable will be set to the directory that gets used
+ *		as the testing directory.
  *
- *                NOTE: This function must be called BEFORE any activity
- *                that would require CLEANUP.  If tst_tmpdir() fails, it
- *                cleans up afer itself and calls tst_exit() (i.e. does
- *                not return).
+ *		NOTE: This function must be called BEFORE any activity
+ *		that would require CLEANUP.  If tst_tmpdir() fails, it
+ *		cleans up afer itself and calls tst_exit() (i.e. does
+ *		not return).
  */
-#undef   FN_NAME
+#undef	FN_NAME
 #define  FN_NAME  "tst_tmpdir()"
 
 void tst_tmpdir(void)
 {
- 	char template[PATH_MAX];      /* template for mkstemp, mkdtemp */
-  	int  no_cleanup = 0;          /* !0 means TDIRECTORY env var was set */
-	char *env_tmpdir;            /* temporary storage for TMPDIR env var */
-/* This is an AWEFUL hack to figure out if mkdtemp() is available */
-#if defined(__GLIBC_PREREQ)
-# if __GLIBC_PREREQ(2,2)
-#  define HAVE_MKDTEMP 1
-# else
-#  define HAVE_MKDTEMP 0
-	int tfd;
-# endif
-#else
-# define HAVE_MKDTEMP 0
-	int tfd;
+ 	char template[PATH_MAX];		/* template for mkstemp, mkdtemp */
+  	int  no_cleanup = 0;	  /* !0 means TDIRECTORY env var was set */
+	char *env_tmpdir;		 /* temporary storage for TMPDIR env var */
+	/* This is an AWFUL hack to figure out if mkdtemp() is available */
+#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,2)
+#define HAVE_MKDTEMP 1
 #endif
-   	/*
+
+		/*
 	 * If the TDIRECTORY env variable is not set, a temp dir will be
 	 * created.
 	 */
-	if ((TESTDIR = getenv(TDIRECTORY))) {
+	if ((TESTDIR = getenv(TDIRECTORY)) != NULL) {
 		/*
 		 * The TDIRECTORY env. variable is set, so no temp dir is created.
-		 * Also, no clean up will be done via tst_rmdir().
 		 */
-                mkdir(TESTDIR,DIR_MODE); /*Try to create the directory if it does not exist already,
-                                           user might forget to create one before exporting TDIRECTORY,
-                                           Will fail if it already exists, no issues in that*/
+		if (mkdir(TESTDIR, DIR_MODE) == -1 && errno != EEXIST) {
+			tst_brkm(TBROK, NULL, "mkdir(%s, %o) failed",
+			    TESTDIR, DIR_MODE);
+		}
+		/*
+		 * Try to create the directory if it does not exist already;
+		 * user might forget to create one before exporting TDIRECTORY.
+		 */
 		no_cleanup++;
 #if UNIT_TEST
 		printf("TDIRECTORY env var is set\n");
@@ -162,50 +159,41 @@
 		}
 
 
-#if HAVE_MKDTEMP
-		/*
-		 * Make the temporary directory in one shot using mkdtemp()
-		 */
+#ifdef HAVE_MKDTEMP
+		/* Make the temporary directory in one shot using mkdtemp. */
 		if (mkdtemp(template) == NULL)
-			tst_brkm(TBROK, tmpdir_cleanup,
-				"%s: mkdtemp(%s) failed; errno = %d: %s",
-				FN_NAME, template, errno, strerror(errno));
-                if ((TESTDIR = strdup(template)) == NULL ) { //Error Handling for strdup()
-                        tst_brkm(TBROK, tmpdir_cleanup,
-                                "%s: strdup(%s) failed; errno = %d: %s",
-                                FN_NAME, template, errno, strerror(errno));
-                }
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: mkdtemp(%s) failed", FN_NAME, template);
+		if ((TESTDIR = strdup(template)) == NULL) {
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: strdup(%s) failed", FN_NAME, template);
+		}
 #else
-		/*
-		 * Make the template name, then the directory
-		 */
+		int tfd;
+
+		/* Make the template name, then the directory */
 		if ((tfd = mkstemp(template)) == -1)
-			tst_brkm(TBROK, tmpdir_cleanup,
-				"%s: mkstemp(%s) failed; errno = %d: %s",
-				FN_NAME, template, errno, strerror(errno));
-                if (close(tfd) == -1) {
-                        tst_brkm(TBROK, tmpdir_cleanup,
-                                "%s: close() failed; errno = %d: %s",
-                                FN_NAME, errno, strerror(errno));
-                }
-                if (unlink(template) == -1) {
-                        tst_brkm(TBROK, tmpdir_cleanup,
-                                "%s: unlink(%s) failed; errno = %d: %s",
-                                FN_NAME, template, errno, strerror(errno));
-                }
-                if ((TESTDIR = strdup(template)) == NULL) {
-                        tst_brkm(TBROK, tmpdir_cleanup,
-                                "%s: strdup(%s) failed; errno = %d: %s",
-                                FN_NAME, template, errno, strerror(errno));
-                }
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: mkstemp(%s) failed", FN_NAME, template);
+		if (close(tfd) == -1) {
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: close() failed", FN_NAME);
+		}
+		if (unlink(template) == -1) {
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: unlink(%s) failed", FN_NAME, template);
+		}
+		if ((TESTDIR = strdup(template)) == NULL) {
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: strdup(%s) failed", FN_NAME, template);
+		}
 		if (mkdir(TESTDIR, DIR_MODE)) {
 			/* If we start failing with EEXIST, wrap this section in
 			 * a loop so we can try again.
 			 */
-			tst_brkm(TBROK, tmpdir_cleanup,
-				"%s: mkdir(%s, %#o) failed; errno = %d: %s",
-				FN_NAME, TESTDIR, DIR_MODE, errno,
-				strerror(errno));
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"%s: mkdir(%s, %#o) failed",
+				FN_NAME, TESTDIR, DIR_MODE);
 		}
 #endif
 
@@ -214,13 +202,12 @@
 		 * gid of the person running the tests and permissions to 777.
 		 */
 		if (chown(TESTDIR, -1, getgid()) == -1)
-			tst_brkm(TBROK, tmpdir_cleanup,
-				"chown(%s, -1, %d) failed; errno = %d: %s",
-				TESTDIR, getgid(), errno, strerror(errno));
-		if (chmod(TESTDIR,S_IRWXU | S_IRWXG | S_IRWXO) == -1)
-			tst_brkm(TBROK, tmpdir_cleanup,
-				"chmod(%s,777) failed; errno %d: %s",
-				TESTDIR, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"chown(%s, -1, %d) failed", TESTDIR, getgid());
+		if (chmod(TESTDIR,S_IRWXU | S_IRWXG | S_IRWXO) == -1) {
+			tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
+				"chmod(%s,777) failed", TESTDIR);
+		}
  	}
 
 #if UNIT_TEST
@@ -229,18 +216,19 @@
 
  	/*
   	 * Change to the temporary directory.  If the chdir() fails, issue
-   	 * TBROK messages for all test cases, attempt to remove the
+	 * TBROK messages for all test cases, attempt to remove the
 	 * directory (if it was created), and exit.  If the removal also
 	 * fails, also issue a TWARN message.
 	 */
 	if (chdir(TESTDIR) == -1) {
-		tst_brkm(TBROK, NULL, "%s: chdir(%s) failed; errno = %d: %s",
-				FN_NAME, TESTDIR, errno, strerror(errno) );
+		tst_brkm(TBROK|TERRNO, NULL, "%s: chdir(%s) failed",
+		    FN_NAME, TESTDIR);
 
 		/* Try to remove the directory */
-		if (!no_cleanup && rmdir(TESTDIR) == -1)
-			tst_resm(TWARN, "%s: rmdir(%s) failed; errno = %d: %s",
-				FN_NAME, TESTDIR, errno, strerror(errno) );
+		if (!no_cleanup && rmdir(TESTDIR) == -1) {
+			tst_resm(TWARN|TERRNO, "%s: rmdir(%s) failed",
+			    FN_NAME, TESTDIR);
+		}
 
 		tmpdir_cleanup();
 	}
@@ -249,110 +237,118 @@
 	printf("CWD is %s\n", getcwd((char *)NULL, PATH_MAX));
 #endif
 
-	/*
-	 *  If we made through all this stuff, return.
-	 */
-	return;
 }  /* tst_tmpdir() */
 
 
 /*
  *
  * tst_rmdir() - Recursively remove the temporary directory created by
- *               tst_tmpdir().  This function is intended ONLY as a
- *               companion to tst_tmpdir().  If the TDIRECTORY
- *               environment variable is set, no cleanup will be
- *               attempted.
+ *			 tst_tmpdir().  This function is intended ONLY as a
+ *			 companion to tst_tmpdir().  If the TDIRECTORY
+ *			 environment variable is set, no cleanup will be
+ *			 attempted.
  */
-#undef   FN_NAME
+#undef	FN_NAME
 #define  FN_NAME  "tst_rmdir()"
 
 void tst_rmdir(void)
 {
-   char *errmsg;
-   char *tdirectory;
-   char current_dir[PATH_MAX];   /* current working directory */
-   char parent_dir[PATH_MAX];    /* directory above TESTDIR */
-   char *basename;               /* basename of the TESTDIR */
+	struct stat buf1;
+	struct stat buf2;
+	char current_dir[PATH_MAX];
+	char *errmsg;
+	char *parent_dir;
+	char *tdirectory;
 
-   /*
-    * If the TDIRECTORY env variable is set, this indicates that no
-    * temp dir was created by tst_tmpdir().  Thus no cleanup will be
-    * necessary.
-    */
-   if ((tdirectory = getenv(TDIRECTORY)) != NULL) {
+	/*
+	 * If the TDIRECTORY env variable is set, this indicates that no
+	 * temp dir was created by tst_tmpdir().  Thus no cleanup will be
+	 * necessary.
+	 */
+	if ((tdirectory = getenv(TDIRECTORY)) != NULL) {
 #if UNIT_TEST
-      printf("\"TDIRECORY\" env variable is set; no cleanup was performed\n");
+		printf("\"TDIRECORY\" env variable is set; no cleanup was performed\n");
 #endif
-      return;
-   }
+		return;
+	}
 
-   /*
-    * Check that TESTDIR is not NULL.
-    */
-   if (TESTDIR == NULL) {
-      tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
-               FN_NAME);
-      return;
-   }
+	/*
+	 * Check that TESTDIR is not NULL.
+	 */
+	if (TESTDIR == NULL) {
+		tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
+			 FN_NAME);
+		return;
+	}
 
-   /*
-    * Check that the value of TESTDIR is not "*" or "/".  These could
-    * have disastrous effects in a test run by root.
-    */
-   if (strcmp(TESTDIR, "/") == 0) {
-      tst_resm(TWARN,
-               "%s: Recursive remove of root directory not attempted",
-               FN_NAME);
-      return;
-   }
+	if ((parent_dir = malloc(PATH_MAX))) {
+		tst_brkm(TBROK|TERRNO, NULL, "%s: malloc(%d) failed",
+		    FN_NAME, PATH_MAX);
+		/* Make sure that we exit quickly and noisily. */
+		exit(1);
+	}
 
-   if (strchr(TESTDIR, '*') != NULL) {
-      tst_resm(TWARN, "%s: Recursive remove of '*' not attempted",
-               FN_NAME);
-      return;
-   }
+	/*
+	 * Check that the value of TESTDIR is not "*" or "/".  These could
+	 * have disastrous effects in a test run by root.
+	 */
+	/* XXX: a temp directory that's '/' seems stupid and dangerous anyways. */
+	if (stat(TESTDIR, &buf1) == 0 && stat("/", &buf2) &&
+	    buf1.st_ino == buf2.st_ino) {
+		tst_resm(TWARN, "%s: will not remove /", FN_NAME);
+		return;
+	}
 
-   /*
-    * Get the directory name of TESTDIR.  If TESTDIR is a relative path,
-    * get full path.
-    */
-   if (TESTDIR[0] != '/') {
-      if (getcwd(current_dir,PATH_MAX) == NULL)
-         strcpy(parent_dir, TESTDIR);
-      else
-         sprintf(parent_dir, "%s/%s", current_dir, TESTDIR);
-   } else {
-      strcpy(parent_dir, TESTDIR);
-   }
-   if ((basename = strrchr(parent_dir, '/')) != NULL) {
-      *basename='\0';   /* terminate at end of parent_dir */
-   }
+	/* 
+	 * XXX: this just reeks of bad programming; all shell characters should
+	 * be escaped in invocations of rm(1)/rmdir(1).
+	 */
+	if (strchr(TESTDIR, '*') != NULL) {
+		tst_resm(TWARN, "%s: will not remove *", FN_NAME);
+		return;
+	}
 
-   /*
-    * Change directory to parent_dir (The dir above TESTDIR).
-    */
-   if (chdir(parent_dir) != 0)
-      tst_resm(TWARN,
-               "%s: chdir(%s) failed; errno = %d: %s\nAttempting to remove temp dir anyway",
-               FN_NAME, parent_dir, errno, strerror(errno));
+	/*
+	 * Get the directory name of TESTDIR.  If TESTDIR is a relative path,
+	 * get full path.
+	 */
+	if (TESTDIR[0] != '/') {
+		if (getcwd(current_dir, PATH_MAX) == NULL)
+			strncpy(parent_dir, TESTDIR, sizeof(parent_dir));
+		else
+			sprintf(parent_dir, "%s/%s", current_dir, TESTDIR);
+	} else {
+		strcpy(parent_dir, TESTDIR);
+	}
+	if ((parent_dir = dirname(parent_dir)) == NULL) {
+		tst_resm(TWARN|TERRNO, "%s: dirname failed", FN_NAME);
+		return;
+	}
 
-   /*
-    * Attempt to remove the "TESTDIR" directory, using rmobj().
-    */
-   if (rmobj(TESTDIR, &errmsg) == -1)
-      tst_resm(TWARN, "%s: rmobj(%s) failed: %s",
-               FN_NAME, TESTDIR, errmsg);
+	/*
+	 * Change directory to parent_dir (The dir above TESTDIR).
+	 */
+	if (chdir(parent_dir) != 0) {
+		tst_resm(TWARN|TERRNO,
+			 "%s: chdir(%s) failed\nAttempting to remove temp dir anyway",
+			 FN_NAME, parent_dir);
+	}
 
-   return;
+	/*
+	 * Attempt to remove the "TESTDIR" directory, using rmobj().
+	 */
+	if (rmobj(TESTDIR, &errmsg) == -1)
+		tst_resm(TWARN, "%s: rmobj(%s) failed: %s",
+			 FN_NAME, TESTDIR, errmsg);
+
 }  /* tst_rmdir() */
 
 
 /*
  * tmpdir_cleanup() - This function is used when tst_tmpdir()
- *                    encounters an error, and must cleanup and exit.
- *                    It prints a warning message via tst_resm(), and
- *                    then calls tst_exit().
+ *			 encounters an error, and must cleanup and exit.
+ *			 It prints a warning message via tst_resm(), and
+ *			 then calls tst_exit().
  */
 #undef  FN_NAME
 #define FN_NAME "tst_tmpdir()"
@@ -360,50 +356,46 @@
 static void
 tmpdir_cleanup()
 {
-   /*
-    * Print a warning message and call tst_exit() to exit the test.
-    */
-   tst_resm(TWARN, "%s: No user cleanup function called before exiting",
-            FN_NAME);
-   tst_exit();
+	tst_brkm(TWARN, NULL,
+	    "%s: no user cleanup function called before exiting", FN_NAME);
 }  /* tmpdir_cleanup() */
 
 
 #ifdef UNIT_TEST
 /****************************************************************************
  * Unit test code: Takes input from stdin and can make the following
- *                 calls: tst_tmpdir(), tst_rmdir().
+ *		 calls: tst_tmpdir(), tst_rmdir().
  ****************************************************************************/
 int  TST_TOTAL = 10;
 char *TCID = "TESTTCID";
 
 main()
 {
-   int  option;
-   char *chrptr;
+	int  option;
+	char *chrptr;
 
-   printf("UNIT TEST of tst_tmpdir.c.  Options to try:\n\
-   -1 : call tst_exit()\n\
-    0 : call tst_tmpdir()\n\
-    1 : call tst_rmdir()\n\n");
+	printf("UNIT TEST of tst_tmpdir.c.  Options to try:\n\
+		-1 : call tst_exit()\n\
+		0 : call tst_tmpdir()\n\
+		1 : call tst_rmdir()\n\n");
 
-   while ( 1 ) {
-      printf("Enter options (-1, 0, 1): ");
-      (void) scanf("%d%c", &option, &chrptr);
+	while (1) {
+		printf("Enter options (-1, 0, 1): ");
+		(void)scanf("%d%c", &option, &chrptr);
 
-      switch ( option ) {
-      case -1:
-         tst_exit();
-         break;
+		switch (option) {
+		case -1:
+			tst_exit();
+			break;
 
-      case 0:
-         tst_tmpdir();
-         break;
+		case 0:
+			tst_tmpdir();
+			break;
 
-      case 1:
-         tst_rmdir();
-         break;
-      }  /* switch() */
-   }  /* while () */
+		case 1:
+			tst_rmdir();
+			break;
+		}  /* switch() */
+	}  /* while () */
 }
 #endif  /* UNIT_TEST */
diff --git a/testcases/commands/ade/size/test.c b/testcases/commands/ade/size/test.c
index eb2d789..1072333 100644
--- a/testcases/commands/ade/size/test.c
+++ b/testcases/commands/ade/size/test.c
@@ -3,11 +3,11 @@
 int main(void)
 {
 
-	int i=0;
+	int i;
 
-	for ( i=0; i<10; i++)
+	for (i = 0; i < 10; i++)
 	{
-		if (i %2)
+		if ((i % 2) != 0)
 			printf(" Hello \n ");
 		else
 			printf("World \n");
diff --git a/testcases/kdump/lib/kprobes/kprobes.c b/testcases/kdump/lib/kprobes/kprobes.c
index 0547611..d9f1afb 100644
--- a/testcases/kdump/lib/kprobes/kprobes.c
+++ b/testcases/kdump/lib/kprobes/kprobes.c
@@ -19,7 +19,7 @@
          clone_flags, stack_size, regs);
   /* Always end with a call to jprobe_return(). */
   jprobe_return();
-  /*NOTREACHED*/
+  
   return 0;
 }
 
diff --git a/testcases/kernel/containers/mqns/mqns_01.c b/testcases/kernel/containers/mqns/mqns_01.c
index 515ed51..9729453 100644
--- a/testcases/kernel/containers/mqns/mqns_01.c
+++ b/testcases/kernel/containers/mqns/mqns_01.c
@@ -31,12 +31,11 @@
 #define _GNU_SOURCE
 #endif
 #include <sys/wait.h>
-#include <assert.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <errno.h>
+#include <unistd.h>
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_01";
@@ -53,20 +52,27 @@
 	close(p1[1]);
 	close(p2[0]);
 
-	if (read(p1[0], buf, strlen("go") + 1) < 0)
-		tst_resm(TBROK | TERRNO, "read(p1[0], ...) failed");
+	if (read(p1[0], buf, strlen("go") + 1) < 0) {
+		printf("read(p1[0], ...) failed: %s\n", strerror(errno));
+		exit(1);
+	}
 	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDONLY);
 	if (mqd == -1) {
-		if (write(p2[1], "notfnd", strlen("notfnd") + 1) < 0)
-			tst_resm(TBROK | TERRNO, "write(p2[1], ...) failed");
+		if (write(p2[1], "notfnd", strlen("notfnd") + 1) < 0) {
+			perror("write(p2[1], ...) failed");
+			exit(1);
+		}
 	} else {
-		if (write(p2[1], "exists", strlen("exists") + 1) < 0)
-			tst_resm(TBROK | TERRNO, "write(p2[1], \"exists\", 7) failed");
-		else if (mq_close(mqd) < 0)
-			tst_resm(TBROK | TERRNO, "mq_close(mqd) failed");
+		if (write(p2[1], "exists", strlen("exists") + 1) < 0) {
+			perror("write(p2[1], \"exists\", 7) failed");
+			exit(1);
+		} else if (mq_close(mqd) < 0) {
+			perror("mq_close(mqd) failed");
+			exit(1);
+		}
 	}
 
-	tst_exit();
+	exit(0);
 }
 
 int
@@ -83,8 +89,9 @@
 	} else
 		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
 
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1 || pipe(p2) == -1) {
+		tst_brkm(TBROK|TERRNO, NULL, "pipe failed");
+	}
 
 	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0777,
 			NULL);
@@ -121,7 +128,9 @@
 	}
 
 	/* destroy the mqueue */
-	mq_close(mqd);
+	if (mq_close(mqd) == -1) {
+		tst_brkm(TBROK|TERRNO, NULL, "mq_close failed");
+	}
 	syscall(__NR_mq_unlink, NOSLASH_MQ1);
 
 	tst_exit();
diff --git a/testcases/kernel/containers/mqns/mqns_02.c b/testcases/kernel/containers/mqns/mqns_02.c
index 07ab042..ecc86b1 100644
--- a/testcases/kernel/containers/mqns/mqns_02.c
+++ b/testcases/kernel/containers/mqns/mqns_02.c
@@ -34,12 +34,11 @@
 #define _GNU_SOURCE
 #endif
 #include <sys/wait.h>
-#include <assert.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <errno.h>
+#include <unistd.h>
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_02";
@@ -57,45 +56,44 @@
 	close(p2[0]);
 
 	if (read(p1[0], buf, 3) < 0)
-		tst_resm(TBROK | TERRNO, "read(p1[0], ..) failed");
+		perror("read(p1[0], ..) failed");
+		exit(1);
 	else {
 
 		mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL,
 				0777, NULL);
 		if (mqd == -1) {
 			if (write(p2[1], "mqfail", strlen("mqfail") + 1) < 0) {
-				tst_resm(TBROK | TERRNO,
-					"write(p2[1], \"mqfail\", ..) failed");
+				perror("write(p2[1], \"mqfail\", ..) failed");
+				exit(1);
 			}
-			tst_exit();
 		} else {
 
-			if (write(p2[1], "mqopen", strlen("mqopen") + 1) < 0)
-				tst_resm(TBROK | TERRNO,
-					"write(p2[1], \"mqopen\", ..) failed");
+			if (write(p2[1], "mqopen", strlen("mqopen") + 1) < 0) {
+				perror("write(p2[1], \"mqopen\", ..) failed");
+				exit(1);
+			} else {
 
-			else {
-
-				if (read(p1[0], buf, 5) < 0)
-					tst_resm(TBROK | TERRNO,
-						"read(p1[0], ..) failed");
-				else {
+				if (read(p1[0], buf, 5) < 0) {
+					perror("read(p1[0], ..) failed");
+					exit(1);
+				} else {
 
 					/* destroy the mqueue */
 					if (mq_close(mqd) < 0) {
-						tst_resm(TBROK | TERRNO,
-							"mq_close(mqd) failed");
+						perror("mq_close(mqd) failed");
+						exit(1);
 					} else if (syscall(__NR_mq_unlink,
 							NOSLASH_MQ1) < 0) {
-						tst_resm(TBROK | TERRNO,
-							"mq_unlink(" NOSLASH_MQ1
-							") failed");
+						perror("mq_unlink(" NOSLASH_MQ1
+						    ") failed");
+						exit(1);
 					} else if (write(p2[1], "done",
 							strlen("done") + 1)
 							< 0) {
-						tst_resm(TBROK | TERRNO,
-							"write(p2[1], "
-							"\"done\", ..) failed");
+						perror("write(p2[1], "
+						    "\"done\", ..) failed");
+						exit(1);
 					}
 
 				}
@@ -105,7 +103,7 @@
 		}
 
 	}
-	tst_exit();
+	exit(0);
 
 }
 
@@ -123,14 +121,14 @@
 	} else
 		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
 
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1 || pipe(p2) == -1) {
+		tst_brkm(TBROK|TERRNO, NULL, "pipe");
+	}
 
 	/* fire off the test */
 	r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_mqueue, NULL);
 	if (r < 0) {
-		tst_resm(TFAIL, "failed clone/unshare\n");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "failed clone/unshare\n");
 	}
 
 	tst_resm(TINFO, "Checking namespaces isolation (child to parent)\n");
@@ -138,34 +136,30 @@
 	close(p1[0]);
 	close(p2[1]);
 	if (write(p1[1], "go", strlen("go") + 1) < 0) {
-		tst_resm(TBROK, "write(p1[1], \"go\", ..) failed");
+		tst_brkm(TBROK, NULL, "write(p1[1], \"go\", ..) failed");
 	}
 
 	if (read(p2[0], buf, 7) < 0) {
-		tst_resm(TBROK, "read(p2[0], ..) failed");
+		tst_resm(TBROK|TERRNO, "read(p2[0], ..) failed");
 	} else if (!strcmp(buf, "mqfail")) {
 		tst_resm(TFAIL, "child process could not create mqueue\n");
 		umount(DEV_MQUEUE);
-		tst_exit();
 	} else if (strcmp(buf, "mqopen")) {
 		tst_resm(TFAIL, "child process could not create mqueue\n");
 		umount(DEV_MQUEUE);
-		tst_exit();
 	} else {
-
 		mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDONLY);
 		if (mqd == -1) {
 			tst_resm(TPASS, "Parent process can't see the mqueue\n");
 		} else {
-			tst_resm(TFAIL, "Parent process found mqueue\n");
+			tst_resm(TFAIL|TERRNO, "Parent process found mqueue\n");
 			mq_close(mqd);
 		}
 		if (write(p1[1], "cont", 5) < 0) {
-			tst_resm(TBROK, "write(p1[1], ..) failed");
-
+			tst_resm(TBROK|TERRNO, "write(p1[1], ..) failed");
 		}
+		read(p2[0], buf, 7);
 	}
-	read(p2[0], buf, 7);
 
 	tst_exit();
 }
diff --git a/testcases/kernel/containers/mqns/mqns_03.c b/testcases/kernel/containers/mqns/mqns_03.c
index 83db75c..3bf9057 100644
--- a/testcases/kernel/containers/mqns/mqns_03.c
+++ b/testcases/kernel/containers/mqns/mqns_03.c
@@ -61,66 +61,67 @@
 	close(p1[1]);
 	close(p2[0]);
 
-	read(p1[0], buf, 3); /* go */
+	if (read(p1[0], buf, 3) != 3) { /* go */
+		perror("read failed");
+		exit(1);
+	}
 
 	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755,
 			NULL);
 	if (mqd == -1) {
 		write(p2[1], "mqfail", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	mq_close(mqd);
 
 	rc = mount("mqueue", DEV_MQUEUE2, "mqueue", 0, NULL);
 	if (rc == -1) {
-		perror("mount");
 		write(p2[1], "mount1", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	rc = stat(FNAM1, &statbuf);
 	if (rc == -1) {
 		write(p2[1], "stat1", 6);
-		tst_exit();
+		exit(1);
 	}
 
 	rc = creat(FNAM2, 0755);
 	if (rc == -1) {
 		write(p2[1], "creat", 6);
-		tst_exit();
+		exit(1);
 	}
 
 	close(rc);
 
 	rc = umount(DEV_MQUEUE2);
 	if (rc == -1) {
-		perror("umount");
 		write(p2[1], "umount", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	rc = mount("mqueue", DEV_MQUEUE2, "mqueue", 0, NULL);
 	if (rc == -1) {
 		write(p2[1], "mount2", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	rc = stat(FNAM1, &statbuf);
 	if (rc == -1) {
 		write(p2[1], "stat2", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	rc = stat(FNAM2, &statbuf);
 	if (rc == -1) {
 		write(p2[1], "stat3", 7);
-		tst_exit();
+		exit(1);
 	}
 
 	write(p2[1], "done", 5);
 
-	tst_exit();
+	exit(0);
 }
 
 
@@ -131,59 +132,58 @@
 	int use_clone = T_UNSHARE;
 
 	if (argc == 2 && strcmp(argv[1], "-clone") == 0) {
-		tst_resm(TINFO, "Testing posix mq namespaces through clone(2).\n");
+		tst_resm(TINFO, "Testing posix mq namespaces through clone(2)");
 		use_clone = T_CLONE;
 	} else
-		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
+		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2)");
 
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1 || pipe(p2) == -1) {
+		tst_resm(TBROK|TERRNO, NULL, "pipe failed");
+	}
 
 	/* fire off the test */
 	r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_mqueue, NULL);
 	if (r < 0) {
-		tst_resm(TFAIL, "failed clone/unshare\n");
-		tst_exit();
+		tst_brkm(TBROK|TERRNO, NULL, "failed clone/unshare");
 	}
 
-	tst_resm(TINFO, "Checking correct umount+remount of mqueuefs\n");
+	tst_resm(TINFO, "Checking correct umount+remount of mqueuefs");
 
 	mkdir(DEV_MQUEUE2, 0755);
 
 	close(p1[0]);
-	close(p1[0]);
 	close(p2[1]);
 	write(p1[1], "go", 3);
 
 	read(p2[0], buf, 7);
 	r = TFAIL;
 	if (!strcmp(buf, "mqfail")) {
-		tst_resm(TFAIL, "child process could not create mqueue\n");
+		tst_resm(TFAIL, "child process could not create mqueue");
 		goto fail;
 	} else if (!strcmp(buf, "mount1")) {
-		tst_resm(TFAIL, "child process could not mount mqueue\n");
+		tst_resm(TFAIL, "child process could not mount mqueue");
 		goto fail;
 	} else if (!strcmp(buf, "stat1x")) {
-		tst_resm(TFAIL, "mq created by child is not in mqueuefs\n");
+		tst_resm(TFAIL, "mq created by child is not in mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "creat")) {
-		tst_resm(TFAIL, "child couldn't creat mq through mqueuefs\n");
+		tst_resm(TFAIL, "child couldn't creat mq through mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "umount")) {
-		tst_resm(TFAIL, "child couldn't umount mqueuefs\n");
+		tst_resm(TFAIL, "child couldn't umount mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "mount2")) {
-		tst_resm(TFAIL, "child couldn't remount mqueuefs\n");
+		tst_resm(TFAIL, "child couldn't remount mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "stat2")) {
-		tst_resm(TFAIL, "mq_open()d file gone after remount of mqueuefs\n");
+		tst_resm(TFAIL, "mq_open()d file gone after remount of mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "stat3")) {
-		tst_resm(TFAIL, "creat(2)'d file gone after remount of mqueuefs\n");
+		tst_resm(TFAIL, "creat(2)'d file gone after remount of mqueuefs");
 		goto fail;
 	}
 
-	tst_resm(TPASS, "umount+remount of mqueuefs remounted the right fs\n");
+	tst_resm(TPASS, "umount+remount of mqueuefs remounted the right fs");
 
 	r = 0;
 fail:
diff --git a/testcases/kernel/containers/pidns/pidns01.c b/testcases/kernel/containers/pidns/pidns01.c
index 809b905..ad5ab1f 100644
--- a/testcases/kernel/containers/pidns/pidns01.c
+++ b/testcases/kernel/containers/pidns/pidns01.c
@@ -126,7 +126,7 @@
         /* cleanup and exit */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 
 }	/* End main */
diff --git a/testcases/kernel/containers/pidns/pidns04.c b/testcases/kernel/containers/pidns/pidns04.c
index 1d9d769..e6102d9 100644
--- a/testcases/kernel/containers/pidns/pidns04.c
+++ b/testcases/kernel/containers/pidns/pidns04.c
@@ -82,7 +82,11 @@
        	close(fd[0]);
 
 	/* Comparing the values to make sure pidns is created correctly */
+<<<<<<< HEAD
+	if (( cpid == CHILD_PID) && ( ppid == PARENT_PID )) {
+=======
 	if (( cpid == CHILD_PID) && ( ppid == PARENT_PID ) ) {
+>>>>>>> master
 		tst_resm(TINFO, "PIDNS test is running inside container");
 		kill(INIT_PID, SIGKILL);
 		/* Verifying whether the container init is not killed, "
diff --git a/testcases/kernel/containers/pidns/pidns05.c b/testcases/kernel/containers/pidns/pidns05.c
index 14e1bfb..e5e83fc 100644
--- a/testcases/kernel/containers/pidns/pidns05.c
+++ b/testcases/kernel/containers/pidns/pidns05.c
@@ -250,7 +250,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/containers/pidns/pidns06.c b/testcases/kernel/containers/pidns/pidns06.c
index dad5528..5e90bd6 100644
--- a/testcases/kernel/containers/pidns/pidns06.c
+++ b/testcases/kernel/containers/pidns/pidns06.c
@@ -156,7 +156,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/containers/pidns/pidns17.c b/testcases/kernel/containers/pidns/pidns17.c
index c7bbea8..3ac6a7c 100644
--- a/testcases/kernel/containers/pidns/pidns17.c
+++ b/testcases/kernel/containers/pidns/pidns17.c
@@ -152,5 +152,5 @@
 	/* Clean the test testcase as LTP wants*/
 	TEST_CLEANUP;
 	tst_exit();
-	/* NOTREACHED */
+	
 }
diff --git a/testcases/kernel/device-drivers/agp/kernel_space/tagp.c b/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
index f448c9d..58d7367 100644
--- a/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
+++ b/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
@@ -226,7 +226,7 @@
         }
 
         /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif)) ) {
+        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
                 printk("tpci: Unsuccessful copy_to_user of tif\n");
                 rc = -EFAULT;
         }
diff --git a/testcases/kernel/device-drivers/agp/user_space/user_tagp.c b/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
index 15df22b..515901e 100644
--- a/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
+++ b/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
@@ -154,7 +154,7 @@
 
 	/* open the module */
 	rc = tagpopen();
-	if (rc ) {
+	if (rc) {
 		printf("Test AGP Driver may not be loaded\n");
 		exit(1);
 	}
@@ -288,7 +288,7 @@
 
 	/* close the module */
 	rc = tagpclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test AGP Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/base/tbase/tbase.c b/testcases/kernel/device-drivers/base/tbase/tbase.c
index e4736ea..4cd0b3f 100644
--- a/testcases/kernel/device-drivers/base/tbase/tbase.c
+++ b/testcases/kernel/device-drivers/base/tbase/tbase.c
@@ -341,7 +341,7 @@
         }
 
         /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif)) ) {
+        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
                 printk("tbase: Unsuccessful copy_to_user of tif\n");
                 rc = -EFAULT;
         }
diff --git a/testcases/kernel/device-drivers/base/user_base/user_tbase.c b/testcases/kernel/device-drivers/base/user_base/user_tbase.c
index 1dabab6..1269355 100644
--- a/testcases/kernel/device-drivers/base/user_base/user_tbase.c
+++ b/testcases/kernel/device-drivers/base/user_base/user_tbase.c
@@ -136,7 +136,7 @@
 
 	/* open the module */
 	rc = tbaseopen();
-        if (rc ) {
+        if (rc) {
                 printf("Test MOD Driver may not be loaded\n");
                 exit(1);
         }
@@ -257,7 +257,7 @@
 
 	/* close the module */
 	rc = tbaseclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test MOD Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
index 721301d..bb3498d 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
@@ -177,7 +177,7 @@
         }
 
         /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif)) ) {
+        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
                 printk("tpci: Unsuccessful copy_to_user of tif\n");
                 rc = -EFAULT;
         }
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c b/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
index 990a9cd..0aaa3dd 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
@@ -140,7 +140,7 @@
 
 	/* open the module */
 	rc = tmodopen();
-        if (rc ) {
+        if (rc) {
                 printf("Test MOD Driver may not be loaded\n");
                 exit(1);
         }
@@ -157,7 +157,7 @@
 
 	/* close the module */
 	rc = tmodclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test MOD Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c b/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
index acc35c5..f264647 100644
--- a/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
+++ b/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
@@ -131,7 +131,7 @@
 
 	/* open the module */
 	rc = tdrmopen();
-        if (rc ) {
+        if (rc) {
                 printf("Test DRM Driver may not be loaded\n");
                 exit(1);
         }
@@ -400,7 +400,7 @@
 
 	*/
 	rc = tdrmclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test MOD Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/pci/tpci/tpci.c b/testcases/kernel/device-drivers/pci/tpci/tpci.c
index a3b2466..643cae7 100644
--- a/testcases/kernel/device-drivers/pci/tpci/tpci.c
+++ b/testcases/kernel/device-drivers/pci/tpci/tpci.c
@@ -202,7 +202,7 @@
 	}
 
 	/* copy tif structure into l so that can be used by user program */
-	if (copy_to_user((void*)l, &tif, sizeof(tif)) ) {
+	if (copy_to_user((void*)l, &tif, sizeof(tif))) {
 		printk("tpci: Unsuccessful copy_to_user of tif\n");
 		rc = -EFAULT;
 	}
@@ -283,7 +283,7 @@
 	}
 
 
-	if ( pci_enable_device(dev) ) {
+	if (pci_enable_device(dev)) {
 		printk("tpci: failed to enable pci device\n");
 		rc = 1;
 	}
diff --git a/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c b/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
index 85013cd..f996db6 100644
--- a/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
+++ b/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
@@ -119,7 +119,7 @@
 	int rc;
 
 	rc = tpciopen();
-	if (rc ) {
+	if (rc) {
 		printf("Test PCI Driver may not be loaded\n");
 		exit(1);
 	}
@@ -244,7 +244,7 @@
 
 
 	rc = tpciclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test PCI Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/rtc/rtc-test.c b/testcases/kernel/device-drivers/rtc/rtc-test.c
index a62b033..df93f85 100644
--- a/testcases/kernel/device-drivers/rtc/rtc-test.c
+++ b/testcases/kernel/device-drivers/rtc/rtc-test.c
@@ -203,7 +203,7 @@
        rtc_fd = open(rtc_dev, O_RDONLY);
 
        if (rtc_fd < 0)
-               tst_brkm(TBROK | TERRNO, tst_exit, "couldn't open %s", rtc_dev);
+               tst_brkm(TBROK | TERRNO, NULL, "couldn't open %s", rtc_dev);
 
        /*Read and alarm tests*/
        read_alarm_test();
@@ -214,5 +214,5 @@
        close(rtc_fd);
 
        tst_resm(TINFO, "RTC Tests Done!");
-       return 0;
+     tst_exit();
 }
diff --git a/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c b/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
index d5216a1..d1c8884 100644
--- a/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
+++ b/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
@@ -223,7 +223,7 @@
 static int test_bio_clone(void)
 {
 	tbiop_dup = bio_clone(tbiop,GFP_NOIO);
-	if ( tbiop_dup == NULL ) {
+	if (tbiop_dup == NULL) {
 		printk("tbio: bio_clone failed\n");
 		return -1;
 	}
@@ -269,7 +269,7 @@
 static int test_do_bio_alloc(int num)
 {
 	tbiop = bio_alloc(GFP_KERNEL , num);
-	if (tbiop == NULL ) {
+	if (tbiop == NULL) {
 		printk("tbio: bio_alloc failed\n");
 		return -1;
 	}
@@ -311,7 +311,7 @@
 
 
 	tbiop = bio_alloc(GFP_KERNEL , BIO_MAX_PAGES);
-	if (tbiop == NULL ) {
+	if (tbiop == NULL) {
 		printk("tbio: bio_alloc failed\n");
 		return -1;
 	}
@@ -498,7 +498,7 @@
 
 static int tbio_open(struct inode *inode , struct file *filep)
 {
-	if ( ! Device.bdev ) {
+	if (!Device.bdev) {
 		Device.bdev = inode->i_bdev;
 		//atomic_inc((atomic_t)&Device.bdev->bd_part_count);
 	}
diff --git a/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c b/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
index d612b17..8ca2e43 100644
--- a/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
+++ b/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
@@ -165,7 +165,7 @@
 
 	memset(&bif , 0 , sizeof(tbio_interface_t));
 	rc = posix_memalign(&bif.data , 512 , 1024);
-	if ( rc ) {
+	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
@@ -205,7 +205,7 @@
 
 	memset(&bif , 0 , sizeof(tbio_interface_t));
 	rc = posix_memalign(&bif.data , 512 , 1024);
-	if ( rc ) {
+	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
@@ -254,7 +254,7 @@
 
 	memset(&bif , 0 , sizeof(tbio_interface_t));
 	rc = posix_memalign(&bif.data , 512 , 2048);
-	if ( rc ) {
+	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
@@ -293,7 +293,7 @@
 
 	/* open the bioule */
 	rc = tbioopen();
-	if (rc ) {
+	if (rc) {
 		printf("Test bio Driver may not be loaded\n");
 		exit(1);
 	}
@@ -345,7 +345,7 @@
 	
 	/* close the bioule */
 	rc = tbioclose();
-	if (rc ) {
+	if (rc) {
                 printf("Test bio Driver may not be closed\n");
                 exit(1);
         }
diff --git a/testcases/kernel/device-drivers/usb/tusb/tusb.c b/testcases/kernel/device-drivers/usb/tusb/tusb.c
index f50bd6e..8754ca7 100644
--- a/testcases/kernel/device-drivers/usb/tusb/tusb.c
+++ b/testcases/kernel/device-drivers/usb/tusb/tusb.c
@@ -247,7 +247,7 @@
         }
 
         /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif)) ) {
+        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
                 printk("tpci: Unsuccessful copy_to_user of tif\n");
                 rc = -EFAULT;
         }
diff --git a/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c b/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
index 65d8335..f57a0bb 100644
--- a/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
+++ b/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
@@ -120,7 +120,7 @@
 	int 	rc = 0;
 
 	rc = tusbopen();
-	if ( rc ) {
+	if (rc) {
 		printf("tusb driver may not be loaded\n");
 		exit(1);
 	}
diff --git a/testcases/kernel/fs/acls/acl_file_test.c b/testcases/kernel/fs/acls/acl_file_test.c
index 3a3f05d..3e29d1c 100644
--- a/testcases/kernel/fs/acls/acl_file_test.c
+++ b/testcases/kernel/fs/acls/acl_file_test.c
@@ -29,7 +29,7 @@
 		return -1;
 	}
 
-	if (-1 == (s = flistxattr(fd, list, 1024)) ) {
+	if (-1 == (s = flistxattr(fd, list, 1024))) {
 		perror("flistxattr");
 		return 1;
 	}
diff --git a/testcases/kernel/fs/acls/acl_link_test.c b/testcases/kernel/fs/acls/acl_link_test.c
index 3c456a0..3ffae32 100644
--- a/testcases/kernel/fs/acls/acl_link_test.c
+++ b/testcases/kernel/fs/acls/acl_link_test.c
@@ -18,7 +18,7 @@
 		return -1;
 	}
 
-	if (-1 == (s = listxattr(argv[1], list, 1024)) ) {
+	if (-1 == (s = listxattr(argv[1], list, 1024))) {
 		perror("listxattr");
 		return 1;
 	}
diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
index fffd21c..92554cb 100644
--- a/testcases/kernel/fs/doio/doio.c
+++ b/testcases/kernel/fs/doio/doio.c
@@ -1320,11 +1320,11 @@
 	addr = Memptr;
 
 
-	if ( (req->r_data.read.r_uflags & F_WORD_ALIGNED) ) {
+	if ((req->r_data.read.r_uflags & F_WORD_ALIGNED)) {
 		/*
 		 * Force memory alignment for Direct I/O
 		 */
-		if ( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) {
+		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
 			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 	} else {
@@ -1533,7 +1533,7 @@
 		}
 
 		(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
-		if ( addr != Memptr )
+		if (addr != Memptr)
 			memmove( addr, Memptr, nbytes);
 	}
 #else /* CRAY */
@@ -1547,11 +1547,11 @@
 
 	addr = Memptr;
 
-	if ( (req->r_data.write.r_uflags & F_WORD_ALIGNED) ) {
+	if ((req->r_data.write.r_uflags & F_WORD_ALIGNED)) {
 		/*
 		 * Force memory alignment for Direct I/O
 		 */
-		if ( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) {
+		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
 			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 	} else {
@@ -1559,7 +1559,7 @@
 	}
 
 	(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
-	if ( addr != Memptr )
+	if (addr != Memptr)
 		memmove( addr, Memptr, nbytes);
 
 #else /* sgi */
@@ -1570,7 +1570,7 @@
 	addr = Memptr;
 
 	(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
-	if ( addr != Memptr )
+	if (addr != Memptr)
 		memmove( addr, Memptr, nbytes);
 #endif /* sgi */
 #endif /* CRAY */
@@ -1948,7 +1948,7 @@
 	if (lio->r_opcode == LO_WRITE) {
 		Pattern[0] = lio->r_pattern;
 		(*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0);
-		if ( addr != Memptr )
+		if (addr != Memptr)
 			memmove( addr, Memptr, mem_needed);
 	}
 
@@ -2386,13 +2386,13 @@
 	lc = (sysc->sy_flags & SY_ASYNC) ? LC_START : LC_WAIT;
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid = (int *)malloc( (nents+1) * sizeof(int) );
-	if ( status->aioid == NULL ) {
+	if (status->aioid == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2401,7 +2401,7 @@
 	signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0;
 
 	lio_req = (struct listreq *)malloc(nents * sizeof(struct listreq));
-	if ( lio_req == NULL ) {
+	if (lio_req == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2430,7 +2430,7 @@
 
 	status->aioid[nents] = -1;		/* end sentinel */
 
-	if ( (status->rval = listio(lc, lio_req, nents)) == -1) {
+	if ((status->rval = listio(lc, lio_req, nents)) == -1) {
 		status->err = errno;
 	}
 
@@ -2465,10 +2465,10 @@
 
 	if (errbuf == NULL) {
 		errbuf = (char *)malloc(32768);
-		if ( errbuf == NULL ) {
-		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
-			return NULL;
+		if (errbuf == NULL) {
+			doio_fprintf(stderr, "malloc failed, %s/%d\n",
+				__FILE__, __LINE__);
+				return NULL;
 		}
 	}
 
@@ -2499,7 +2499,7 @@
 		   req->r_data.io.r_offset);
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2525,7 +2525,7 @@
 		    req->r_data.io.r_offset);
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2545,7 +2545,7 @@
 
 	if (errbuf == NULL) {
 		errbuf = (char *)malloc(32768);
-		if ( errbuf == NULL ) {
+		if (errbuf == NULL) {
 			doio_fprintf(stderr, "malloc failed, %s/%d\n",
 				__FILE__, __LINE__);
 			return NULL;
@@ -2595,7 +2595,7 @@
 	struct iovec	iov[2];
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2678,7 +2678,7 @@
 	struct aio_info		*aiop;
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2717,7 +2717,7 @@
 		rc = aio_read(&aiop->aiocb);
 
 	status->aioid = (int *)malloc( 2 * sizeof(int) );
-	if ( status->aioid == NULL ) {
+	if (status->aioid == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2786,7 +2786,7 @@
     int rc;
 
 	status = (struct status *)malloc(sizeof(struct status));
-	if ( status == NULL ) {
+	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
 			__FILE__, __LINE__);
 		return NULL;
@@ -2796,8 +2796,8 @@
 
 	fdc = alloc_fdcache(req->r_data.io.r_file, req->r_data.io.r_oflags);
 
-	if ( v_opt || fdc->c_memaddr == NULL ) {
-		if ( fstat(fd, &sbuf) < 0 ) {
+	if (v_opt || fdc->c_memaddr == NULL) {
+		if (fstat(fd, &sbuf) < 0) {
 			doio_fprintf(stderr, "fstat failed, errno=%d\n",
 				     errno);
 			status->err = errno;
@@ -2809,7 +2809,7 @@
 		     rw ? PROT_WRITE|PROT_READ : PROT_READ,
 		     MAP_SHARED, fd, 0);
 
-		if ( mrc == MAP_FAILED ) {
+		if (mrc == MAP_FAILED) {
 			doio_fprintf(stderr, "mmap() failed - 0x%lx %d\n",
 				mrc, errno);
 			status->err = errno;
@@ -3000,7 +3000,7 @@
 	nents   = req->r_data.io.r_nent;
 	pattern	= req->r_data.io.r_pattern;
 
-	if ( nents >= MAX_AIO ) {
+	if (nents >= MAX_AIO) {
 		doio_fprintf(stderr, "do_rw: too many list requests, %d.  Maximum is %d\n",
 			     nents, MAX_AIO);
 		return(-1);
@@ -3038,7 +3038,7 @@
 	 *	MPP_BUMP extra words for T3E non-hw-aligned memory address.
 	 */
 
-	if ( sy->sy_buffer != NULL ) {
+	if (sy->sy_buffer != NULL) {
 		mem_needed = (*sy->sy_buffer)(req, 0, 0, NULL, NULL);
 	} else {
 		mem_needed = nbytes;
@@ -3076,7 +3076,7 @@
 		if (alloc_sds(nbytes) == -1)
 			return -1;
 
-		if ( sy->sy_flags & SY_WRITE ) {
+		if (sy->sy_flags & SY_WRITE) {
 			/*pattern_fill(Memptr, mem_needed, Pattern, Pattern_Length, 0);*/
 			(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
 
@@ -3122,7 +3122,7 @@
 		/*
 		 * Force memory alignment for Direct I/O
 		 */
-		if ( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) {
+		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
 			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 #endif
@@ -3134,7 +3134,7 @@
 		 */
 		if (sy->sy_flags & SY_WRITE) {
 			(*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0);
-			if ( addr != Memptr )
+			if (addr != Memptr)
 			    memmove( addr, Memptr, mem_needed);
 		}
 	}
@@ -3147,7 +3147,7 @@
 	 * Lock data if this is a write and locking option is set
 	 */
 	if (sy->sy_flags & SY_WRITE && k_opt) {
-		if ( sy->sy_buffer != NULL ) {
+		if (sy->sy_buffer != NULL) {
 			(*sy->sy_buffer)(req, offset, 0, &min_byte, &max_byte);
 		} else {
 			min_byte = offset;
@@ -3208,7 +3208,7 @@
 
 	s = (*sy->sy_syscall)(req, sy, fd, addr);
 
-	if ( s->rval == -1 ) {
+	if (s->rval == -1) {
 		doio_fprintf(stderr,
 			     "%s() request failed:  %s (%d)\n%s\n%s\n",
 			     sy->sy_name, SYSERR, errno,
@@ -3241,9 +3241,9 @@
 		 * structure.
 		 */
 
-		if ( sy->sy_flags & SY_IOSW ) {
+		if (sy->sy_flags & SY_IOSW) {
 #ifdef CRAY
-			for ( i=0; i < nents; i++ ) {
+			for (i=0; i < nents; i++) {
 				if (s->aioid == NULL)
 					break; /* >>> error condition? */
 				aiop = aio_slot(s->aioid[i]);
@@ -3275,7 +3275,7 @@
 			}
 #endif /* CRAY */
 #ifdef sgi
-			for ( i=0; s->aioid[i] != -1; i++ ) {
+			for (i = 0; s->aioid[i] != -1; i++) {
 				if (s->aioid == NULL) {
 					doio_fprintf(stderr,
 						     "aioid == NULL!\n");
@@ -3456,7 +3456,7 @@
 
 	rval = fcntl(fd, op, &flk);
 
-	if ( rval == -1 ) {
+	if (rval == -1) {
 		doio_fprintf(stderr,
 			     "fcntl %s request failed: %s (%d)\n\tfcntl(%d, %s %d, {%d %lld ==> %lld}\n",
 			     msg, SYSERR, errno,
@@ -3667,7 +3667,7 @@
 #ifdef sgi
 	/* Irix: Guarantee a properly aligned address on Direct I/O */
 	fdc = alloc_fdcache(file, flags);
-	if ( (flags & O_DIRECT) && ((long)buf % fdc->c_memalign != 0) ) {
+	if ((flags & O_DIRECT) && ((long)buf % fdc->c_memalign != 0)) {
 		buf += fdc->c_memalign - ((long)buf % fdc->c_memalign);
 	}
 #endif
@@ -3695,7 +3695,7 @@
 		return errbuf;
 	}
    
-	if ( (em = (*Data_Check)(buf, offset, length, pattern, pattern_length, patshift)) != NULL ) {
+	if ((em = (*Data_Check)(buf, offset, length, pattern, pattern_length, patshift)) != NULL) {
 		ep = errbuf;
 		ep += sprintf(ep, "*** DATA COMPARISON ERROR ***\n");
 		ep += sprintf(ep, "check_file(%s, %d, %d, %s, %d, %d) failed\n\n",
@@ -3770,7 +3770,7 @@
 #endif
 
 	/* nbytes = -1 means "free all allocated memory" */
-	if ( nbytes == -1 ) {
+	if (nbytes == -1) {
 
 		for (me=0; me < Nmemalloc; me++) {
 			if (Memalloc[me].space == NULL)
@@ -3836,10 +3836,10 @@
 
 	switch(M->memtype) {
 	case MEM_DATA:
-		if ( nbytes > M->size ) {
-			if ( M->space != NULL ) {
+		if (nbytes > M->size) {
+			if (M->space != NULL) {
 #ifdef sgi
-				if ( M->flags & MEMF_MPIN )
+				if (M->flags & MEMF_MPIN)
 					munpin( M->space, M->size );
 #endif
 				free(M->space);
@@ -3848,15 +3848,15 @@
 			M->size = 0;
 		}
 
-		if ( M->space == NULL ) {
-			if ( (cp = malloc( nbytes )) == NULL ) {
+		if (M->space == NULL) {
+			if ((cp = malloc( nbytes )) == NULL) {
 				doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
 					     nbytes, SYSERR, errno);
 				return -1;
 			}
 #ifdef sgi
 			if (M->flags & MEMF_MPIN) {
-				if ( mpin(cp, nbytes) == -1 ) {
+				if (mpin(cp, nbytes) == -1) {
 					doio_fprintf(stderr, "mpin(0x%lx, %d) failed:  %s (%d)\n",
 					     cp, nbytes, SYSERR, errno);
 				}
@@ -3868,28 +3868,28 @@
 		break;
 
 	case MEM_MMAP:
-		if ( nbytes > M->size ) {
-			if ( M->space != NULL ) {
+		if (nbytes > M->size) {
+			if (M->space != NULL) {
 #ifdef sgi
-				if ( M->flags & MEMF_MPIN )
+				if (M->flags & MEMF_MPIN)
 					munpin(M->space, M->size);
 #endif
 				munmap(M->space, M->size);
 				close(M->fd);
-				if ( M->flags & MEMF_FILE )
+				if (M->flags & MEMF_FILE)
 					unlink( M->name );
 			}
 			M->space = NULL;
 			M->size = 0;
 		}
 
-		if ( M->space == NULL ) {
+		if (M->space == NULL) {
 			if (strchr(M->name, '%')) {
 				sprintf(filename, M->name, getpid());
 				M->name = strdup(filename);
 			}
 
-			if ( (M->fd = open(M->name, O_CREAT|O_RDWR, 0666)) == -1) {
+			if ((M->fd = open(M->name, O_CREAT|O_RDWR, 0666)) == -1) {
 				doio_fprintf(stderr, "alloc_mmap: error %d (%s) opening '%s'\n",
 					     errno, SYSERR,
 					     M->name);
@@ -3942,10 +3942,10 @@
 		break;
 	
 	case MEM_SHMEM:
-		if ( nbytes > M->size ) {
-			if ( M->space != NULL ) {
+		if (nbytes > M->size) {
+			if (M->space != NULL) {
 #ifdef sgi
-				if ( M->flags & MEMF_MPIN )
+				if (M->flags & MEMF_MPIN)
 					munpin(M->space, M->size);
 #endif
 				shmdt( M->space );
@@ -3968,7 +3968,7 @@
 
 			M->size = M->nblks ? M->nblks * 512 : nbytes;
 
-			if ( nbytes > M->size ) {
+			if (nbytes > M->size) {
 #ifdef DEBUG
 				doio_fprintf(stderr, "MEM_SHMEM: nblks(%d) too small:  nbytes=%d  Msize=%d, skipping this req.\n",
 					     M->nblks, nbytes, M->size );
@@ -3977,21 +3977,21 @@
 			}
 
 			shmid = shmget(key, M->size, IPC_CREAT|0666);
-			if ( shmid == -1 ) {
+			if (shmid == -1) {
 				doio_fprintf(stderr, "shmget(0x%x, %d, CREAT) failed: %s (%d)\n",
 					     key, M->size, SYSERR, errno);
 				return(-1);
 			}
 			M->fd = shmid;
 			M->space = shmat(shmid, NULL, SHM_RND);
-			if ( M->space == (void *)-1 ) {
+			if (M->space == (void *)-1) {
 				doio_fprintf(stderr, "shmat(0x%x, NULL, SHM_RND) failed: %s (%d)\n",
 					     shmid, SYSERR, errno);
 				return(-1);
 			}
 #ifdef sgi
 			if (M->flags & MEMF_MPIN) {
-				if ( mpin(M->space, M->size) == -1 ) {
+				if (mpin(M->space, M->size) == -1) {
 					doio_fprintf(stderr, "mpin(0x%lx, %d) failed:  %s (%d)\n",
 						     M->space, M->size, SYSERR, errno);
 			    }
@@ -4043,18 +4043,18 @@
 #else
 
 	/* nbytes = -1 means "free all allocated memory" */
-	if ( nbytes == -1 ) {
+	if (nbytes == -1) {
 		free( malloc_space );
 		Memptr = NULL;
 		Memsize = 0;
 		return 0;
 	}
 
-	if ( nbytes > Memsize ) {
-	    if ( Memsize != 0 )
+	if (nbytes > Memsize) {
+	    if (Memsize != 0)
 		free( malloc_space );
 
-	    if ( (cp = malloc_space = malloc( nbytes )) == NULL ) {
+	    if ((cp = malloc_space = malloc( nbytes )) == NULL) {
 		doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
 			     nbytes, SYSERR, errno);
 		return -1;
@@ -4063,12 +4063,12 @@
 #ifdef _CRAYT3E
 	    /* T3E requires memory to be aligned on 0x40 word boundaries */
 	    ip = (int)cp;
-	    if ( ip & 0x3F != 0 ) {
+	    if (ip & 0x3F != 0) {
 		doio_fprintf(stderr, "malloc(%d) = 0x%x(0x%x) not aligned by 0x%x\n",
 			     nbytes, cp, ip, ip & 0x3f);
 
 		free(cp);
-		if ( (cp = malloc_space = malloc( nbytes + 0x40 )) == NULL ) {
+		if ((cp = malloc_space = malloc(nbytes + 0x40)) == NULL) {
 		    doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
 				 nbytes, SYSERR, errno);
 		    return -1;
@@ -4358,8 +4358,8 @@
 			break;
 		}
 
-		if ( ! haveit ) {
-			if ( (info->si_signo == SIGSEGV) ||
+		if (!haveit) {
+			if ((info->si_signo == SIGSEGV) ||
 			   (info->si_signo == SIGBUS) ) {
 				doio_fprintf(stderr, "signal_info  si_signo %d si_errno %d si_code = %d  si_addr=%p  active_mmap_rw=%d havesigint=%d\n",
 					     info->si_signo, info->si_errno,
@@ -4370,7 +4370,7 @@
 			   }
 		}
 
-		if ( !haveit ) {
+		if (!haveit) {
 			doio_fprintf(stderr, "signal_info: si_signo %d si_errno %d unknown code %d\n",
 				     info->si_signo, info->si_errno,
 				     info->si_code);
@@ -4421,7 +4421,7 @@
 	 */
 
 
-	if ( active_mmap_rw && havesigint && (info->si_errno == EINTR) ) {
+	if (active_mmap_rw && havesigint && (info->si_errno == EINTR)) {
 		cleanup_handler( sig, info, v );
 	}
 	else{
@@ -4457,7 +4457,7 @@
 	   do it anyway.
 	*/
 
-	if ( active_mmap_rw && havesigint )
+	if (active_mmap_rw && havesigint)
 		cleanup_handler();
 	else
 		die_handler(sig);
@@ -4597,7 +4597,7 @@
 		}
 	}
 
-	if ( aiop == NULL ) {
+	if (aiop == NULL) {
 		doio_fprintf(stderr,"aio_slot(%d) not found.  Request %d\n",
 			     aio_id, Reqno);
 		dump_aio();
@@ -4739,7 +4739,7 @@
 		cnt=0;
 		do {
 			r = aio_suspend(aioary, 1, NULL);
-			if ( r == -1 ) {
+			if (r == -1) {
 				doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n",
 					     SYSERR, errno );
 				exit(E_SETUP);
@@ -4765,7 +4765,7 @@
 	case A_SUSPEND:
 		aioary[0] = &aiop->aiocb;
 		r = aio_suspend(aioary, 1, NULL);
-		if ( r == -1 ) {
+		if (r == -1) {
 			doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n",
 				     SYSERR, errno );
 			exit(E_SETUP);
@@ -4812,14 +4812,14 @@
 #endif
 
 #ifdef sgi
-	if ( (ainfo->aio_errno = aio_error(&ainfo->aiocb)) == -1 ) {
+	if ((ainfo->aio_errno = aio_error(&ainfo->aiocb)) == -1) {
 		doio_fprintf(stderr, "aio_done: aio_error failed: %s (%d)\n",
 			     SYSERR, errno );
 		exit(E_SETUP);
 	}
 	/*printf("%d aio_done aio_errno=%d\n", getpid(), ainfo->aio_errno);*/
-	if ( ainfo->aio_errno != EINPROGRESS ) {
-		if ( (ainfo->aio_ret = aio_return(&ainfo->aiocb)) == -1 ) {
+	if (ainfo->aio_errno != EINPROGRESS) {
+		if ((ainfo->aio_ret = aio_return(&ainfo->aiocb)) == -1) {
 			doio_fprintf(stderr, "aio_done: aio_return failed: %s (%d)\n",
 				     SYSERR, errno );
 			exit(E_SETUP);
diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
index cbac5a0..7231d34 100644
--- a/testcases/kernel/fs/doio/growfiles.c
+++ b/testcases/kernel/fs/doio/growfiles.c
@@ -573,22 +573,22 @@
 
 		case 'I':
 #if NEWIO
-			if ((io_type=lio_parse_io_arg1(optarg)) == -1 ) {
+			if ((io_type=lio_parse_io_arg1(optarg)) == -1) {
 			    fprintf(stderr,
 				"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
 				Progname, TagName);
 			    exit(1);
 			}
-			if ( io_type & LIO_RANDOM )
+			if (io_type & LIO_RANDOM)
 				using_random++;
 #else
-			if ((io_type=parse_io_arg(optarg)) == -1 ) {
+			if ((io_type=parse_io_arg(optarg)) == -1) {
 			    fprintf(stderr,
 				"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
 				Progname, TagName);
 			    exit(1);
 			}
-			if ( io_type == 99 ) /* hold-over until tlibio.h */
+			if (io_type == 99) /* hold-over until tlibio.h */
 				using_random++;
 #endif
 			break;
@@ -923,9 +923,9 @@
 		}
 	}
 
-	if ( Debug == 1 ) {
+	if (Debug == 1) {
 		cptr = getenv("TOUTPUT");
-		if ( (cptr != NULL) && (strcmp( cptr, "NOPASS" ) == 0) ) {
+		if ((cptr != NULL) && (strcmp( cptr, "NOPASS" ) == 0)) {
 			Debug = 0;
 		}
 	}
@@ -1601,7 +1601,7 @@
         signal(sig, sig_handler);	/* allow us to get this signal more than once */
 #endif
        
-    } else if ( sig == SIGINT ) {
+    } else if (sig == SIGINT) {
 	/* The user has told us to cleanup, don't pretend it's an error. */
 	exit_stat=0;
 	if (Debug != 0) {
@@ -2103,14 +2103,14 @@
 		ret=write_buffer(fd, io_type, buf, grow_incr, 0, &errmsg);
 #endif
 
-		if ( Mode & MODE_FIFO ) {
+		if (Mode & MODE_FIFO) {
 			/* If it is a fifo then just pretend the file
 			 * offset is where we think it should be.
 			 */
 			tmp = Woffset + grow_incr;
 		}
 		else{
-			if ( (tmp=lseek(fd,0,SEEK_CUR)) < 0 ) { /* get offset after the write */
+			if ((tmp=lseek(fd,0,SEEK_CUR)) < 0) { /* get offset after the write */
 				fprintf(stderr, "%s%s: %s/%d: tell(2) failed: %d  %s\n",
 					Progname, TagName, __FILE__, __LINE__, errno, strerror(errno) );
 				return -1;
@@ -2123,9 +2123,9 @@
 			 * unspecified--which means we cannot trust what
 			 * tell() told us.  Fudge it here.
 			 */
-			if ( (io_type & LIO_IO_ASYNC_TYPES) || (io_type & LIO_RANDOM) ) {
-				if ( tmp != Woffset + grow_incr ) {
-					if ( Debug > 5 ) {
+			if ((io_type & LIO_IO_ASYNC_TYPES) || (io_type & LIO_RANDOM)) {
+				if (tmp != Woffset + grow_incr) {
+					if (Debug > 5) {
 						printf("%s: %d DEBUG6 %s/%d: posix fudge, forcing tmp (%"PRId64") to match Woffset+grow_incr (%"PRId64")\n",
 						       Progname, Pid, __FILE__, __LINE__, (int64_t)tmp, (int64_t)Woffset+grow_incr);
 					}
@@ -2169,12 +2169,12 @@
 			printf("%s%s: %d DEBUG1 %s/%d: %d Assuming file changed by another process, resetting offset:%ld (expect pattern mismatch)\n",
 				Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, tmp-grow_incr);
 		    }
-		    if ( Debug > 4 ) {
+		    if (Debug > 4) {
 			printf("%s: %d DEBUG5 %s/%d: about to chop Woffset.  tmp=%ld, grow_incr=%d, Woffset was %ld\n",
 			       Progname, Pid, __FILE__, __LINE__, tmp, grow_incr, Woffset);
 		    }
 		    Woffset=tmp-grow_incr;
-		    if ( Woffset < 0 )
+		    if (Woffset < 0)
 			Woffset = 0;
 		}
 
@@ -2310,7 +2310,7 @@
 	ret=trunc(fd);
 #else
 	ret=ftruncate(fd, new_offset );
-	if ( (ret == 0) && (Debug > 3) ) {
+	if (ret == 0 && Debug > 3) {
                 printf("%s: %d DEBUG4 %s/%d: ftruncated to offset %d, %d bytes from end\n",
                     Progname, Pid, __FILE__, __LINE__, new_offset, trunc_incr);
 	}
@@ -2678,7 +2678,7 @@
 	    /*
 	     * Read the whole file in a single read
 	     */
-	    if ((buf=(char *)malloc(fsize)) == NULL ) {
+	    if ((buf = (char *)malloc(fsize)) == NULL) {
 			fprintf(stderr, "%s%s: %s/%d: malloc(%d) failed: %s\n", Progname, TagName,
 				__FILE__, __LINE__, fsize, strerror(errno));
 			fflush(stderr);
@@ -2858,7 +2858,7 @@
 	f.l_len = size;
 
 	/* non-zeroing reservation */
-	if ( fcntl( fd, F_RESVSP, &f ) == -1 ) {
+	if (fcntl( fd, F_RESVSP, &f ) == -1) {
                 fprintf(stderr, "%s%s %s/%d: Unable to pre-alloc space: fcntl(F_RESVSP) failed: %d  %s\n",
 			Progname, TagName,
                         __FILE__, __LINE__, errno, strerror(errno));
diff --git a/testcases/kernel/fs/doio/iogen.c b/testcases/kernel/fs/doio/iogen.c
index 7a4e83e..a3b6e4f 100644
--- a/testcases/kernel/fs/doio/iogen.c
+++ b/testcases/kernel/fs/doio/iogen.c
@@ -610,7 +610,7 @@
     }
 #endif
 
-    if ( sc->m_flags & SY_WRITE )
+    if (sc->m_flags & SY_WRITE)
 	    pattern = Byte_Patterns[random_range(0, sizeof(Byte_Patterns) - 1, 1, NULL)];
     else
 	    pattern = 0;
@@ -751,7 +751,7 @@
     /*
      * Choose an async io completion strategy if necessary
      */
-    if ( sc->m_flags & SY_ASYNC )
+    if (sc->m_flags & SY_ASYNC)
 	    aio_strat = Aio_Strat_List[random_range(0, Naio_Strat_Types - 1,
 						    1, NULL)];
     else
@@ -853,7 +853,7 @@
 	 *
 	 * maxstrides = min(length / mult, overall.max#strides)
 	 * nstrides = random #
-	 * while ( length / nstrides < minlength )
+	 * while (length / nstrides < minlength)
 	 *	nstrides = new random #
 	 */
 	maxstride = length / mult;
@@ -871,7 +871,7 @@
 
 	slength = length / nstrides;
 	if (slength % mult != 0) {
-	    if ( mult > slength) {
+	    if (mult > slength) {
 		slength = mult;
 	    } else {
 		slength -= slength % mult;
@@ -882,7 +882,7 @@
 	}
 
 	req->r_data.io.r_nbytes = slength;
-	if ( sc->m_flags & SY_NENT ) {
+	if (sc->m_flags & SY_NENT) {
 		req->r_data.io.r_nstrides = 1;
 		req->r_data.io.r_nent = nstrides;
 	} else {
@@ -997,7 +997,7 @@
 	rec->f_riou = BSIZE;
 #endif
 #ifdef sgi
-	if ( (fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1 ) {
+	if ((fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1) {
 	    if (fcntl(fd, F_DIOINFO, &finfo) != -1) {
 		rec->f_riou = finfo.d_miniosz;
 	    } else {
@@ -1121,7 +1121,7 @@
 	    memset(&xattr, 0x00, sizeof(xattr));
 	    xattr.fsx_xflags = XFS_XFLAG_REALTIME;
 	    /*fprintf(stderr, "set: fsx_xflags = 0x%x\n", xattr.fsx_xflags);*/
-	    if ( fcntl(fd, F_FSSETXATTR, &xattr) == -1 ) {
+	    if (fcntl(fd, F_FSSETXATTR, &xattr) == -1) {
 		fprintf(stderr, "iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
 			TagName, SYSERR, errno, path);
 		close(fd);
@@ -1129,7 +1129,7 @@
 	    }
 
 #ifdef DEBUG
-	    if ( fcntl(fd, F_FSGETXATTR, &xattr) == -1 ) {
+	    if (fcntl(fd, F_FSGETXATTR, &xattr) == -1) {
 		fprintf(stderr, "iogen%s: Error getting realtime flag %s (%d)\n",
 			TagName, SYSERR, errno);
 		close(fd);
@@ -1147,7 +1147,7 @@
 	 * Failure is ignored since F_RESVSP only works on XFS and the
 	 * filesystem could be on EFS or NFS
 	 */
-	if ( Oreserve ) {
+	if (Oreserve) {
 	    f.l_whence = SEEK_SET;
 	    f.l_start = 0;
 	    f.l_len = nbytes;
@@ -1157,7 +1157,7 @@
 		   fd, f.l_whence, (long long)f.l_start, (long long)f.l_len);*/
 
 	    /* non-zeroing reservation */
-	    if ( fcntl( fd, F_RESVSP, &f ) == -1) {
+	    if (fcntl(fd, F_RESVSP, &f) == -1) {
 		fprintf(stderr,
 			"iogen%s:  Could not fcntl(F_RESVSP) %d bytes in file %s: %s (%d)\n",
 			TagName, nbytes, path, SYSERR, errno);
@@ -1166,7 +1166,7 @@
 	    }
 	}
 
-	if ( Oallocate ) {
+	if (Oallocate) {
 	    /* F_ALLOCSP allocates from the start of the file to l_start */
 	    f.l_whence = SEEK_SET;
 	    f.l_start = nbytes;
@@ -1177,7 +1177,7 @@
 		    (long long)f.l_len);*/
 
 	    /* zeroing reservation */
-	    if ( fcntl( fd, F_ALLOCSP, &f ) == -1) {
+	    if (fcntl( fd, F_ALLOCSP, &f ) == -1) {
 		fprintf(stderr,
 			"iogen%s:  Could not fcntl(F_ALLOCSP) %d bytes in file %s: %s (%d)\n",
 			TagName, nbytes, path, SYSERR, errno);
@@ -1195,7 +1195,7 @@
 #ifdef sgi
 	if (Owrite == 2) {
 	    close(fd);
-	    if ( (fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1 ) {
+	    if ((fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1) {
 		if (fcntl(fd, F_DIOINFO, &finfo) == -1) {
 		    fprintf(stderr,
 			    "iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
@@ -1236,7 +1236,7 @@
 
 	    b = buf = (char *)malloc(finfo.d_miniosz+finfo.d_mem);
 
-	    if ( ((long)buf % finfo.d_mem != 0) ) {
+	    if (((long)buf % finfo.d_mem != 0)) {
 		buf += finfo.d_mem - ((long)buf % finfo.d_mem);
 	    }
 	   
@@ -1407,7 +1407,7 @@
  	case 'f':
 	    cp = strtok(optarg, ",");
 	    while (cp != NULL) {
-		if ( (flgs = str_lookup(Flag_Map, cp)) == NULL ) {
+		if ((flgs = str_lookup(Flag_Map, cp)) == NULL) {
 		    fprintf(stderr, "iogen%s:  Unrecognized flags:  %s\n", TagName, cp);
 		    exit(2);
 		}
@@ -1532,7 +1532,7 @@
 		    sscanf(openargs[1],"%i", &Oextsize);
 		else
 		    Oextsize=0;
-	    } else if ( !strcmp(openargs[0], "allocate") ||
+	    } else if (!strcmp(openargs[0], "allocate") ||
 		       !strcmp(openargs[0], "allocsp")) {
 		/*
 		 * -O allocate
@@ -1631,31 +1631,31 @@
      * Supply defaults
      */
 
-    if ( ! L_opt ) {
+    if (!L_opt) {
 	    Minstrides = 1;
 	    Maxstrides = 255;
     }
 
-    if (! m_opt)
+    if (!m_opt)
 	Offset_Mode = str_lookup(Omode_Map, "sequential");
 
-    if (! i_opt)
+    if (!i_opt)
 	Iterations = 0;
 
-    if (! t_opt)
+    if (!t_opt)
 	Mintrans = 1;
 
-    if (! T_opt)
+    if (!T_opt)
 	Maxtrans = 256 * BSIZE;
 
-    if ( ! O_opt)
+    if (!O_opt)
 	Oflags = Ocbits = Ocblks = 0;
 
     /*
      * Supply default async io completion strategy types.
      */
 
-    if (! a_opt) {
+    if (!a_opt) {
 	    for (mp = Aio_Strat_Map; mp->m_string != NULL; mp++) {
 		    Aio_Strat_List[Naio_Strat_Types++] = mp;
 	    }
@@ -1665,7 +1665,7 @@
      * Supply default syscalls.  Default is read,write,reada,writea,listio.
      */
 
-    if (! s_opt) {
+    if (!s_opt) {
 	Nsyscalls = 0;
 	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "read");
 	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "write");
@@ -1704,7 +1704,7 @@
      * Supply default file io flags - defaut is 'buffered,raw,sync,ldraw'.
      */
 
-    if (! f_opt && Fileio) {
+    if (!f_opt && Fileio) {
 	    Nflags = 0;
 	    Flag_List[Nflags++] = str_lookup(Flag_Map, "buffered");
 	    Flag_List[Nflags++] = str_lookup(Flag_Map, "sync");
diff --git a/testcases/kernel/fs/fs_perms/fs_perms.c b/testcases/kernel/fs/fs_perms/fs_perms.c
index 9fbe9ec..984c352 100644
--- a/testcases/kernel/fs/fs_perms/fs_perms.c
+++ b/testcases/kernel/fs/fs_perms/fs_perms.c
@@ -169,7 +169,7 @@
 	long i = strtol(str, &end, 10);
 
 	if (*end != '\0')
-		tst_brkm(TBROK, tst_exit, "Invalid parameter '%s' passed. (%s)",
+		tst_brkm(TBROK, NULL, "Invalid parameter '%s' passed. (%s)",
 		         name, str);
 
 	return i;
diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c
index 0c587f0..194f2fb 100644
--- a/testcases/kernel/fs/fsstress/fsstress.c
+++ b/testcases/kernel/fs/fsstress/fsstress.c
@@ -530,7 +530,7 @@
 		fprintf(stderr, "fsstress: append_pathname failure\n");
 		chdir(homedir);
 		abort();
-		/* NOTREACHED */
+		
 	}
 #endif
 	name->path = realloc(name->path, name->len + 1 + len);
@@ -612,7 +612,7 @@
 	chdir(homedir);
 	fprintf(stderr, "fsstress: check_cwd failure\n");
 	abort();
-	/* NOTREACHED */
+	
 #endif
 }
 
@@ -873,7 +873,7 @@
 	abort();
 #endif
 	return -1;
-	/* NOTREACHED */
+	
 }
 
 void
diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
index 7397df3..143d5b2 100644
--- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
+++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
@@ -1303,7 +1303,7 @@
 
 		default:
 			usage();
-			/* NOTREACHED */
+			
 		}
 	argc -= optind;
 	argv += optind;
diff --git a/testcases/kernel/fs/inode/inode02.c b/testcases/kernel/fs/inode/inode02.c
index ca36c4a..d3cf895 100644
--- a/testcases/kernel/fs/inode/inode02.c
+++ b/testcases/kernel/fs/inode/inode02.c
@@ -809,9 +809,9 @@
 int massmurder()
 {
 	int i;
-	for ( i=0 ; i < MAXCHILD ; i++ )
+	for (i=0 ; i < MAXCHILD ; i++)
 	{
-		if ( allchild[i] )
+		if (allchild[i])
 		{
 			kill(allchild[i], SIGTERM);
 		}
diff --git a/testcases/kernel/fs/mongo/mongo_compare.c b/testcases/kernel/fs/mongo/mongo_compare.c
index da72d38..36902af 100644
--- a/testcases/kernel/fs/mongo/mongo_compare.c
+++ b/testcases/kernel/fs/mongo/mongo_compare.c
@@ -59,7 +59,7 @@
     char   html_line[500];
     int	   i, k;
    
-    if ( argc < 3) {
+    if (argc < 3) {
       printf("\nUsage: mongo_compare file1 file2 res_file\n\n");
       printf("\t<file1> should contain reiserfs or ext2 results of mogo benchmark\n");
       printf("\t<file2> should contain reiserfs or ext2 results of mogo benchmark\n");
@@ -75,29 +75,29 @@
     strcpy(out2,argv[3]);
     strcat(out2,".html");
 
-    if ( (f1=fopen(argv[1],"r")) == NULL) {
+    if ((f1 = fopen(argv[1], "r")) == NULL) {
 	fprintf(stderr, "%s: can't open %s\n", argv[0], argv[1] );
     	return 1;
     }
 
-    if ( (f2=fopen(argv[2],"r")) == NULL) {
+    if ((f2 = fopen(argv[2], "r")) == NULL) {
 	fprintf(stderr, "%s: can't open %s\n", argv[0], argv[2] );
     	return 1;
     }
 
-    if ( (f3=fopen(out1,"wr")) == NULL) {
+    if ((f3 = fopen(out1,"wr")) == NULL) {
 	fprintf(stderr, "%s: can't open %s\n", argv[0], out1 );
     	return 1;
     }
 
-    if ( (f4=fopen(out2,"wr")) == NULL) {
+    if ((f4 = fopen(out2,"wr")) == NULL) {
 	fprintf(stderr, "%s: can't open %s\n", argv[0], out2 );
     	return 1;
     }
 
     write_html_head(f4);
     i=0;
-    while ( fgets(line1, 100, f1) ) {
+    while (fgets(line1, 100, f1)) {
 	   fgets(line2, 100, f2);
 
 	 if (p=strstr(line1,"\n")) *(p+1)=0;
@@ -132,7 +132,7 @@
 	     else {
 	         k=0; p=line3;
 	         while (*p++ != 0) {
-	             if ( (*p != ' ') && (*p != '\n') ) k++;
+	             if (*p != ' ' && *p != '\n') k++;
 	         }
 	         if (k > 0) {
 	             fprintf(f4, "<tt>%s</tt><br>\n", line3);
diff --git a/testcases/kernel/fs/stream/stream01.c b/testcases/kernel/fs/stream/stream01.c
index f509c45..1887514 100644
--- a/testcases/kernel/fs/stream/stream01.c
+++ b/testcases/kernel/fs/stream/stream01.c
@@ -42,6 +42,7 @@
 #define PASSED 1
 #define FAILED 0
 
+/* XXX: add setup and cleanup. */
 
 char progname[] = "stream01()" ;
 char tempfile1[40]="";
@@ -59,11 +60,8 @@
          /*
           * parse standard options
           */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-                        tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-                 tst_exit();
-                 /*NOTREACHED*/
-         }
+        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
         local_flag = PASSED;
 	tst_tmpdir();
@@ -79,16 +77,14 @@
 		}
 		fwrite("a",1,1,stream);
 		if ((stream=freopen(tempfile2,"a+",stream)) == NULL) {
-			tst_resm(TFAIL,"freopen(%s) a+ failed: %s", tempfile2, strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL|TERRNO, NULL, "freopen(%s) a+ failed", tempfile2);
 		}
 		fwrite("a",1,1,stream);
 		fclose(stream);
 
 		/* now check that a single "a" is in each file */
 		if ((stream=fopen(tempfile1,"r")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) r failed: %s", tempfile1, strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL|TERRNO, NULL, "fopen(%s) r failed", tempfile1);
 		}
 		else {
 			for (i=0; i<10; i++) buf[i]=0;
@@ -100,8 +96,7 @@
 			fclose(stream);
 		}
 		if ((stream=fopen(tempfile2,"r")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) r failed: %s", tempfile2, strerror(errno));
-			tst_exit();
+			tst_brkm(TFAIL|TERRNO, NULL, "fopen(%s) r failed", tempfile2);
 		}
 		else {
 			for (i=0; i<10; i++) buf[i]=0;
@@ -112,13 +107,13 @@
 			}
 			fclose(stream);
 		}
-		 if (local_flag == PASSED) {
+		if (local_flag == PASSED) {
 			tst_resm(TPASS, "Test passed.");
-		 } else {
+		} else {
 			tst_resm(TFAIL, "Test failed.");
-		 }
+		}
 
-		 local_flag = PASSED;
+		local_flag = PASSED;
 
 	/*--------------------------------------------------------------------*/
 		unlink(tempfile1);
@@ -127,5 +122,4 @@
 	} /* end for */
 	tst_rmdir();
 	tst_exit();
-	return 0;
 }
diff --git a/testcases/kernel/fs/stream/stream02.c b/testcases/kernel/fs/stream/stream02.c
index 9a29e5f..1013472 100644
--- a/testcases/kernel/fs/stream/stream02.c
+++ b/testcases/kernel/fs/stream/stream02.c
@@ -47,6 +47,8 @@
 char progname[] = "stream02()" ;
 char tempfile1[40]="";
 
+/* XXX: add cleanup + setup. */
+
 /*--------------------------------------------------------------------*/
 int main(int ac, char *av[])
 {
@@ -58,11 +60,8 @@
          /*
           * parse standard options
           */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-                         tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-                 tst_exit();
-                 /*NOTREACHED*/
-         }
+        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
         local_flag = PASSED;
 	tst_tmpdir();
@@ -99,11 +98,11 @@
 
 	/*--------------------------------------------------------------------*/
 	block1 :
-		if (( fd = open("/dev/tty",O_WRONLY)) >= 0 )
+		if ((fd = open("/dev/tty", O_WRONLY)) >= 0)
 		{
 			close(fd);
 			if (( stream = fopen("/dev/tty","w"))==NULL) {
-				tst_resm(TFAIL,"fopen(/dev/tty) write failed: %s", strerror(errno));
+				tst_resm(TFAIL|TERRNO,"fopen(/dev/tty) write failed");
 				local_flag = FAILED;
 			} else {
 				fclose(stream);
@@ -119,5 +118,4 @@
 	} /* end for */
 	tst_rmdir();
 	tst_exit();
-        return 0;
 }
diff --git a/testcases/kernel/fs/stream/stream04.c b/testcases/kernel/fs/stream/stream04.c
index d71a1a8..3ee654b 100644
--- a/testcases/kernel/fs/stream/stream04.c
+++ b/testcases/kernel/fs/stream/stream04.c
@@ -51,6 +51,8 @@
 char tempfile1[40]="";
 long ftell();
 
+/* XXX: add setup and cleanup */
+
 /*--------------------------------------------------------------------*/
 int main(int ac, char *av[])
 {
@@ -65,11 +67,8 @@
          /*
           * parse standard options
           */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-                         tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-                 tst_exit();
-                 /*NOTREACHED*/
-         }
+        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+                 tst_resm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	tst_tmpdir();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
@@ -79,7 +78,7 @@
 	/*--------------------------------------------------------------------*/
 	//block0:
 		if ((stream=fopen(tempfile1,"a+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) a+ failed: %s", tempfile1, strerror(errno));
+			tst_resm(TFAIL|TERRNO,"fopen(%s) a+ failed: %s", tempfile1);
 			tst_rmdir();
 			tst_exit();
 		}
diff --git a/testcases/kernel/fs/stream/stream05.c b/testcases/kernel/fs/stream/stream05.c
index d19d88e..ca4814e 100644
--- a/testcases/kernel/fs/stream/stream05.c
+++ b/testcases/kernel/fs/stream/stream05.c
@@ -66,11 +66,8 @@
          /*
           * parse standard options
           */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-                         tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-                 tst_exit();
-                 /*NOTREACHED*/
-        }
+        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+                 tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	tst_tmpdir();
         local_flag = PASSED;
 
@@ -220,6 +217,6 @@
 	} /* end for */
 	tst_rmdir();
 	tst_exit();
-	/* NOTREACHED */
+	
 	return 0;
 }
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index e540e1c..1b03cdd 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -271,7 +271,11 @@
 	pol = args;
 	args += strcspn(args, " 	+");
 
+<<<<<<< HEAD
+	for (polp = policies; polp->pol_name != NULL; ++polp) {
+=======
 	for ( polp = policies; polp->pol_name != NULL; ++polp) {
+>>>>>>> master
 		size_t plen = args - pol;
 
 		if (strncmp(pol, polp->pol_name, plen))
@@ -1200,7 +1204,11 @@
 		cmdlen = 0;
 	}
 
+<<<<<<< HEAD
+	for (cmdp = cmd_table; cmdp->cmd_name != NULL; ++cmdp) {
+=======
 	for ( cmdp = cmd_table; cmdp->cmd_name != NULL; ++cmdp) {
+>>>>>>> master
 		if (cmd == NULL ||
 				!strncmp(cmd, cmdp->cmd_name, cmdlen)) {
 			printf("%s\n", cmdp->cmd_help);
@@ -1243,7 +1251,11 @@
 
 	cmd = strtok_r(cmdline, whitespace, &args);
 
+<<<<<<< HEAD
+	for (cmdp = cmd_table; cmdp->cmd_name != NULL; ++cmdp) {
+=======
 	for ( cmdp = cmd_table; cmdp->cmd_name != NULL; ++cmdp) {
+>>>>>>> master
 		size_t clen = strlen(cmd);
 		int ret;
 
diff --git a/testcases/kernel/hotplug/memory_hotplug/memtoy.c b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
index 16f9454..de27f1b 100644
--- a/testcases/kernel/hotplug/memory_hotplug/memtoy.c
+++ b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
@@ -435,7 +435,7 @@
 		case 'h':
 		case 'x':
 			usage(NULL);
-			/*NOTREACHED*/
+			
 			break;
 
 		case 'V':
@@ -490,7 +490,7 @@
 
 	if (error /* || argc==1 */) {
 		usage(NULL);
-		/*NOTREACHED*/
+		
 	}
 
 	/*
diff --git a/testcases/kernel/io/aio/aio02/main.c b/testcases/kernel/io/aio/aio02/main.c
index 80d375b..e869835 100644
--- a/testcases/kernel/io/aio/aio02/main.c
+++ b/testcases/kernel/io/aio/aio02/main.c
@@ -29,8 +29,8 @@
 #else
 int main(void)
 {
-	tst_brkm(TCONF, tst_exit, "libaio missing");
-	/* NOTREACHED */
+	tst_brkm(TCONF, NULL, "libaio missing");
+	
 	return 0;
 }
 #endif
diff --git a/testcases/kernel/io/direct_io/diotest_routines.c b/testcases/kernel/io/direct_io/diotest_routines.c
index 4ac052e..5e17045 100644
--- a/testcases/kernel/io/direct_io/diotest_routines.c
+++ b/testcases/kernel/io/direct_io/diotest_routines.c
@@ -190,7 +190,11 @@
 			killchldrn(pidlst, i, SIGTERM);
 			return(-1);
 		}
+<<<<<<< HEAD
+		if (cpid == 0 ) exit((*chldfunc)(i, action));
+=======
 		if ( cpid == 0 ) exit((*chldfunc)(i, action));
+>>>>>>> master
 		else *(*pidlst+i) = cpid;
 	}
 	return 0;
diff --git a/testcases/kernel/io/disktest/parse.c b/testcases/kernel/io/disktest/parse.c
index 0aba860..45aee6c 100644
--- a/testcases/kernel/io/disktest/parse.c
+++ b/testcases/kernel/io/disktest/parse.c
@@ -730,7 +730,11 @@
 		/* use stat to get file properties, and use to set -I */
 		rv = stat(args->device, &stat_buf);
 		if (0 == rv) {
+<<<<<<< HEAD
+			if (IS_FILE(stat_buf.st_mode)) {
+=======
 			if (IS_FILE(stat_buf.st_mode) ) {
+>>>>>>> master
 				strncat(args->argstr, "(-I f) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
 				args->flags |= CLD_FLG_FILE;
 			} else if (IS_BLK(stat_buf.st_mode)) {
@@ -949,7 +953,11 @@
 	rv = stat(args->device, &stat_buf);
 	if (0 == rv) { /* no error on call to stat, compare against -I option */
 		/* files are usually file type */
+<<<<<<< HEAD
+		if ((args->flags & CLD_FLG_FILE) && !IS_FILE(stat_buf.st_mode)) {
+=======
 		if ((args->flags & CLD_FLG_FILE) && !IS_FILE(stat_buf.st_mode) ) {
+>>>>>>> master
 			pMsg(ERR, args, "Can't open non-file filespec with file device type, -If.\n");
 			return(-1);
 		}
diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c b/testcases/kernel/io/ltp-aiodio/aio-stress.c
index 90d0d88..d48612a 100644
--- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
+++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
@@ -704,7 +704,11 @@
     if ((oper->started_ios + num_ios) > oper->total_ios)
         num_ios = oper->total_ios - oper->started_ios;  
 
+<<<<<<< HEAD
+    for (i = 0 ; i < num_ios ; i++) {
+=======
     for ( i = 0 ; i < num_ios ; i++) {
+>>>>>>> master
 	io = build_iocb(t, oper);
 	if (!io) {
 	    return -1;   
diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_append.c b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
index 4af6e09..969e2f3 100644
--- a/testcases/kernel/io/ltp-aiodio/aiodio_append.c
+++ b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
@@ -143,7 +143,11 @@
                 if (n > 0) {
 		  iocbp = (struct iocb *)event.obj;
 
+<<<<<<< HEAD
+		if (n > 0) {
+=======
 		if ( n > 0) {
+>>>>>>> master
 		io_prep_pwrite(iocbp, fd, iocbp->u.c.buf, AIO_SIZE, offset);
 		offset += AIO_SIZE;
 		if ((w = io_submit(myctx, 1, &iocbp)) < 0) {
diff --git a/testcases/kernel/io/writetest/writetest.c b/testcases/kernel/io/writetest/writetest.c
index c6f37ee..36db58b 100644
--- a/testcases/kernel/io/writetest/writetest.c
+++ b/testcases/kernel/io/writetest/writetest.c
@@ -60,7 +60,11 @@
 void buf_init(void )
 {
     static int seed = 0;
+<<<<<<< HEAD
+    if (seed == 0)
+=======
     if ( seed == 0 )
+>>>>>>> master
         seed = DefaultSeed;
     srand(seed);
 }
@@ -82,7 +86,11 @@
     uint8_t buf[BLOCKSIZE];
 
     fd = open(filename, O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, FILE_MODE);
+<<<<<<< HEAD
+    if (fd < 0) {
+=======
     if ( fd < 0 ) {
+>>>>>>> master
         perror(TCID);
         return(-1);
     }
@@ -92,7 +100,11 @@
 			tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
         buf_fill(buf);
         rv = write(fd, buf, BLOCKSIZE);
+<<<<<<< HEAD
+        if (rv != BLOCKSIZE) {
+=======
         if ( rv != BLOCKSIZE ) {
+>>>>>>> master
             ret = -1;
             break;
         }
@@ -112,7 +124,11 @@
     char buf_read[BLOCKSIZE];
 
     fd = open(filename, O_RDONLY);
+<<<<<<< HEAD
+    if (fd < 0) {
+=======
     if ( fd < 0 ) {
+>>>>>>> master
         perror(TCID);
         return(-1);
     }
@@ -123,7 +139,11 @@
         	tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
         buf_fill(buf_actual);
         rv = read(fd, buf_read, BLOCKSIZE);
+<<<<<<< HEAD
+        if (rv != BLOCKSIZE) {
+=======
         if ( rv != BLOCKSIZE ) {
+>>>>>>> master
             ret = -1;
             break;
         }
@@ -131,7 +151,11 @@
             int ba, br;
             ba = buf_actual[n] & 0xff;
             br = buf_read[n] & 0xff;
+<<<<<<< HEAD
+            if (ba != br) {
+=======
             if ( ba != br ) {
+>>>>>>> master
                 if (Verbosity > 2)
                 	tst_resm(TINFO, "Mismatch: block=%lld +%d bytes offset=%lld read: %02xh actual: %02xh\n",
                     (long long int)block, n, (long long int)((block*BLOCKSIZE)+n), br, ba);
@@ -173,7 +197,11 @@
             { 0, 0, 0, 0 }
         };
         c = getopt_long(argc, argv, "hvb:o:s:", long_options, &option_index);
+<<<<<<< HEAD
+        if (c == -1)
+=======
         if ( c == -1 )
+>>>>>>> master
             break;
         switch(c) {
             case 'b':
@@ -223,7 +251,11 @@
     tst_resm(TINFO, "Writing %lld blocks of %d bytes to '%s'\n", (long long int)NumBlocks, BLOCKSIZE, Filename);
     buf_init();
     rv = write_file(NumBlocks, Filename);
+<<<<<<< HEAD
+    if (rv == 0) {
+=======
     if ( rv == 0 ) {
+>>>>>>> master
         tst_resm(TPASS, "Write: Success");
     } else {
         tst_resm(TFAIL, "Write: Failure");
@@ -232,7 +264,11 @@
     tst_resm(TINFO, "Verifying %lld blocks in '%s'\n", (long long int)NumBlocks, Filename);
     buf_init();
     rv = verify_file(NumBlocks, Filename);
+<<<<<<< HEAD
+    if (rv == 0) {
+=======
     if ( rv == 0 ) {
+>>>>>>> master
         tst_resm(TPASS ,"Verify: Success\n");
     } else {
         tst_resm(TFAIL, "Verify: Failure");
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
index bd12f7e..9871f92 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
@@ -309,7 +309,7 @@
 	cleanup(0);
 
 	return 0;
-	/*NOTREACHED*/
+	
 }
 
 static void cleanup (int rc)
diff --git a/testcases/kernel/ipc/pipeio/pipeio.c b/testcases/kernel/ipc/pipeio/pipeio.c
index 70a00c4..18b2fe8 100644
--- a/testcases/kernel/ipc/pipeio/pipeio.c
+++ b/testcases/kernel/ipc/pipeio/pipeio.c
@@ -68,7 +68,7 @@
     tst_resm (TFAIL, "Test failed");
   else
     tst_resm (TPASS, "Test passed");
-  tst_exit();
+ tst_exit();
 }
 
 #if defined(__linux__)
@@ -167,8 +167,13 @@
 	dir[0] = '\0';
 	sprintf(pname,"%s.%d",PPATH,getpid());
 
+<<<<<<< HEAD
+	if ((toutput=getenv("TOUTPUT")) != NULL) {
+	    if (strcmp( toutput, "NOPASS") == 0) {
+=======
 	if ( (toutput=getenv("TOUTPUT")) != NULL ) {
 	    if ( strcmp( toutput, "NOPASS") == 0 ) {
+>>>>>>> master
 		quiet=1;
 	    }
 	}
@@ -282,7 +287,11 @@
 			break;
 
     		case 'I':
+<<<<<<< HEAD
+     			if ((iotype=lio_parse_io_arg1(optarg)) == -1) {
+=======
      			if ((iotype=lio_parse_io_arg1(optarg)) == -1 ) {
+>>>>>>> master
          		    fprintf(stderr,
              			"%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
              			TCID);
@@ -446,14 +455,18 @@
 	writebuf[size-1] = 'A';	/* to detect partial read/write problem */
 
 	if ((sem_id = semget(IPC_PRIVATE, 1, IPC_CREAT|S_IRWXU)) == -1) {
-		tst_brkm(TBROK, tst_exit, "Couldn't allocate semaphore: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "Couldn't allocate semaphore: %s", strerror(errno));
 	}
 
 	if (semctl(sem_id, 0, SETVAL, u) == -1)
-		tst_brkm(TBROK, tst_exit, "Couldn't initialize semaphore value: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "Couldn't initialize semaphore value: %s", strerror(errno));
 
 	if (background) {
+<<<<<<< HEAD
+	    if ((n=fork()) == -1) {
+=======
 	    if ((n=fork() ) == -1) {
+>>>>>>> master
 		tst_resm (TFAIL, "fork() failed: %s", strerror(errno));
 		exit(1);
 	    }
@@ -527,7 +540,7 @@
 				exit(1);
 			}
 			if (ndelay && fcntl(write_fd, F_SETFL, O_NONBLOCK) == -1) {
-				tst_brkm(TBROK, tst_exit, "Failed setting the pipe to nonblocking mode: %s", strerror(errno));
+				tst_brkm(TBROK, NULL, "Failed setting the pipe to nonblocking mode: %s", strerror(errno));
 			}
 		}
 		else {
@@ -541,7 +554,7 @@
 		};
 
 		if (semop(sem_id, &sem_op, 1) == -1)
-			tst_brkm(TBROK, tst_exit, "Couldn't raise the semaphore: %s", strerror(errno));
+			tst_brkm(TBROK, NULL, "Couldn't raise the semaphore: %s", strerror(errno));
 
 
 		pid_word = (int *)&writebuf[0];
@@ -598,7 +611,7 @@
 				exit(1);
 			}
 			if (ndelay && fcntl(read_fd, F_SETFL, O_NONBLOCK) == -1) {
-				tst_brkm(TBROK, tst_exit, "Failed setting the pipe to nonblocking mode: %s", strerror(errno));
+				tst_brkm(TBROK, NULL, "Failed setting the pipe to nonblocking mode: %s", strerror(errno));
 			}
 		}
 		else {
@@ -615,7 +628,7 @@
 			if (errno == EINTR) {
 				continue;
 			}
-			tst_brkm(TBROK, tst_exit, "Couldn't wait on semaphore: %s", strerror(errno));
+			tst_brkm(TBROK, NULL, "Couldn't wait on semaphore: %s", strerror(errno));
 		}
 
 		for (i=num_wrters*num_writes; i > 0 || loop; --i) {
@@ -693,7 +706,11 @@
 			tst_resm (TFAIL, "1 FAIL %d data errors on pipe, read size = %d, %s %s",
 			          error,size,pipe_type,blk_type);
 		else
+<<<<<<< HEAD
+			if (!quiet)
+=======
 			if ( !quiet )
+>>>>>>> master
 				tst_resm (TPASS, "1 PASS %d pipe reads complete, read size = %d, %s %s",
 				          count+1,size,pipe_type,blk_type);
 
diff --git a/testcases/kernel/mem/cpuset/cpuset01.c b/testcases/kernel/mem/cpuset/cpuset01.c
index 966e826..2086b8a 100644
--- a/testcases/kernel/mem/cpuset/cpuset01.c
+++ b/testcases/kernel/mem/cpuset/cpuset01.c
@@ -79,7 +79,7 @@
 
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	testcpuset();
 	cleanup();
@@ -179,7 +179,7 @@
 void setup(void)
 {
 	if (count_numa() == 1)
-		tst_brkm(TCONF, tst_exit, "required a NUMA system.");
+		tst_brkm(TCONF, NULL, "required a NUMA system.");
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
 	if (mkdir(CPATH, 0777) == -1)
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
index 3676f1b..59e60f5 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
@@ -182,7 +182,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 1;
 }	/* End main */
 
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
index 53d219d..f13c9e7 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
@@ -200,7 +200,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 1;
 }	/* End main */
 
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
index a07b9aa..40c21a2 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
@@ -80,7 +80,7 @@
 #if __WORDSIZE==32  /* 32-bit compiled */
       	tst_resm(TCONF,"This test is only for 64bit");
 	tst_exit();
-       	/*NOTREACHED*/
+       	
        	return 1;
 #else	/* 64-bit compiled */
 	int lc;			/* loop counter */
@@ -139,7 +139,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 1;
 #endif
 }	/* End main */
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
index c3b7af2..3c43aed 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
@@ -197,7 +197,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 1;
 }	/* End main */
 
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
index bce9fe6..35c85a3 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
@@ -81,7 +81,6 @@
 #endif
 
 char *TCID = "hugemmap05";
-char *TESTDIR;
 int TST_TOTAL = 1, Tst_count;
 static char nr_hugepages[BUFSIZ], nr_overcommit_hugepages[BUFSIZ];
 static char buf[BUFSIZ], line[BUFSIZ], path[BUFSIZ], pathover[BUFSIZ];
@@ -114,7 +113,7 @@
 
 	msg = parse_opts(argc, argv, options, usage);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	if (opt_sysfs) {
 		strncpy(path, _PATH_SYS_2M_HUGE,
 			strlen(_PATH_SYS_2M_HUGE) + 1);
@@ -155,7 +154,7 @@
 		if (shmid == -1)
 			tst_brkm(TBROK|TERRNO, cleanup, "shmget");
 	} else {
-		snprintf(s, BUFSIZ, "%s/hugemmap05/file", TESTDIR);
+		snprintf(s, BUFSIZ, "%s/hugemmap05/file", get_tmp_tstdir());
 		fd = open(s, O_CREAT | O_RDWR, 0755);
 		if (fd == -1)
 			tst_brkm(TBROK|TERRNO, cleanup, "open");
@@ -279,7 +278,7 @@
 		tst_resm(TWARN|TERRNO, "write");
 	close(fd);
 	
-	snprintf(buf, BUFSIZ, "%s/hugemmap05", TESTDIR);
+	snprintf(buf, BUFSIZ, "%s/hugemmap05", get_tst_tmpdir());
 	if (umount(buf) == -1)
 		tst_resm(TWARN|TERRNO, "umount");
 	if (shmid != -1) {
@@ -363,7 +362,7 @@
 			"failed to change nr_hugepages.");
 	close(fd);
 
-	snprintf(buf, BUFSIZ, "%s/hugemmap05", TESTDIR);
+	snprintf(buf, BUFSIZ, "%s/hugemmap05", get_tst_tmpdir());
 	if (mkdir(buf, 0700) == -1)
 		tst_brkm(TBROK|TERRNO, cleanup, "mkdir");
 	if (mount(NULL, buf, "hugetlbfs", 0, NULL) == -1)
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
index 87cc57e..46914e8 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
@@ -100,12 +100,11 @@
 	void check_functionality(int);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -153,7 +152,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
index a81c743..094415a 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
@@ -97,12 +97,11 @@
 	int i;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -146,7 +145,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
index 30dc704..248ae6d 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
@@ -81,9 +81,8 @@
 	void do_child(void);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
              tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
index b2b4a4d..30aa01c 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
@@ -125,12 +125,11 @@
 	void check_functionality(void);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -199,7 +198,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
index 184a381..6bbc4ce 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
@@ -97,12 +97,11 @@
 	int i;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -143,7 +142,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
index cd09a8c..f498656 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
@@ -100,9 +100,8 @@
 	void do_child(void);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
              tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
diff --git a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
index b6e8bbd..30db201 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
@@ -82,12 +82,11 @@
 	void check_functionality(void);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -129,7 +128,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
index f8f90f5..4b790a7 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
@@ -74,13 +74,12 @@
         unsigned long huge_pages_shm_to_be_allocated;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
 	/* The following loop checks looping state if -i option given */
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
               huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
         
@@ -149,8 +148,8 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
-        return 0;
+	
+      tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
index c119dd8..a297d38 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
@@ -79,12 +79,11 @@
 	int i;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
   
@@ -139,7 +138,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 
 	return 0;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
index 9f24d94..7b26057 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
@@ -79,13 +79,12 @@
         unsigned long huge_pages_shm_to_be_allocated;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
 	/* The following loop checks looping state if -i option given */
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
-             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
+             tst_brkm(TCONF, NULL, "Not enough available Hugepages");
         else             
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
 
@@ -124,7 +123,7 @@
 
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
index 11dcecc..3d598a0 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
@@ -82,9 +82,8 @@
 	void do_child(void);
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
 
         if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
              tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
@@ -107,7 +106,7 @@
 		do_child();
 
 		tst_exit();
-		/*NOTREACHED*/
+		
 	} else {		/* parent */
 		/* wait for the child to return */
 		if (waitpid(pid, &status, 0) == -1) {
@@ -121,7 +120,7 @@
 
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/mem/ksm/ksm01.c b/testcases/kernel/mem/ksm/ksm01.c
index 1143791..6d28488 100644
--- a/testcases/kernel/mem/ksm/ksm01.c
+++ b/testcases/kernel/mem/ksm/ksm01.c
@@ -103,7 +103,7 @@
 
 	msg = parse_opts(argc, argv, options, usage);
 	if (msg != (char *)NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
@@ -121,30 +121,30 @@
 	if (opt_size) {
 		size = atoi(opt_sizestr);
 		if (size < 1)
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				"size cannot be less than 1.");
 	}
 	if (opt_num) {
 		num = atoi(opt_numstr);
 		if (num < 3)
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				"process number cannot be less 3.");
 	}
 	child = malloc(num);
 	if (child == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+		tst_brkm(TBROK|TERRNO, NULL, "malloc");
 
 	memory = malloc(num * sizeof(**memory));
 	if (memory == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+		tst_brkm(TBROK|TERRNO, NULL, "malloc");
 
 	switch (child[0] = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, tst_exit, "fork");
+		tst_brkm(TBROK|TERRNO, NULL, "fork");
 	case 0:
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 
@@ -154,20 +154,20 @@
 			size);
 		memory[0] = malloc(size * sizeof(*memory));
 		if (memory[0] == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+			tst_brkm(TBROK|TERRNO, NULL, "malloc");
 		for (j = 0; j < size; j++) {
 			memory[0][j] = mmap(NULL, MB, PROT_READ|PROT_WRITE,
 					MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
 			if (memory[0][j] == MAP_FAILED)
-				tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
+				tst_brkm(TBROK|TERRNO, NULL, "mmap");
 			if (madvise(memory[0][j], MB, MADV_MERGEABLE) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "madvise");
+				tst_brkm(TBROK|TERRNO, NULL, "madvise");
 			for (i = 0; i < MB; i++)
 				memory[0][j][i] = 'c';
 		}
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 		verify('c', 0, 0, size, 0, MB);
@@ -179,44 +179,44 @@
 		/* Unmerge. */
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 		verify('d', 0, 0, size, 0, MB);
 		/* Stop. */
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 0 continues...");
 		exit(0);
 	}
 	switch (child[1] = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, tst_exit, "fork");
+		tst_brkm(TBROK|TERRNO, NULL, "fork");
 	case 0:
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		tst_resm(TINFO, "child 1 allocates %d MB filled with 'a'.",
 			size);
 		memory[1] = malloc(size * sizeof(*memory));
 		if (memory[1] == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+			tst_brkm(TBROK|TERRNO, NULL, "malloc");
 		for (j = 0; j < size; j++) {
 			memory[1][j] = mmap(NULL, MB, PROT_READ|PROT_WRITE,
 					MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
 			if (memory[1][j] == MAP_FAILED)
-				tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
+				tst_brkm(TBROK|TERRNO, NULL, "mmap");
 			if (madvise(memory[1][j], MB, MADV_MERGEABLE) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "madvise");
+				tst_brkm(TBROK|TERRNO, NULL, "madvise");
 			for (i = 0; i < MB; i++)
 				memory[1][j][i] = 'a';
 		}
 
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		verify('a', 1, 0, size, 0, MB);
 		tst_resm(TINFO, "child 1 changes memory content to 'b'.");
@@ -227,7 +227,7 @@
 
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		verify('b', 1, 0, size, 0, MB);
 		tst_resm(TINFO, "child 1 changes memory content to 'd'");
@@ -236,7 +236,7 @@
 				memory[1][j][i] = 'd';
 		}
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 
 		tst_resm(TINFO, "child 1 continues...");
 		verify('d', 1, 0, size, 0, MB);
@@ -246,7 +246,7 @@
 		/* Unmerge. */
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		verify('e', 1, size - 1, size, MB - 1, MB);
 		verify('d', 1, 0, size - 1, 0, MB - 1);
@@ -254,42 +254,42 @@
 		/* Stop. */
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK|TERRNO, NULL, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		exit(0);
 	}
 	for (k = 2; k < num; k++) {
 		switch (child[k] = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, tst_exit, "fork");
+			tst_brkm(TBROK|TERRNO, NULL, "fork");
 		case 0:
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK|TERRNO, NULL, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			tst_resm(TINFO, "child %d allocates %d "
 				"MB filled with 'a'.", k, size);
 			memory[k] = malloc(size * sizeof(*memory));
 			if (memory[k] == NULL)
-				tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+				tst_brkm(TBROK|TERRNO, NULL, "malloc");
 			for (j = 0; j < size; j++) {
 				memory[k][j] = mmap(NULL, MB,
 						PROT_READ|PROT_WRITE,
 						MAP_ANONYMOUS
 						|MAP_PRIVATE, -1, 0);
 				if (memory[k][j] == MAP_FAILED)
-					tst_brkm(TBROK|TERRNO, tst_exit,
+					tst_brkm(TBROK|TERRNO, NULL,
 						"mmap");
 				if (madvise(memory[k][j], MB,
 						MADV_MERGEABLE) == -1)
-					tst_brkm(TBROK|TERRNO, tst_exit,
+					tst_brkm(TBROK|TERRNO, NULL,
 						"madvise");
 				for (i = 0; i < MB; i++)
 					memory[k][j][i] = 'a';
 			}
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK|TERRNO, NULL, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			tst_resm(TINFO, "child %d changes memory content to "
 				"'d'", k);
@@ -300,13 +300,13 @@
 			/* Unmerge. */
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK|TERRNO, NULL, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 
 			/* Stop. */
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK|TERRNO, NULL, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			exit(0);
 		}
@@ -315,120 +315,120 @@
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, "run");
 	fd = open(buf, O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "open");
+		tst_brkm(TBROK|TERRNO, NULL, "open");
 	if (write(fd, "1", 1) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "write");
+		tst_brkm(TBROK|TERRNO, NULL, "write");
 	close(fd);
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, "pages_to_scan");
 	snprintf(buf2, BUFSIZ, "%d", size * 256 * num);
 	fd = open(buf, O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "open");
+		tst_brkm(TBROK|TERRNO, NULL, "open");
 	if (write(fd, buf2, strlen(buf2)) != strlen(buf2))
-		tst_brkm(TBROK|TERRNO, tst_exit, "write");
+		tst_brkm(TBROK|TERRNO, NULL, "write");
 	close(fd);
 
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, "sleep_millisecs");
 	fd = open(buf, O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "open");
+		tst_brkm(TBROK|TERRNO, NULL, "open");
 	if (write(fd, "0", 1) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "write");
+		tst_brkm(TBROK|TERRNO, NULL, "write");
 	close(fd);
 
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+			tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 		if (!WIFSTOPPED(status))
-			tst_brkm(TBROK, tst_exit, "child %d was not stopped.",
+			tst_brkm(TBROK, NULL, "child %d was not stopped.",
 				k);
 	}
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill child[%d]", k);
+			tst_brkm(TBROK|TERRNO, NULL, "kill child[%d]", k);
 	}
 	group_check(1, 2, size * num * 256 - 2, 0, 0, 0, size * 256 * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+		tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 	if (!WIFSTOPPED(status))
-		tst_brkm(TBROK, tst_exit, "child 1 was not stopped.");
+		tst_brkm(TBROK, NULL, "child 1 was not stopped.");
 
 	/* Child 1 changes all pages to 'b'. */
 	tst_resm(TINFO, "resume child 1.");
 	if (kill(child[1], SIGCONT) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+		tst_brkm(TBROK|TERRNO, NULL, "kill");
 	group_check(1, 3, size * num * 256 - 3, 0, 0, 0, size * 256 * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+		tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 	if (!WIFSTOPPED(status))
-		tst_brkm(TBROK, tst_exit, "child 1 was not stopped.");
+		tst_brkm(TBROK, NULL, "child 1 was not stopped.");
 
 	/* All children change pages to 'd'. */
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill child[%d]", k);
+			tst_brkm(TBROK|TERRNO, NULL, "kill child[%d]", k);
 	}
 	group_check(1, 1, size * num * 256 - 1, 0, 0, 0, size * 256 * num);
 
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+			tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 		if (!WIFSTOPPED(status))
-			tst_brkm(TBROK, tst_exit, "child %d was not stopped.",
+			tst_brkm(TBROK, NULL, "child %d was not stopped.",
 				k);
 	}
 	/* Child 1 changes pages to 'e'. */
 	tst_resm(TINFO, "resume child 1.");
 	if (kill(child[1], SIGCONT) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+		tst_brkm(TBROK|TERRNO, NULL, "kill");
 	group_check(1, 1, size * num * 256 - 2, 0, 1, 0, size * 256 * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+		tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 	if (!WIFSTOPPED(status))
-		tst_brkm(TBROK, tst_exit, "child 1 was not stopped.");
+		tst_brkm(TBROK, NULL, "child 1 was not stopped.");
 
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill child[%d]", k);
+			tst_brkm(TBROK|TERRNO, NULL, "kill child[%d]", k);
 	}
 	tst_resm(TINFO, "KSM unmerging...");
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, "run");
 	fd = open(buf, O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "open");
+		tst_brkm(TBROK|TERRNO, NULL, "open");
 	if (write(fd, "2", 1) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "write");
+		tst_brkm(TBROK|TERRNO, NULL, "write");
 	group_check(2, 0, 0, 0, 0, 0, size * 256 * num);
 
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "waitpid");
+			tst_brkm(TBROK|TERRNO, NULL, "waitpid");
 		if (!WIFSTOPPED(status))
-			tst_brkm(TBROK, tst_exit, "child %d was not stopped.",
+			tst_brkm(TBROK, NULL, "child %d was not stopped.",
 				k);
 	}
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill child[%d]", k);
+			tst_brkm(TBROK|TERRNO, NULL, "kill child[%d]", k);
 	}
 	tst_resm(TINFO, "stop KSM.");
 	if (lseek(fd, 0, SEEK_SET) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "lseek");
+		tst_brkm(TBROK|TERRNO, NULL, "lseek");
 	if (write(fd, "0", 1) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "write");
+		tst_brkm(TBROK|TERRNO, NULL, "write");
 	close(fd);
 	group_check(0, 0, 0, 0, 0, 0, size * 256 * num);
 	while (waitpid(-1, &status, WUNTRACED | WCONTINUED) > 0)
@@ -445,9 +445,9 @@
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, "run");
 	if (stat(buf, &new) == -1) {
 		if (errno == ENOENT)
-			tst_brkm(TCONF, tst_exit, "no KSM.");
+			tst_brkm(TCONF, NULL, "no KSM.");
 		else
-			tst_brkm(TBROK, tst_exit, "stat");
+			tst_brkm(TBROK, NULL, "stat");
 	}
 	/*
 	 * setup a default signal hander and a
@@ -477,9 +477,9 @@
 	snprintf(buf, BUFSIZ, "%s%s", _PATH_KSM, path);
 	fp = fopen(buf, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "fopen");
+		tst_brkm(TBROK|TERRNO, NULL, "fopen");
 	if (fgets(buf, BUFSIZ, fp) == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "fgets");
+		tst_brkm(TBROK|TERRNO, NULL, "fgets");
 	fclose(fp);
 
 	tst_resm(TINFO, "%s is %ld.", path, atol(buf));
@@ -487,9 +487,9 @@
 		snprintf(buf2, BUFSIZ, "%s%s", _PATH_KSM, path2);
 		fp = fopen(buf2, "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "fopen");
+			tst_brkm(TBROK|TERRNO, NULL, "fopen");
 		if (fgets(buf2, BUFSIZ, fp) == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "fgets");
+			tst_brkm(TBROK|TERRNO, NULL, "fgets");
 		fclose(fp);
 
 		tst_resm(TINFO, "%s is %ld.", path2, atol(buf2));
@@ -508,7 +508,7 @@
 
 	s = malloc((end - start) * (end2 - start2));
 	if (s == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+		tst_brkm(TBROK|TERRNO, NULL, "malloc");
 
 	tst_resm(TINFO, "child %d verifies memory content.", proc);
 	memset(s, value, (end - start) * (end2 - start2));
diff --git a/testcases/kernel/mem/mbind/mbind01.c b/testcases/kernel/mem/mbind/mbind01.c
index 5c9c955..6f32529 100644
--- a/testcases/kernel/mem/mbind/mbind01.c
+++ b/testcases/kernel/mem/mbind/mbind01.c
@@ -67,11 +67,11 @@
 	pagesize = getpagesize();
 	msg = parse_opts(argc, argv, options, usage);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	if (opt_node) {
 		node = atoi(optarg);
 		if (node < 1)
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				"Number of NUMA nodes cannot be less that 1.");
 		numa_bitmask_setbit(nmask, node);
 	} else
@@ -82,7 +82,7 @@
 		addr = mmap(NULL, pagesize*3, PROT_READ|PROT_WRITE,
 			MAP_ANON|MAP_PRIVATE, 0, 0);
 		if (addr == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
+			tst_brkm(TBROK|TERRNO, NULL, "mmap");
 
 		tst_resm(TINFO, "pid = %d addr = %p", getpid(), addr);
 		/* make page populate */
@@ -92,19 +92,19 @@
 		err = mbind(addr+pagesize, pagesize, MPOL_BIND, nmask->maskp,
 			nmask->size, MPOL_MF_MOVE_ALL);
 		if (err != 0)
-			tst_brkm(TBROK|TERRNO, tst_exit, "mbind1");
+			tst_brkm(TBROK|TERRNO, NULL, "mbind1");
 
 		/* second mbind */
 		err = mbind(addr, pagesize*3, MPOL_DEFAULT, NULL, 0, 0);
 		if (err != 0)
-			tst_brkm(TBROK|TERRNO, tst_exit, "mbind2");
+			tst_brkm(TBROK|TERRNO, NULL, "mbind2");
 
 		/* /proc/self/maps in the form of
 		   "00400000-00406000 r-xp 00000000". */
 		sprintf(string, "%p", addr);
 		fp = fopen("/proc/self/maps", "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "fopen");
+			tst_brkm(TBROK|TERRNO, NULL, "fopen");
 
 		while (fgets(buf, BUFSIZ, fp) != NULL) {
 			/* Find out the 1st VMAs. */
@@ -124,7 +124,7 @@
 		}
 		fclose(fp);
 		if (munmap(addr, pagesize*3) == -1)
-			tst_brkm(TWARN|TERRNO, tst_exit, "munmap");
+			tst_brkm(TWARN|TERRNO, NULL, "munmap");
 	}
 	return 0;
 }
diff --git a/testcases/kernel/mem/mem/mem01.c b/testcases/kernel/mem/mem/mem01.c
index 4175c08..b80f16e 100644
--- a/testcases/kernel/mem/mem/mem01.c
+++ b/testcases/kernel/mem/mem/mem01.c
@@ -310,7 +310,7 @@
 	/* virtual memory, it's magic :) */
 	bigmalloc = p = (char*)malloc(memsize);
 
-	if ( !p ) {
+	if (!p) {
 	    tst_resm(TFAIL, "malloc - alloc of %dMB failed", memsize/1024/1024);
     	    cleanup();
 	}
diff --git a/testcases/kernel/mem/mmapstress/mmap-corruption01.c b/testcases/kernel/mem/mmapstress/mmap-corruption01.c
index d97b05f..560432d 100644
--- a/testcases/kernel/mem/mmapstress/mmap-corruption01.c
+++ b/testcases/kernel/mem/mmapstress/mmap-corruption01.c
@@ -57,7 +57,6 @@
 
 /* Extern Global Variables */
 extern int  Tst_count;               /* counter for tst_xxx routines.         */
-extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID     = "mmap-corruption01"; /* test program identifier.          */
diff --git a/testcases/kernel/mem/mtest01/mtest01.c b/testcases/kernel/mem/mtest01/mtest01.c
index e4e9a56..eab2bf0 100644
--- a/testcases/kernel/mem/mtest01/mtest01.c
+++ b/testcases/kernel/mem/mtest01/mtest01.c
@@ -157,49 +157,55 @@
     pid_list[i]=pid;
 
 #if defined (_s390_) /* s390's 31bit addressing requires smaller chunks */
-  while ( (pid!=0) && (maxbytes > 500*1024*1024) )
+#define FIVE_HUNDRED_KB	(500*1024*1024)
+#define ONE_MEGABYTE	(1024*1024*1024)
+#define THREE_MEGABYTES	(3*ONE_MEGABYTE)
+  while (pid != 0 && maxbytes > FIVE_HUNDRED_KB)
   {
     i++;
-    maxbytes=maxbytes-(500*1024*1024);
-    pid=fork();
-    if (pid != 0)
+    maxbytes -= FIVE_HUNDRED_KB;
+    pid = fork();
+    if (pid != 0) {
       pid_cntr++;
-      pid_list[i]=pid;
+      pid_list[i] = pid;
+    }
   }
-  if ( maxbytes > 500*1024*1024 )
-    alloc_bytes=500*1024*1024;
+  if (maxbytes > FIVE_HUNDRED_KB)
+    alloc_bytes FIVE_HUNDRED_KB;
   else
-    alloc_bytes=(unsigned long)maxbytes;
+    alloc_bytes = (unsigned long) maxbytes;
 
 #elif __WORDSIZE==32
-  while ( (pid!=0) && (maxbytes > 1024*1024*1024) )
+  while (pid != 0 && maxbytes > ONE_MEGABYTE) 
   {
     i++;
-    maxbytes=maxbytes-(1024*1024*1024);
-    pid=fork();
-    if (pid != 0)
+    maxbytes -= ONE_MEGABYTE;
+    pid = fork();
+    if (pid != 0) {
       pid_cntr++;
       pid_list[i]=pid;
+    }
   }
-  if ( maxbytes > 1024*1024*1024 )
-    alloc_bytes=1024*1024*1024;
+  if (maxbytes > ONE_MEGABYTE)
+    alloc_bytes = ONE_MEGABYTE;
   else
-    alloc_bytes=(unsigned long)maxbytes;
+    alloc_bytes = (unsigned long)maxbytes;
 
 #elif __WORDSIZE==64
-  while ( (pid!=0) && (maxbytes > (unsigned long long)3*1024*1024*1024) )
+  while (pid!=0 && maxbytes > THREE_MEGABYTES)
   {
     i++;
-    maxbytes=maxbytes-(unsigned long long)3*1024*1024*1024;
+    maxbytes -= THREE_MEGABYTES;
     pid=fork();
-    if (pid != 0)
+    if (pid != 0) {
       pid_cntr++;
-      pid_list[i]=pid;
+      pid_list[i] = pid;
+    }
   }
-  if ( maxbytes > (unsigned long long)3*1024*1024*1024 )
-    alloc_bytes=(unsigned long long)3*1024*1024*1024;
+  if (maxbytes > THREE_MEGABYTES)
+    alloc_bytes = THREE_MEGABYTES;
   else
-    alloc_bytes=(unsigned long)maxbytes;
+    alloc_bytes = maxbytes;
 #endif
  
   if (pid == 0)			/** CHILD **/
diff --git a/testcases/kernel/mem/vmtests/data_space.c b/testcases/kernel/mem/vmtests/data_space.c
index 9dd9c67..12b0312 100644
--- a/testcases/kernel/mem/vmtests/data_space.c
+++ b/testcases/kernel/mem/vmtests/data_space.c
@@ -85,6 +85,11 @@
 char	*prog;				/* invoked name */
 int	chld_flag = 0;
 
+void cleanup(void)
+{
+	tst_rmdir();
+}
+
 int usage(prog)
 	char	*prog;
 {
@@ -120,10 +125,9 @@
 			bd_arg(argv[i-1]);
 		if (sscanf(argv[i++], "%d", &iterations) != 1)
 			bd_arg(argv[i-1]);
-		if ( nchild > MAXCHILD )
+		if (nchild > MAXCHILD)
 		{
-			tst_resm(TBROK,"FAILURE, %d children exceeded maximum allowed\n", nchild);
-			tst_exit();
+			tst_brkm(TBROK, NULL, "FAILURE, %d children exceeded maximum allowed", nchild);
 		}
 	} else
 		usage(prog);
@@ -134,26 +138,21 @@
 
 	if (sigset(SIGTERM, (void (*)())term) == SIG_ERR)
 	{
-		tst_resm(TBROK,"first sigset failed");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "first sigset failed");
 	}
 	if (sigset(SIGUSR1, (void (*)())chld) == SIG_ERR)
 	{
-		tst_resm(TBROK,"sigset shichld");
-		tst_exit();
+		tst_brkm(TBROK, NULL, "sigset shichld");
 	}
 
 	runtest();
-	/**NOT REACHED**/
-        return 0;
+	tst_exit();
 }
 
 int bd_arg(str)
 	char *str;
 {
-	tst_resm(TCONF,"Bad argument - %s - could not parse as number.\n", str);
-	tst_exit();
-	return 0;
+	tst_brkm(TCONF, NULL, "Bad argument - %s - could not parse as number.\n", str);
 }
 
 int runtest()
@@ -174,11 +173,7 @@
 		}
 		if (child < 0)
 		{
-			tst_resm(TBROK,"Fork failed (may be OK if under stress)");
-                        tst_resm(TINFO, "System resource may be too low.\n");
-                        tst_resm(TBROK, "Reason: %s\n", strerror(errno));
-                        tst_rmdir();
-                        tst_exit();
+			tst_resm(TBROK|TERRNO, cleanup, "fork failed");
 		}
 		allchild[i]=child;
 		while (!chld_flag)
@@ -216,11 +211,6 @@
         (local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
                 : tst_resm(TPASS, "Test passed");
 	sync();				/* safeness */
-        tst_rmdir();
-        tst_exit();
-
-        /**NOT REACHED**/
-	return 0;
 }
 
 /*
@@ -501,9 +491,9 @@
 int massmurder()
 {
 	int i;
-	for ( i=0 ; i < MAXCHILD ; i++ )
+	for (i = 0 ; i < MAXCHILD ; i++)
 	{
-		if ( allchild[i] )
+		if (allchild[i])
 		{
 			kill(allchild[i], SIGTERM);
 		}
diff --git a/testcases/kernel/module/create_module/create_module01.c b/testcases/kernel/module/create_module/create_module01.c
index 85842c5..ab6a65b 100644
--- a/testcases/kernel/module/create_module/create_module01.c
+++ b/testcases/kernel/module/create_module/create_module01.c
@@ -92,7 +92,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 			(char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -115,7 +115,7 @@
 			tst_resm(TPASS, "create_module() returned 0x%x",
 				TEST_RETURN);
 			if (delete_module(modname) != 0) {
-				tst_brkm(TBROK, tst_exit, "Failed to delete"
+				tst_brkm(TBROK, NULL, "Failed to delete"
 					"loadable module entry for %s",
 					modname);
 			}
@@ -125,7 +125,7 @@
 	/* perform global cleanup and exit */
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 
 }	/* End main */
@@ -137,14 +137,10 @@
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
-	/* Check whether we are root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
-	}
+	tst_require_root(NULL);
 
 	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 				"kernels after 2.5.48");
 
 	/* Pause if that option was specified
@@ -153,8 +149,8 @@
 	TEST_PAUSE;
 
 	/* Initialize unique module name for each child process */
-	if ( sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to initialize module name");
+	if (sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
+		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
 }
 
@@ -188,6 +184,6 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
-	/*NOTREACHED*/
+	
 }
 
diff --git a/testcases/kernel/module/create_module/create_module02.c b/testcases/kernel/module/create_module/create_module02.c
index 09613ab..5d291af 100644
--- a/testcases/kernel/module/create_module/create_module02.c
+++ b/testcases/kernel/module/create_module/create_module02.c
@@ -167,7 +167,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -178,7 +178,7 @@
 		Tst_count = 0;
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			if ( (tdat[testno].setup) && (tdat[testno].setup()) ) {
+			if ((tdat[testno].setup) && (tdat[testno].setup())) {
 				/* setup() failed, skip this test */
 				continue;
 			}
@@ -204,9 +204,7 @@
 		}
 	}
 	cleanup();
-
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 int
@@ -226,7 +224,7 @@
 {
 	 /* Change effective user id to root */
          if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "seteuid failed to set the effective"
+		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
 			" uid to root");
          }
 }
@@ -248,7 +246,7 @@
 {
 	 /* Remove loadable module entry */
 	if (delete_module(modname) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to delete module entry"
+		tst_brkm(TBROK, NULL, "Failed to delete module entry"
 			" for %s", modname);
 	}
 }
@@ -263,21 +261,16 @@
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
-	/* Check whether it is root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
-	}
+	tst_require_root(NULL);
 
 	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 				"kernels after 2.5.48");
 
         /* Check for nobody_uid user id */
-	 if ( (ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Required user %s doesn't exists",
+	 if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
+		tst_brkm(TBROK, NULL, "Required user %s doesn't exists",
 				nobody_uid);
-		/*NOTREACHED*/
 	 }
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
@@ -292,8 +285,8 @@
 	TEST_PAUSE;
 
 	/* Get unique module name for each child process */
-	if ( sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to initialize module name");
+	if (sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
+		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
 }
 
@@ -310,8 +303,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
diff --git a/testcases/kernel/module/delete_module/delete_module01.c b/testcases/kernel/module/delete_module/delete_module01.c
index fc190be..9e1856f 100644
--- a/testcases/kernel/module/delete_module/delete_module01.c
+++ b/testcases/kernel/module/delete_module/delete_module01.c
@@ -91,7 +91,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 		(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -135,7 +135,7 @@
 	/* perform global cleanup and exit */
 EXIT:
 	cleanup();
-	/*NOTREACHED*/
+	
 	return 0;
 
 }		/* End main */
@@ -149,13 +149,13 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+		
 	}
 
 	/*
 	 * if (tst_kvercmp(2,5,48) >= 0)
-	 * tst_brkm(TCONF, tst_exit, "This test will not work on "
+	 * tst_brkm(TCONF, NULL, "This test will not work on "
 	 *				"kernels after 2.5.48");
 	 */
 	/* Pause if that option was specified
@@ -181,5 +181,5 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
-	/*NOTREACHED*/
+	
 }
diff --git a/testcases/kernel/module/delete_module/delete_module02.c b/testcases/kernel/module/delete_module/delete_module02.c
index fef84a6..b5e7edf 100644
--- a/testcases/kernel/module/delete_module/delete_module02.c
+++ b/testcases/kernel/module/delete_module/delete_module02.c
@@ -156,10 +156,8 @@
 	char *msg; 		 /* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	     (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -169,7 +167,7 @@
 		Tst_count = 0;
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			if ( (tdat[testno].setup) && (tdat[testno].setup()) ) {
+			if ((tdat[testno].setup) && (tdat[testno].setup())) {
 		 		/* setup() failed, skip this test */
 		 		continue;
 		 	}
@@ -198,9 +196,7 @@
 		}
 	}
 	cleanup();
-
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 int
@@ -220,7 +216,7 @@
 {
 	/* Change effective user id to root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "seteuid failed to set the effective"
+		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
 					  " uid to root");
 	}
 }
@@ -238,20 +234,19 @@
 
 	/* Check whether it is root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+		
 	}
 
 	/*if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 					  "kernels after 2.5.48");
 	 */
 
 	/* Check for nobody_uid user id */
-	if ( (ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Required user %s doesn't exists",
+	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
+		tst_brkm(TBROK, NULL, "Required user %s doesn't exists",
 			 nobody_uid);
-		/*NOTREACHED*/
 	}
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
@@ -266,8 +261,8 @@
 	TEST_PAUSE;
 
 	/* Get unique module name for each child process */
-	if ( sprintf(modname, "%s_%d", BASEMODNAME, getpid()) <= 0) {
-		tst_brkm(TBROK, tst_exit, "Failed to initialize module name");
+	if (sprintf(modname, "%s_%d", BASEMODNAME, getpid()) <= 0) {
+		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
         bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
         if (bad_addr == MAP_FAILED) {
@@ -290,8 +285,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
diff --git a/testcases/kernel/module/delete_module/delete_module03.c b/testcases/kernel/module/delete_module/delete_module03.c
index 31e00d6..45b57e8 100644
--- a/testcases/kernel/module/delete_module/delete_module03.c
+++ b/testcases/kernel/module/delete_module/delete_module03.c
@@ -99,7 +99,7 @@
 static int exp_enos[] = {EWOULDBLOCK, 0};
 int TST_TOTAL = 1;
 
-static int setup(void);
+static void setup(void);
 static void cleanup(void);
 
 int
@@ -110,10 +110,8 @@
 	char cmd[50];
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t*) NULL, NULL)) !=
-	    (char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	if (STD_COPIES != 1) {
 		tst_resm(TINFO, "-c option has no effect for this testcase - "
@@ -123,31 +121,28 @@
 	}
 
 	/* Load first kernel module */
-	if ( sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
+	if (sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
 		DUMMY_MOD) <= 0) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
-	if ( (system(cmd)) != 0 ) {
+	if ((system(cmd)) != 0) {
 		tst_resm(TBROK, "Failed to load %s module", DUMMY_MOD);
 		return 1;
 	}
 
 	/* Load dependant kernel module */
-        if ( sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
+        if (sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
 		DUMMY_MOD_DEP) <= 0) {
 		tst_resm(TBROK, "sprintf failed");
 		goto END;
 	}
-        if ( (system(cmd)) != 0 ) {
+        if ((system(cmd)) != 0) {
 		tst_resm(TBROK, "Failed to load %s module", DUMMY_MOD_DEP);
 		goto END;
         }
 
-	tst_tmpdir();
-	if (setup() != 0) {
-		return 1;
-	}
+	setup();
 
 	/* check looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -176,31 +171,22 @@
 		return 1;
 	}
 
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 /*
  * setup()
  *	performs all ONE TIME setup for this test
  */
-int
+void
 setup(void)
 {
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	/* Check whether it is root  */
-	if (geteuid() != 0) {
-		tst_resm(TBROK, "Must be root for this test!");
-		return 1;
-	}
+	tst_require_root(NULL);
 
-	/*
-	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
-					  "kernels after 2.5.48");
-	*/
+	tst_tmpdir();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -209,8 +195,6 @@
 	 * TEST_PAUSE contains the code to fork the test with the -c option.
 	 */
 	TEST_PAUSE;
-	return 0;
-
 }
 
 /*
@@ -236,7 +220,4 @@
 	 */
 	TEST_CLEANUP;
 	tst_rmdir();
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
diff --git a/testcases/kernel/module/query_module/query_module01.c b/testcases/kernel/module/query_module/query_module01.c
index 5497535..0eac89f 100644
--- a/testcases/kernel/module/query_module/query_module01.c
+++ b/testcases/kernel/module/query_module/query_module01.c
@@ -164,7 +164,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (STD_COPIES != 1) {
@@ -183,7 +183,7 @@
 		Tst_count = 0;
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			if ( (tdat[testno].setup) && (tdat[testno].setup()) ) {
+			if ((tdat[testno].setup) && (tdat[testno].setup())) {
 				/* setup() failed, skip this test */
 				continue;
 			}
@@ -210,9 +210,7 @@
 		}
 	}
 	cleanup();
-
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 int
@@ -264,7 +262,7 @@
 			 * Find entry for atleast one symbol, checking for
 			 * EXP_FUNC_NAME symbol, if found return SUCCESS.
 			 */
-			for ( i = 0; i < ret; i++, vals +=2) {
+			for (i = 0; i < ret; i++, vals += 2) {
 
 				/* buf + vals[1] - address of symbol name */
 				if (!strcmp(buf + vals[1], EXP_FUNC_NAME)) {
@@ -296,23 +294,23 @@
 {
 	char cmd[80];
 
-	if ( sprintf(cmd, "cp `which %s.o` ./", mod) == -1) {
+	if (sprintf(cmd, "cp `which %s.o` ./", mod) == -1) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
-	if (system(cmd) != 0 ) {
+	if (system(cmd) != 0) {
 		tst_resm(TBROK, "Failed to copy %s module", mod);
 		return 1;
 	}
 
         /* Should use force to ignore kernel version & insure loading  */
         /* -RW                                                         */
-	/* if ( sprintf(cmd, "insmod %s.o", mod) == -1) {               */
-	if ( sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", mod) == -1) {
+	/* if (sprintf(cmd, "insmod %s.o", mod) == -1) {               */
+	if (sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", mod) == -1) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
-	if (system(cmd) != 0 ) {
+	if (system(cmd) != 0) {
 		tst_resm(TBROK, "Failed to load %s module", mod);
 		return 1;
 	}
@@ -379,14 +377,10 @@
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	/* Check whether we are root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
-	}
+	tst_require_root(NULL);
 
 	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 				"kernels after 2.5.48");
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
@@ -413,7 +407,4 @@
 
 	TEST_CLEANUP;
 	tst_rmdir();
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
diff --git a/testcases/kernel/module/query_module/query_module02.c b/testcases/kernel/module/query_module/query_module02.c
index 509438d..0b24452 100644
--- a/testcases/kernel/module/query_module/query_module02.c
+++ b/testcases/kernel/module/query_module/query_module02.c
@@ -144,7 +144,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -175,7 +175,7 @@
 	}
 	cleanup();
 
-	/*NOTREACHED*/
+	
 	return 0;
 }
 
@@ -191,7 +191,7 @@
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 				"kernels after 2.5.48");
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
@@ -222,5 +222,5 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
-	/*NOTREACHED*/
+	
 }
diff --git a/testcases/kernel/module/query_module/query_module03.c b/testcases/kernel/module/query_module/query_module03.c
index 028292b..e5af9ae 100644
--- a/testcases/kernel/module/query_module/query_module03.c
+++ b/testcases/kernel/module/query_module/query_module03.c
@@ -157,7 +157,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
 	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (STD_COPIES != 1) {
@@ -177,7 +177,7 @@
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			if ( (tdat[testno].setup) && (tdat[testno].setup()) ) {
+			if ((tdat[testno].setup) && (tdat[testno].setup())) {
 				/* setup() failed, skip this test */
 				continue;
 			}
@@ -202,9 +202,7 @@
 		}
 	}
 	cleanup();
-
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 int
@@ -212,23 +210,23 @@
 {
 	char cmd[80];
 
-        if ( sprintf(cmd, "cp `which %s.o` ./", DUMMY_MOD) == -1) {
+        if (sprintf(cmd, "cp `which %s.o` ./", DUMMY_MOD) == -1) {
                 tst_resm(TBROK, "sprintf failed");
                 return 1;
         }
-        if (system(cmd) != 0 ) {
+        if (system(cmd) != 0) {
                 tst_resm(TBROK, "Failed to copy %s module", DUMMY_MOD);
                 return 1;
         }
 
 	/* Should use force to ignore kernel version & insure loading  */
         /* -RW                                                         */
-        /* if ( sprintf(cmd, "insmod %s.o", DUMMY_MOD) == -1) {         */
-	if ( sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", DUMMY_MOD) == -1) {
+        /* if (sprintf(cmd, "insmod %s.o", DUMMY_MOD) == -1) {         */
+	if (sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", DUMMY_MOD) == -1) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
-	if (system(cmd) != 0 ) {
+	if (system(cmd) != 0) {
 		tst_resm(TBROK, "Failed to load %s module", DUMMY_MOD);
 		return 1;
 	}
@@ -257,14 +255,10 @@
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	/* Check whether we are root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-		/*NOTREACHED*/
-	}
+	tst_require_root(NULL);
 
 	if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, tst_exit, "This test will not work on "
+		tst_brkm(TCONF, NULL, "This test will not work on "
 				"kernels after 2.5.48");
 
 	/* set the expected errnos... */
@@ -298,7 +292,4 @@
 	 */
 	TEST_CLEANUP;
 	tst_rmdir();
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
diff --git a/testcases/kernel/numa/support_numa.c b/testcases/kernel/numa/support_numa.c
index d5787fa..dd49626 100644
--- a/testcases/kernel/numa/support_numa.c
+++ b/testcases/kernel/numa/support_numa.c
@@ -107,7 +107,11 @@
                 sa.sa_handler = sigfunc;
                 sa.sa_flags = SA_RESTART;
                 sigemptyset(&sa.sa_mask);
+<<<<<<< HEAD
+                if (sigaction(SIGINT, &sa, 0) < 0)
+=======
                 if ( sigaction(SIGINT, &sa, 0) < 0 )
+>>>>>>> master
 		{
 			tst_brkm(TBROK, NULL, "#Sigaction SIGINT failed\n");
 			tst_exit();
diff --git a/testcases/kernel/pty/hangup01.c b/testcases/kernel/pty/hangup01.c
index dd38f6c..f6c0c67 100644
--- a/testcases/kernel/pty/hangup01.c
+++ b/testcases/kernel/pty/hangup01.c
@@ -145,7 +145,7 @@
 			default:
 				tst_brkm(TFAIL, cleanup,
 					"unexpected data message");
-				/*NOTREACHED*/
+				
 			}
 		}
 	}
@@ -250,6 +250,6 @@
 	}
 /*--------------------------------------------------------------------*/
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
diff --git a/testcases/kernel/pty/ptem01.c b/testcases/kernel/pty/ptem01.c
index 1b7be1a..cee1049 100644
--- a/testcases/kernel/pty/ptem01.c
+++ b/testcases/kernel/pty/ptem01.c
@@ -532,6 +532,6 @@
  	 * all done
 	 */
 	tst_exit();
-	/*NOTREACHED*/
+	
 	return 0;
 }
diff --git a/testcases/kernel/sched/process_stress/process.c b/testcases/kernel/sched/process_stress/process.c
index 1855b74..bab2ae6 100644
--- a/testcases/kernel/sched/process_stress/process.c
+++ b/testcases/kernel/sched/process_stress/process.c
@@ -1015,7 +1015,7 @@
 	 *  Infinite loop used to receive error messages from children and
 	 *  to terminate process tree.
 	 */
-	while ( TRUE ) {
+	while (TRUE) {
 		rc = msgrcv(msgerr, &rcvbuf, sizeof(struct messagebuf), 0, 0);
 		if (rc == -1) {
 			switch (errno) {
@@ -1217,5 +1217,5 @@
 	doit(); 		/* spawn off processes */
 	prtln();
 	return 0;
-	/* NOTREACHED */
+	
 }
diff --git a/testcases/kernel/security/cap_bound/exec_without_inh.c b/testcases/kernel/security/cap_bound/exec_without_inh.c
index 8d99883..0e43610 100644
--- a/testcases/kernel/security/cap_bound/exec_without_inh.c
+++ b/testcases/kernel/security/cap_bound/exec_without_inh.c
@@ -59,7 +59,7 @@
 			tst_exit();
 		}
 	} else if (ret) {
-		tst_brkm(TBROK | TERRNO, tst_exit, "Failed to add \
+		tst_brkm(TBROK | TERRNO, NULL, "Failed to add \
 			CAP_SYS_ADMIN to pI");
 	}
 	cap_free(cur);
diff --git a/testcases/kernel/security/filecaps/verify_caps_exec.c b/testcases/kernel/security/filecaps/verify_caps_exec.c
index 605f0f6..40c9798 100644
--- a/testcases/kernel/security/filecaps/verify_caps_exec.c
+++ b/testcases/kernel/security/filecaps/verify_caps_exec.c
@@ -78,17 +78,17 @@
 		prctl(PR_SET_KEEPCAPS, 1);
 	ret = setresuid(1000, 1000, 1000);
 	if (ret) {
-		tst_brkm(TFAIL | TERRNO, tst_exit, "Error dropping root privs\n");
+		tst_brkm(TFAIL | TERRNO, NULL, "Error dropping root privs\n");
 		tst_exit();
 	}
 	if (keep_perms) {
 		cap_t cap = cap_from_text("=eip");
 		int ret;
 		if (!cap)
-			tst_brkm(TBROK | TERRNO, tst_exit, "cap_from_text failed\n");
+			tst_brkm(TBROK | TERRNO, NULL, "cap_from_text failed\n");
 		ret = cap_set_proc(cap);
 		if (ret < 0)
-			tst_brkm(TBROK | TERRNO, tst_exit, "cap_set_proc failed\n");
+			tst_brkm(TBROK | TERRNO, NULL, "cap_set_proc failed\n");
 		cap_free(cap);
 	}
 }
@@ -124,7 +124,7 @@
 
 	ret = mkfifo(FIFOFILE, S_IRWXU | S_IRWXG | S_IRWXO);
 	if (ret == -1 && errno != EEXIST)
-		tst_brkm(TFAIL | TERRNO, tst_exit, "failed creating %s\n", FIFOFILE);
+		tst_brkm(TFAIL | TERRNO, NULL, "failed creating %s\n", FIFOFILE);
 }
 
 void write_to_fifo(char *buf)
@@ -143,7 +143,7 @@
 	memset(buf, 0, 200);
 	fd = open(FIFOFILE, O_RDONLY);
 	if (fd < 0)
-		tst_brkm(TFAIL | TERRNO, tst_exit, "Failed opening fifo\n");
+		tst_brkm(TFAIL | TERRNO, NULL, "Failed opening fifo\n");
 	read(fd, buf, 199);
 	close(fd);
 }
@@ -160,7 +160,7 @@
 
 	pid = fork();
 	if (pid < 0)
-		tst_brkm(TFAIL | TERRNO, tst_exit, "%s: failed fork\n", __FUNCTION__);
+		tst_brkm(TFAIL | TERRNO, NULL, "%s: failed fork\n", __FUNCTION__);
 	if (pid == 0) {
 		drop_root(keepperms);
 		print_my_caps();
@@ -170,7 +170,7 @@
 		snprintf(buf, 200, "failed to run as %s\n", capstxt);
 		cap_free(capstxt);
 		write_to_fifo(buf);
-		tst_brkm(TFAIL, tst_exit, "%s: exec failed\n", __FUNCTION__);
+		tst_brkm(TFAIL, NULL, "%s: exec failed\n", __FUNCTION__);
 	} else {
 		p = buf;
 		while (1) {
@@ -184,7 +184,7 @@
 		}
 		p = index(buf, '.');
 		if (!p)
-			tst_brkm(TFAIL, tst_exit, "got a bad message from print_caps\n");
+			tst_brkm(TFAIL, NULL, "got a bad message from print_caps\n");
 		p += 1;
 		actual_caps = cap_from_text(p);
 		if (cap_compare(actual_caps, expected_caps) != 0) {
diff --git a/testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_lease.c b/testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_lease.c
index e815911..82c0e69 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_lease.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/capable_file/selinux_lease.c
@@ -24,7 +24,7 @@
   int fd;
   int rc;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s filename\n", argv[0]);
     exit(2);
   }
@@ -37,7 +37,7 @@
   }
 
   rc = fcntl(fd, F_SETLEASE, 0);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("test_lease:F_SETLEASE");
     close(fd);
     exit(1);
diff --git a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_chroot.c b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_chroot.c
index a1958fa..1fbe684 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_chroot.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_chroot.c
@@ -20,13 +20,13 @@
 
   int rc;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s pathname\n", argv[0]);
     exit(2);
   }
 
   rc = chroot(argv[1]);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_chroot:chroot");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_hostname.c b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_hostname.c
index a37f29e..9776ce0 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_hostname.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_hostname.c
@@ -23,13 +23,13 @@
   char buf[255];
 
   rc = gethostname(buf, sizeof(buf));
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_sethostname:gethostname");
     exit(2);
   }
 
   rc = sethostname(buf, strlen(buf));
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_sethostname:sethostname");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_nice.c b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_nice.c
index 728cead..30e6acd 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_nice.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_nice.c
@@ -25,7 +25,7 @@
   int rc;
 
   rc = nice(-10);
-  if ( rc == -1) {
+  if (rc == -1) {
     perror("test_nice:nice");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_rawio.c b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_rawio.c
index d019365..2c7af2a 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_rawio.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/capable_sys/selinux_rawio.c
@@ -25,7 +25,7 @@
   int rc;
   int val = 0;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s filename\n", argv[0]);
     exit(2);
   }
@@ -39,7 +39,7 @@
 
   val = 0;
   rc = ioctl(fd, FIBMAP, &val);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_rawio:FIBMAP");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_fcntl.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_fcntl.c
index 060b82c..d5bb297 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_fcntl.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_fcntl.c
@@ -25,7 +25,7 @@
   int rc;
   struct flock my_lock;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s filename\n", argv[0]);
     exit(2);
   }
@@ -38,13 +38,13 @@
   }
 
   rc = fcntl(fd, F_SETFL, 0);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_fcntl:F_SETFL");
     exit(1);
   }
 
   rc = fcntl(fd, F_GETFL);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_fcntl:F_GETFL");
     exit(1);
   }
@@ -55,7 +55,7 @@
   my_lock.l_len = 0;
 
   rc = fcntl(fd, F_GETLK, &my_lock);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_fcntl:F_GETLK");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_lock.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_lock.c
index 88f5877..4dab67f 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_lock.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_lock.c
@@ -28,7 +28,7 @@
   int fd;
   int rc;
 
-  if ( argc != 3 ) {
+  if (argc != 3) {
     printf("usage: %s filename context\n", argv[0]);
     exit(2);
   }
@@ -47,7 +47,7 @@
   }
 
   rc = flock(fd, LOCK_EX);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_lock:LOCK_EX");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mmap.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mmap.c
index 523e7f6..6216570 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mmap.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mmap.c
@@ -29,7 +29,7 @@
   void *ptr;
   int rc;
 
-  if ( argc != 3 ) {
+  if (argc != 3) {
     printf("usage: %s filename context\n", argv[0]);
     exit(2);
   }
@@ -48,7 +48,7 @@
   }
 
   ptr = mmap(0, 1024, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED, fd, getpagesize());
-  if ( ptr == MAP_FAILED ) {
+  if (ptr == MAP_FAILED) {
     perror("selinux_mmap:mmap");
     close(fd);
     exit(1);
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mprotect.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mprotect.c
index c4f3ddc..cecbc6b 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mprotect.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_mprotect.c
@@ -28,7 +28,7 @@
   void *ptr;
   int rc;
 
-  if ( argc != 3 ) {
+  if (argc != 3) {
     printf("usage: %s filename context\n", argv[0]);
     exit(2);
   }
@@ -41,7 +41,7 @@
   }
 
   ptr = mmap(0, 1024, PROT_READ, MAP_SHARED, fd, getpagesize());
-  if ( ptr == MAP_FAILED ) {
+  if (ptr == MAP_FAILED) {
     close(fd);
     perror("selinux_mprotect:mmap");
     exit(2);
@@ -54,7 +54,7 @@
   }
 
   rc = mprotect(ptr, 1024, PROT_READ);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     close(fd);
     perror("selinux_mprotect:mprotect");
     exit(1);
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_nofcntl.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_nofcntl.c
index cb2657b..e9500ca 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_nofcntl.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_nofcntl.c
@@ -26,7 +26,7 @@
   int rc;
   struct flock my_lock;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s filename\n", argv[0]);
     exit(2);
   }
@@ -41,7 +41,7 @@
   /* The next two acesses should fail, so if that happens, we return success. */
 
   rc = fcntl(fd, F_SETFL, 0);
-  if ( rc != -1 ) {
+  if (rc != -1) {
     fprintf(stderr, "selinux_nofcntl:F_SETFL\n");
     exit(1);
   }
@@ -52,7 +52,7 @@
   my_lock.l_len = 0;
 
   rc = fcntl(fd, F_GETLK, &my_lock);
-  if ( rc != -1 ) {
+  if (rc != -1) {
     fprintf(stderr, "selinux_nofcntl:F_GETLK\n");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_seek.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_seek.c
index 0784f8c..c1c5bd4 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_seek.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_seek.c
@@ -25,7 +25,7 @@
   int fd;
   int rc;
 
-  if ( argc != 2 ) {
+  if (argc != 2) {
     printf("usage: %s filename\n", argv[0]);
     exit(2);
   }
@@ -38,7 +38,7 @@
   }
 
   rc = lseek(fd, 10, SEEK_SET);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_seek:lseek");
     close(fd);
     exit(1);
diff --git a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
index b3617c6..678c68b 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
@@ -47,7 +47,7 @@
  /*
   * Spawn off the child process to handle the information protocol.
   */
-  if ( (pid = fork()) < 0 ) {
+  if ((pid = fork()) < 0) {
      perror("selinux_sigiotask:fork");
      exit(2);
   }
@@ -55,12 +55,12 @@
  /*
   * child process
   */
-  if ( pid == 0 ) {
+  if (pid == 0) {
     /* Create the path to the executable the child will run */
     char exname[FILENAME_MAX+1];
     snprintf(exname, sizeof(exname), "%s/selinux_wait_io", dirname(argv[0]));
     printf("exname is %s\n", exname);
-    if ( execl(exname, "selinux_wait_io", (char *) 0) < 0 ) {
+    if (execl(exname, "selinux_wait_io", (char *) 0) < 0) {
       perror("selinux_sigiotask:execl");
       exit(2);
     }
@@ -70,38 +70,38 @@
    * parent process
    */
   rc = fcntl(fd, F_SETSIG, 0);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_sigiotask:F_SETSIG");
     exit(2);
   }
 
   rc = fcntl(fd, F_SETOWN, pid);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_sigiotask:F_SETOWN");
     exit(2);
   }
 
   flags = fcntl(fd, F_GETFL, 0);
-  if ( flags < 0 ) {
+  if (flags < 0) {
     perror("selinux_sigiotask:F_GETFL");
     exit(2);
   }
   flags |= O_ASYNC;
   rc = fcntl(fd, F_SETFL, flags);
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_sigiotask:F_SETFL");
     exit(2);
   }
 
   sleep(1);          /* Allow the child time to start up */
   rc = ioctl(fd, TIOCSTI, &key);  /* Send a key to the tty device */
-  if ( rc == -1 ) {
+  if (rc == -1) {
     perror("selinux_sigiotask:write");
     exit(2);
   }
   close(fd);
   wait(&rc);
-  if ( WIFEXITED(rc) ) {   /* exit status from child is normal? */
+  if (WIFEXITED(rc)) {   /* exit status from child is normal? */
     exit(WEXITSTATUS(rc));
   } else {
     exit(1);
diff --git a/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_ioctl.c b/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_ioctl.c
index 1f92dbd..6bcc93d 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_ioctl.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_ioctl.c
@@ -38,28 +38,28 @@
 
   /* This one should hit the FILE__IOCTL test */
   rc = ioctl(fd, FIGETBSZ, &val);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_ioctl:FIGETBSZ");
     exit(1);
   }
 
   /* This one should hit the FILE__IOCTL test */
   rc = ioctl(fd, FIOCLEX);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_ioctl:FIOCLEX");
     exit(1);
   }
 
   /* This one should hit the FILE__IOCTL test */
   rc = ioctl(fd, FIONBIO, &val);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_ioctl:FIONBIO");
     exit(1);
   }
 
   /* This one should hit the FILE__READ test */
   rc = ioctl(fd, EXT2_IOC_GETVERSION, &val);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_ioctl:EXT2_IOC_GETVERSION");
     exit(1);
   }
@@ -67,7 +67,7 @@
   /* This one should hit the FILE__WRITE test */
   val = 0;
   rc = ioctl(fd, EXT2_IOC_SETVERSION, &val);
-  if ( rc != 0 ) {
+  if (rc != 0) {
     perror("test_ioctl:EXT2_IOC_SETVERSION");
     exit(1);
   }
diff --git a/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_noioctl.c b/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_noioctl.c
index bb954c7..04a0be6 100644
--- a/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_noioctl.c
+++ b/testcases/kernel/security/selinux-testsuite/tests/ioctl/selinux_noioctl.c
@@ -53,14 +53,14 @@
 
   /* This one should hit the FILE__IOCTL test and fail. */
   rc = ioctl(fd, FIGETBSZ, &val);
-  if ( rc == 0 ) {
+  if (rc == 0) {
       printf("test_noioctl:FIGETBSZ");
       exit(1);
   }
 
   /* This one should hit the FILE__IOCTL test and fail. */
   rc = ioctl(fd, FIOCLEX);
-  if ( rc == 0 ) {
+  if (rc == 0) {
     printf("test_noioctl:FIOCLEX");
     exit(1);
   }
@@ -71,7 +71,7 @@
    * Old:  Should only check FD__USE and succeed.
    */
   rc = ioctl(fd, FIONBIO, &val);
-  if ( !rc == !oldkernel ) {
+  if (!rc == !oldkernel) {
     printf("test_noioctl:FIONBIO");
     exit(1);
   }
@@ -82,7 +82,7 @@
    * Old:  Should hit the FILE__GETATTR test and fail.
    */
   rc = ioctl(fd, EXT2_IOC_GETVERSION, &val);
-  if ( !rc != !oldkernel ) {
+  if (!rc != !oldkernel) {
     perror("test_noioctl:EXT2_IOC_GETVERSION");
     exit(1);
   }
@@ -90,7 +90,7 @@
   /* This one should hit the FILE__WRITE test and fail. */
   val = 0;
   rc = ioctl(fd, EXT2_IOC_SETVERSION, &val);
-  if ( rc == 0 ) {
+  if (rc == 0) {
     perror("test_noioctl:EXT2_IOC_SETVERSION");
     exit(1);
   }
diff --git a/testcases/kernel/syscalls/abort/abort01.c b/testcases/kernel/syscalls/abort/abort01.c
index aa368a9..6121af6 100644
--- a/testcases/kernel/syscalls/abort/abort01.c
+++ b/testcases/kernel/syscalls/abort/abort01.c
@@ -38,13 +38,13 @@
  *
  */
 
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 /*****	LTP Port	*****/
 #include "test.h"
@@ -53,21 +53,27 @@
 #define FAILED 0
 #define PASSED 1
 
-//char progname[]= "abort1()";
 char *TCID = "abort01";
 
 int local_flag = PASSED;
 int block_number;
 FILE *temp;
 int TST_TOTAL = 1;
-extern int Tst_count;
 
-int anyfail();
+void setup(void)
+{
+	temp = stderr;
+	tst_tmpdir();
+}
+
+void cleanup(void)
+{
+	unlink("core");
+	tst_rmdir();
+}
+
 int instress();
 void setup();
-void terror();
-void fail_exit();
-void ok_exit();
 int forkfail();
 void do_child();
 
@@ -81,83 +87,75 @@
 	int core, sig, ex;
 	char *msg;
 
+	core = sig = ex = 0;
+
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
 #endif
 
-	setup();		/* temp file is now open */
-/*--------------------------------------------------------------*/
+	setup();
 
 	for (i = 0; i < ITER; i++) {
 
 		if ((kidpid = FORK_OR_VFORK()) == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv[0], "")) {
-				terror("self_exec failed (may be OK if under stress)");
-				if (instress())
-					ok_exit();
-				forkfail();
+				if (!instress())
+					perror("fork failed");
+					exit(1);
+				}
 			}
 #else
 			do_child();
 #endif
 		}
 		if (kidpid < 0) {
-			terror("Fork failed (may be OK if under stress)");
-			if (instress())
-				ok_exit();
-			forkfail();
+			if (!instress())
+				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
 		}
 		count = 0;
 		while ((child = wait(&status)) > 0) {
 			count++;
 		}
 		if (count != 1) {
-			fprintf(temp, "\twrong # children waited on.\n");
-			fprintf(temp, "\tgot %d, expected %d\n", count, 1);
-			fail_exit();
+			tst_brkm(TBROK, cleanup,
+			    "wrong # children waited on; got %d, expected 1",
+			    count);
 		}
-		/*
-		   sig = status & 0177;
-		   core = status & 0200;
-		   ex = (status & 0xFF00) >> 8;
-		 */
-		/*****	LTP Port	*****/
-		sig = WTERMSIG(status);
+		if (WIFSIGNALED(status)) {
+
 #ifdef WCOREDUMP
-		core = WCOREDUMP(status);
+			core = WCOREDUMP(status);
 #endif
-		ex = WIFEXITED(status);
+			sig = WTERMSIG(status);
+
+		}
+		if (WIFEXITED(status))
+			ex = WIFEXITED(status);
+
 		/**************/
-		if (!core) {
-			fprintf(temp, "\tChild did not return core bit set!\n");
-			fprintf(temp, "\t  iteration %d, exit stat = 0x%x\n",
-				i, status);
-			fprintf(temp, "\tCore = %d, sig = %d, ex = %d\n",
-				core, sig, ex);
-			local_flag = FAILED;
+		if (core == 0) {
+			tst_brkm(TFAIL, cleanup,
+			    "Child did not dump core; exit code = %d, "
+			    "signal = %d", ex, sig);
+		} else {
+			tst_resm(TPASS, "abort dumped core");
 		}
-		if (sig != SIGIOT) {
-			fprintf(temp, "\tChild did not exit with SIGIOT (%d)\n",
-				SIGIOT);
-			fprintf(temp, "\t  iteration %d, exit stat = 0x%x\n",
-				i, status);
-			fprintf(temp, "\tCore = %d, sig = %d, ex = %d\n",
-				core, sig, ex);
-			local_flag = FAILED;
+
+		if (sig == SIGIOT) {
+			tst_resm(TPASS, "abort raised SIGIOT");
+		} else {
+			tst_brkm(TFAIL, cleanup,
+			    "Child did not raise SIGIOT (%d); exit code = %d, "
+			    "signal = %d", SIGIOT, ex, sig);
 		}
-		if (local_flag == FAILED)
-			break;
+
 	}
 
-/*--------------------------------------------------------------*/
-/* Clean up any files created by test before call to anyfail.	*/
-
-	unlink("core");
-	anyfail();		/* THIS CALL DOES NOT RETURN - EXITS!!  */
-	return 0;
+	cleanup();
+	tst_exit();
 }
 
 /*--------------------------------------------------------------*/
@@ -165,24 +163,8 @@
 void do_child()
 {
 	abort();
-	fprintf(temp, "\tchild - abort failed.\n");
-	exit(0);
-}
-
-/******	LTP Port	*****/
-int anyfail()
-{
-	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed") :
-				tst_resm(TPASS, "Test passed");
-	tst_rmdir();
-	tst_exit();
-	return 0;
-}
-
-void setup()
-{
-	temp = stderr;
-	tst_tmpdir();
+	fprintf(stderr, "\tchild - abort failed.\n");
+	exit(1);
 }
 
 int instress()
@@ -191,30 +173,3 @@
 		 "System resources may be too low; fork(), select() etc are likely to fail.");
 	return 1;
 }
-
-void terror(char *message)
-{
-	tst_resm(TBROK, "Reason: %s:%s", message, strerror(errno));
-}
-
-void fail_exit()
-{
-	local_flag = FAILED;
-	anyfail();
-
-}
-
-void ok_exit()
-{
-	local_flag = PASSED;
-	tst_resm(TINFO, "Test passed");
-}
-
-int forkfail()
-{
-	fprintf(temp, "\t\tFORK FAILED - terminating test.\n");
-	tst_exit();
-	return 0;
-}
-
-/*****************/
diff --git a/testcases/kernel/syscalls/accept/accept01.c b/testcases/kernel/syscalls/accept/accept01.c
index 5ef94ff..352f9e0 100644
--- a/testcases/kernel/syscalls/accept/accept01.c
+++ b/testcases/kernel/syscalls/accept/accept01.c
@@ -111,8 +111,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	}
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/access/access01.c b/testcases/kernel/syscalls/access/access01.c
index e7e78d1..1da34ab 100644
--- a/testcases/kernel/syscalls/access/access01.c
+++ b/testcases/kernel/syscalls/access/access01.c
@@ -161,10 +161,17 @@
 
 	TST_TOTAL = Ntc;
 
+<<<<<<< HEAD
+    /***************************************************************
+     * parse standard options
+     ***************************************************************/
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+=======
 	/***************************************************************
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) 
+>>>>>>> master
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/***************************************************************
diff --git a/testcases/kernel/syscalls/access/access02.c b/testcases/kernel/syscalls/access/access02.c
index a1dcf96..580d758 100644
--- a/testcases/kernel/syscalls/access/access02.c
+++ b/testcases/kernel/syscalls/access/access02.c
@@ -134,7 +134,11 @@
 	char *test_desc;	/* test specific message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -195,7 +199,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -212,7 +216,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/access/access03.c b/testcases/kernel/syscalls/access/access03.c
index 696d1c2..cd99086 100644
--- a/testcases/kernel/syscalls/access/access03.c
+++ b/testcases/kernel/syscalls/access/access03.c
@@ -124,6 +124,12 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
+<<<<<<< HEAD
+    /***************************************************************
+     * parse standard options
+     ***************************************************************/
+=======
+>>>>>>> master
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
diff --git a/testcases/kernel/syscalls/access/access04.c b/testcases/kernel/syscalls/access/access04.c
index 5d8de19..e9d232e 100644
--- a/testcases/kernel/syscalls/access/access04.c
+++ b/testcases/kernel/syscalls/access/access04.c
@@ -100,9 +100,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -151,7 +157,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -169,7 +175,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/access/access05.c b/testcases/kernel/syscalls/access/access05.c
index a377358..1ee7ec3 100644
--- a/testcases/kernel/syscalls/access/access05.c
+++ b/testcases/kernel/syscalls/access/access05.c
@@ -161,9 +161,15 @@
 	int ind;		/* counter for testcase looping */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -223,7 +229,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -240,7 +246,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/add_key/add_key01.c b/testcases/kernel/syscalls/add_key/add_key01.c
index ffa2f68..1501f8c 100644
--- a/testcases/kernel/syscalls/add_key/add_key01.c
+++ b/testcases/kernel/syscalls/add_key/add_key01.c
@@ -110,8 +110,16 @@
 	char *msg;	      /* message returned from parse_opts */
 	
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	} else {
+
+		setup();
+=======
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c
index 8b5d42e..cd6d06c 100644
--- a/testcases/kernel/syscalls/add_key/add_key02.c
+++ b/testcases/kernel/syscalls/add_key/add_key02.c
@@ -124,8 +124,14 @@
 	char *msg;	      /* message returned from parse_opts */
 	
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	} else {
+=======
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	setup();
 
@@ -134,7 +140,11 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
+<<<<<<< HEAD
+				for (i=0; i<test_count; i++) {
+=======
 			for (i=0; i<test_count; i++) {
+>>>>>>> master
 
 				/* Call add_key. */
 				TEST(syscall(__NR_add_key, test_cases[i].type,
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex01.c b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
index 7c1c0ee..8b231bf 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex01.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
@@ -93,10 +93,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -123,7 +121,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -132,7 +130,7 @@
 {
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	tim_save.modes = 0;
@@ -160,7 +158,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex02.c b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
index cec3645..01d4dc2 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex02.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
@@ -144,10 +144,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -201,7 +199,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -213,7 +211,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
@@ -225,7 +223,7 @@
 	/* set the HZ from sysconf */
 	hz = sysconf(_SC_CLK_TCK);
 	if (hz == -1) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			 "Failed to read the HZ from sysconf\n");
 	}
 
@@ -234,7 +232,7 @@
 
 	/* Save current parameters in tim_save */
 	if ((adjtimex(&tim_save)) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to save current parameters");
+		tst_brkm(TBROK, NULL, "Failed to save current parameters");
 	}
 }				/* End setup() */
 
@@ -255,9 +253,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 int setup2()
@@ -288,7 +283,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "\"nobody\" user not present");
+		tst_brkm(TBROK, NULL, "\"nobody\" user not present");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		tst_resm(TWARN|TERRNO, "seteuid(%d) failed", ltpuser->pw_uid);
diff --git a/testcases/kernel/syscalls/alarm/alarm02.c b/testcases/kernel/syscalls/alarm/alarm02.c
index bf5b538..8621dd4 100644
--- a/testcases/kernel/syscalls/alarm/alarm02.c
+++ b/testcases/kernel/syscalls/alarm/alarm02.c
@@ -167,8 +167,8 @@
 	}			/* End for TEST_LOOPING */
 
 	cleanup();
+	tst_exit();
 
-	return 0;
 }
 
 void setup()
@@ -191,10 +191,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-
-	tst_exit();
 }
 
 void alarm_received()
diff --git a/testcases/kernel/syscalls/alarm/alarm03.c b/testcases/kernel/syscalls/alarm/alarm03.c
index 1751445..cc8ee18 100644
--- a/testcases/kernel/syscalls/alarm/alarm03.c
+++ b/testcases/kernel/syscalls/alarm/alarm03.c
@@ -112,7 +112,7 @@
 {
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
-	int e_code, status, retval = 0;
+	int status, retval = 0;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -167,9 +167,7 @@
 			}
 			/* wait for the child to finish */
 			wait(&status);
-			/* make sure the child returned a good exit status */
-			e_code = status >> 8;
-			if ((e_code != 0) || (retval != 0)) {
+			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
 				tst_resm(TFAIL, "Failures reported above");
 			}
 
diff --git a/testcases/kernel/syscalls/alarm/alarm05.c b/testcases/kernel/syscalls/alarm/alarm05.c
index df5a8c3..e05bbc6 100644
--- a/testcases/kernel/syscalls/alarm/alarm05.c
+++ b/testcases/kernel/syscalls/alarm/alarm05.c
@@ -79,7 +79,7 @@
 char *TCID = "alarm05";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-int almreceived = 0;		/* flag to indicate SIGALRM received or not */
+int alarms_received = 0;		/* flag to indicate SIGALRM received or not */
 
 void setup();			/* Main setup function of test */
 void cleanup();			/* cleanup function for the test */
@@ -97,10 +97,8 @@
 	int sleep_time2 = 6;	/* waiting time for the signal */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* Perform global setup for test */
 	setup();
@@ -110,10 +108,10 @@
 		/* Reset Tst_count in case we are looping. */
 		Tst_count = 0;
 
-		/* Reset almreceived for every iteration, since it has
+		/* Reset alarms_received for every iteration, since it has
 		 * old values from previous iterations (if any) and not
 		 * a value of zero */
-		almreceived = 0;
+		alarms_received = 0;
 
 		/*
 		 * Call First alarm() with non-zero time parameter
@@ -140,10 +138,10 @@
 		 * the amount of time previously remaining in the
 		 * alarm clock of the calling process, and
 		 * sigproc() executed when SIGALRM received by the
-		 * process, the variable almreceived is set.
+		 * process, the variable alarms_received is set.
 		 */
 		if (STD_FUNCTIONAL_TEST) {
-			if ((almreceived == 1) &&
+			if ((alarms_received == 1) &&
 			    (ret_val2 == (time_sec1 - sleep_time1))) {
 
 				/*
@@ -163,19 +161,17 @@
 				}
 			} else {
 				tst_resm(TFAIL, "alarm(%u) fails, returned %d, "
-					 "almreceived:%d",
-					 time_sec2, ret_val2, almreceived);
+					 "alarms_received:%d",
+					 time_sec2, ret_val2, alarms_received);
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
 		}
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	return 0;
- /*NOTREACHED*/}
+	tst_exit(); 
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -204,7 +200,7 @@
  */
 void sigproc(int sig)
 {
-	almreceived = almreceived + 1;
+	alarms_received++;
 }
 
 /*
@@ -219,7 +215,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/alarm/alarm06.c b/testcases/kernel/syscalls/alarm/alarm06.c
index 16afa06..a117b7c 100644
--- a/testcases/kernel/syscalls/alarm/alarm06.c
+++ b/testcases/kernel/syscalls/alarm/alarm06.c
@@ -77,7 +77,7 @@
 char *TCID = "alarm06";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-int almreceived = 0;		/* flag to indicate SIGALRM received or not */
+int alarms_received = 0;		/* flag to indicate SIGALRM received or not */
 
 void setup();			/* Main setup function of test */
 void cleanup();			/* cleanup function for the test */
@@ -94,10 +94,8 @@
 	int sleep_time2 = 10;	/* waiting time for the 2nd signal */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* Perform global setup for test */
 	setup();
@@ -132,17 +130,17 @@
 		 * the amount of time (seconds) previously remaining in the
 		 * alarm clock of the calling process, and
 		 * sigproc() never executed as SIGALRM was not received by the
-		 * process, the variable almreceived remains unset.
+		 * process, the variable alarms_received remains unset.
 		 */
 		if (STD_FUNCTIONAL_TEST) {
-			if ((almreceived == 0) &&
+			if ((alarms_received == 0) &&
 			    (ret_val2 == (time_sec1 - sleep_time1))) {
 				tst_resm(TPASS, "Functionality of alarm(%u) "
 					 "successful", time_sec2);
 			} else {
 				tst_resm(TFAIL, "alarm(%u) fails, returned %d, "
-					 "almreceived:%d",
-					 time_sec2, ret_val2, almreceived);
+					 "alarms_received:%d",
+					 time_sec2, ret_val2, alarms_received);
 			}
 		} else {
 			tst_resm(TPASS, "last call returned %d", ret_val2);
@@ -151,9 +149,8 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	return 0;
- /*NOTREACHED*/}
+	tst_exit();
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -182,7 +179,7 @@
  */
 void sigproc(int sig)
 {
-	almreceived = almreceived + 1;
+	alarms_received++;
 }
 
 /*
@@ -196,7 +193,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/alarm/alarm07.c b/testcases/kernel/syscalls/alarm/alarm07.c
index a486174..6d506bb 100644
--- a/testcases/kernel/syscalls/alarm/alarm07.c
+++ b/testcases/kernel/syscalls/alarm/alarm07.c
@@ -76,7 +76,7 @@
 char *TCID = "alarm07";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-int almreceived = 0;		/* flag to indicate SIGALRM received or not */
+int alarms_received = 0;		/* flag to indicate SIGALRM received or not */
 
 void setup();			/* Main setup function of test */
 void cleanup();			/* cleanup function for the test */
@@ -86,15 +86,14 @@
 {
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
-	int time_sec = 3;	/* time for which alarm is set */
 	int sleep_time = 5;	/* waiting time for the SIGALRM signal */
+	int status;
+	int time_sec = 3;	/* time for which alarm is set */
 	pid_t cpid;		/* child process id */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* Perform global setup for test */
 	setup();
@@ -122,20 +121,26 @@
 		if (STD_FUNCTIONAL_TEST) {
 			if (cpid == 0) {	/* Child process */
 				/*
-				 * For child process if almreceived is 0
+				 * For child process if alarms_received is 0
 				 * means alarm request is cleared.
 				 */
-				if (almreceived == 0) {
-					printf("Functionality of alarm(%u) "
-					    "successful\n", time_sec);
+				if (alarms_received == 0) {
+					exit(0);
 				} else {
 					printf("alarm request not cleared in "
-					    "child, almreceived:%d\n",
-					    almreceived);
+					    "child; alarms received:%d\n",
+					    alarms_received);
+					exit(1);
 				}
 			} else {	/* Parent process */
 				/* Wait for child to complete execution */
-				wait(0);
+				if (wait(&status) == -1)
+					tst_brkm(TBROK|TERRNO, cleanup,
+					    "wait failed");
+				if (!WIFEXITED(status) ||
+				    WEXITSTATUS(status) != 0)
+					tst_brkm(TBROK|TERRNO, cleanup,
+					    "child exited abnormally");
 			}
 		} else {
 			tst_resm(TPASS, "call returned %ld", TEST_RETURN);
@@ -145,8 +150,8 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	return 0;
- /*NOTREACHED*/}		/* End main */
+	tst_exit();
+}		/* End main */
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -162,8 +167,7 @@
 
 	/* Set the signal catching function */
 	if (signal(SIGALRM, sigproc) == SIG_ERR) {
-		tst_brkm(TFAIL|TERRNO, cleanup,
-			 "signal() fails to catch SIGALARM");
+		tst_brkm(TFAIL|TERRNO, cleanup, "signal(SIGALRM, ..) failed");
 	}
 }
 
@@ -175,7 +179,7 @@
  */
 void sigproc(int sig)
 {
-	almreceived = almreceived + 1;
+	alarms_received++;
 }
 
 /*
@@ -189,7 +193,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/asyncio/asyncio02.c b/testcases/kernel/syscalls/asyncio/asyncio02.c
index 953754d..a4b371c 100644
--- a/testcases/kernel/syscalls/asyncio/asyncio02.c
+++ b/testcases/kernel/syscalls/asyncio/asyncio02.c
@@ -154,6 +154,12 @@
 	Num_flags = sizeof(Flags) / sizeof(int);
 	TST_TOTAL = 3 * Num_flags;
 
+<<<<<<< HEAD
+    /***************************************************************
+     * parse standard options, and exit if there is an error
+     ***************************************************************/
+=======
+>>>>>>> master
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/bdflush/bdflush01.c b/testcases/kernel/syscalls/bdflush/bdflush01.c
index dc06586..7873b0b 100644
--- a/testcases/kernel/syscalls/bdflush/bdflush01.c
+++ b/testcases/kernel/syscalls/bdflush/bdflush01.c
@@ -116,9 +116,15 @@
 /*									    */
 /******************************************************************************/
 extern void cleanup() {
+<<<<<<< HEAD
+        /* Remove tmp dir and all files in it */
+        TEST_CLEANUP;
+        tst_rmdir();
+=======
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
+>>>>>>> master
 }
 
 /* Local  Functions */
@@ -148,6 +154,16 @@
 
 int main(int ac, char **av) {
 	long data;
+<<<<<<< HEAD
+        char *msg;              /* message returned from parse_opts */
+	
+        /* parse standard options */
+        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+        setup();
+
+=======
 	int lc;		 /* loop counter */
 	char *msg;	      /* message returned from parse_opts */
 	
@@ -158,15 +174,25 @@
 	setup();
 
 	/* Check looping state if -i option given */
+>>>>>>> master
 	Tst_count = 1;
 	for (testno = 0; testno < TST_TOTAL; ++testno) {
 		TEST(syscall(__NR_bdflush, 0, data));
 		if (TEST_RETURN < 0) {
+<<<<<<< HEAD
+			tst_brkm(TFAIL|TTERRNO, cleanup, "bdflush() failed");
+		} else {
+			tst_resm(TPASS, "test PASSED; %ld was returned",
+			    TEST_RETURN);
+                }
+        }
+=======
 			tst_brkm(TFAIL|TTERRNO, cleanup, "bdflush failed");
 		} else {
 			tst_resm(TPASS, "bdflush() = %ld", TEST_RETURN);
 		}
 	}
+>>>>>>> master
 	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/bind/bind01.c b/testcases/kernel/syscalls/bind/bind01.c
index 5bea3a0..2df6b8c 100644
--- a/testcases/kernel/syscalls/bind/bind01.c
+++ b/testcases/kernel/syscalls/bind/bind01.c
@@ -114,7 +114,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, 0, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
index 8faa73c..60bab0b 100644
--- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
+++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
@@ -139,7 +139,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
         }
 
diff --git a/testcases/kernel/syscalls/capget/capget01.c b/testcases/kernel/syscalls/capget/capget01.c
index a997f4a..164c274 100644
--- a/testcases/kernel/syscalls/capget/capget01.c
+++ b/testcases/kernel/syscalls/capget/capget01.c
@@ -98,9 +98,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -127,7 +133,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/capget/capget02.c b/testcases/kernel/syscalls/capget/capget02.c
index 1fa2b6d..a582f92 100644
--- a/testcases/kernel/syscalls/capget/capget02.c
+++ b/testcases/kernel/syscalls/capget/capget02.c
@@ -128,9 +128,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -162,7 +168,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/capset/capset01.c b/testcases/kernel/syscalls/capset/capset01.c
index 5f93a3c..b794144 100644
--- a/testcases/kernel/syscalls/capset/capset01.c
+++ b/testcases/kernel/syscalls/capset/capset01.c
@@ -104,10 +104,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -132,7 +130,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -155,7 +153,7 @@
 	header.version = _LINUX_CAPABILITY_VERSION;
 	header.pid = 0;
 	if ((capget(&header, &data)) == -1) {
-		tst_brkm(TBROK|TTERRNO, tst_exit, "capget() failed");
+		tst_brkm(TBROK|TTERRNO, NULL, "capget() failed");
 	}
 
 }				/* End setup() */
@@ -171,8 +169,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/* End cleanup() */
 }
diff --git a/testcases/kernel/syscalls/capset/capset02.c b/testcases/kernel/syscalls/capset/capset02.c
index a5f3503..151197a 100644
--- a/testcases/kernel/syscalls/capset/capset02.c
+++ b/testcases/kernel/syscalls/capset/capset02.c
@@ -137,10 +137,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 #ifdef UCLINUX
 	maybe_run_child(&child_func, "");
 #endif
@@ -175,7 +173,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -198,7 +196,7 @@
 	 */
 	header.version = _LINUX_CAPABILITY_VERSION;
 	if ((capget(&header, &data)) == -1) {
-		tst_brkm(TBROK|TERRNO, tst_exit, "capget() failed");
+		tst_brkm(TBROK|TERRNO, NULL, "capget() failed");
 	}
 
 }				/* End setup() */
@@ -216,9 +214,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 void child_func()
diff --git a/testcases/kernel/syscalls/chdir/chdir01.c b/testcases/kernel/syscalls/chdir/chdir01.c
index 60f07f9..b75ef3d 100644
--- a/testcases/kernel/syscalls/chdir/chdir01.c
+++ b/testcases/kernel/syscalls/chdir/chdir01.c
@@ -81,7 +81,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -97,13 +101,13 @@
 
 		if ((ret = chdir(testdir)) != 0) {
 			tst_brkm(TBROK|TERRNO, cleanup, "chdir(%s) failed", testdir);
-		 /*NOTREACHED*/}
+		 }
 		if ((fd = creat(filname, 0000)) == -1) {
 			tst_brkm(TBROK|TERRNO, cleanup, "creat(%s) failed", filname);
-		 /*NOTREACHED*/}
+		 }
 		if ((ddir = opendir(".")) == NULL) {
 			tst_brkm(TBROK|TERRNO, cleanup, "opendir(.) failed");
-		 /*NOTREACHED*/}
+		 }
 
 		filenames[0] = ".";
 		filenames[1] = "..";
@@ -136,7 +140,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test
diff --git a/testcases/kernel/syscalls/chdir/chdir02.c b/testcases/kernel/syscalls/chdir/chdir02.c
index 474c341..49a0bf3 100644
--- a/testcases/kernel/syscalls/chdir/chdir02.c
+++ b/testcases/kernel/syscalls/chdir/chdir02.c
@@ -135,7 +135,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/chdir/chdir03.c b/testcases/kernel/syscalls/chdir/chdir03.c
index a2f5654..2341cc5 100644
--- a/testcases/kernel/syscalls/chdir/chdir03.c
+++ b/testcases/kernel/syscalls/chdir/chdir03.c
@@ -88,7 +88,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -165,7 +169,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -176,7 +180,7 @@
 
 	/* make sure the process ID is root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root.");
+		tst_brkm(TBROK, NULL, "Test must be run as root.");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/chdir/chdir04.c b/testcases/kernel/syscalls/chdir/chdir04.c
index 5ecfe0f..7caee85 100644
--- a/testcases/kernel/syscalls/chdir/chdir04.c
+++ b/testcases/kernel/syscalls/chdir/chdir04.c
@@ -115,7 +115,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -151,7 +155,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/chmod/chmod01.c b/testcases/kernel/syscalls/chmod/chmod01.c
index 5eb7853..4e82b27 100644
--- a/testcases/kernel/syscalls/chmod/chmod01.c
+++ b/testcases/kernel/syscalls/chmod/chmod01.c
@@ -101,7 +101,11 @@
 	TST_TOTAL = sizeof(Modes) / sizeof(int);
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -170,7 +174,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
diff --git a/testcases/kernel/syscalls/chmod/chmod03.c b/testcases/kernel/syscalls/chmod/chmod03.c
index 6a20811..10148c6 100644
--- a/testcases/kernel/syscalls/chmod/chmod03.c
+++ b/testcases/kernel/syscalls/chmod/chmod03.c
@@ -106,7 +106,11 @@
 	mode_t file_mode;	/* mode permissions set on testfile */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -167,7 +171,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
@@ -184,7 +188,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/chmod/chmod04.c b/testcases/kernel/syscalls/chmod/chmod04.c
index c36bc5a..6c4f72d 100644
--- a/testcases/kernel/syscalls/chmod/chmod04.c
+++ b/testcases/kernel/syscalls/chmod/chmod04.c
@@ -106,7 +106,11 @@
 	mode_t dir_mode;	/* mode permissions set on testdirectory */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -168,7 +172,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
@@ -183,7 +187,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/chmod/chmod05.c b/testcases/kernel/syscalls/chmod/chmod05.c
index aebfc32..0982e11 100644
--- a/testcases/kernel/syscalls/chmod/chmod05.c
+++ b/testcases/kernel/syscalls/chmod/chmod05.c
@@ -125,7 +125,11 @@
 	mode_t dir_mode;	/* mode permissions set on test directory */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -191,7 +195,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
@@ -210,7 +214,7 @@
 //wjh Improper comment! This makes sure we _are_ "root" not "nobody"
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/chmod/chmod06.c b/testcases/kernel/syscalls/chmod/chmod06.c
index 8a97422..2ec580d 100644
--- a/testcases/kernel/syscalls/chmod/chmod06.c
+++ b/testcases/kernel/syscalls/chmod/chmod06.c
@@ -158,7 +158,11 @@
 	struct passwd *ltpuser;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -230,7 +234,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
@@ -251,7 +255,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/chmod/chmod07.c b/testcases/kernel/syscalls/chmod/chmod07.c
index 4ac0d88..d67d23a 100644
--- a/testcases/kernel/syscalls/chmod/chmod07.c
+++ b/testcases/kernel/syscalls/chmod/chmod07.c
@@ -106,7 +106,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -165,7 +169,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
diff --git a/testcases/kernel/syscalls/chown/chown01.c b/testcases/kernel/syscalls/chown/chown01.c
index ff0690a..7134333 100644
--- a/testcases/kernel/syscalls/chown/chown01.c
+++ b/testcases/kernel/syscalls/chown/chown01.c
@@ -139,7 +139,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/chown/chown02.c b/testcases/kernel/syscalls/chown/chown02.c
index fb59bb2..03324ad 100644
--- a/testcases/kernel/syscalls/chown/chown02.c
+++ b/testcases/kernel/syscalls/chown/chown02.c
@@ -117,14 +117,18 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 	int ind;		/* counter variable for chmod(2) tests */
-	uid_t User_id;		/* user id of the user set for testfile */
-	gid_t Group_id;		/* group id of the user set for testfile */
+	uid_t user_id;		/* user id of the user set for testfile */
+	gid_t group_id;		/* group id of the user set for testfile */
 	int test_flag;		/* test condition specific flag variable */
 	char *file_name;	/* ptr. for test file name */
 	char *test_desc;	/* test specific message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -142,15 +146,15 @@
 
 			file_name = Test_cases[ind].pathname;
 			test_desc = Test_cases[ind].desc;
-			User_id = Test_cases[ind].user_id;
-			Group_id = Test_cases[ind].group_id;
+			user_id = Test_cases[ind].user_id;
+			group_id = Test_cases[ind].group_id;
 			test_flag = Test_cases[ind].test_flag;
 
 			/*
 			 * Call chown(2) with different user id and
 			 * group id (numeric values) to set it on testfile.
 			 */
-			TEST(chown(file_name, User_id, Group_id));
+			TEST(chown(file_name, user_id, group_id));
 
 			/* check return code of chown(2) */
 			if (TEST_RETURN == -1) {
@@ -178,12 +182,12 @@
 				 * Check for expected Ownership ids
 				 * set on testfile.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id)) {
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id)) {
 					tst_brkm(TFAIL, cleanup, "%s: Incorrect"
 						 " ownership set, Expected %d "
 						 "%d", file_name,
-						 User_id, Group_id);
+						 user_id, group_id);
 				}
 
 				/*
@@ -219,7 +223,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
diff --git a/testcases/kernel/syscalls/chown/chown03.c b/testcases/kernel/syscalls/chown/chown03.c
index a282dee..19ebb4c 100644
--- a/testcases/kernel/syscalls/chown/chown03.c
+++ b/testcases/kernel/syscalls/chown/chown03.c
@@ -101,11 +101,15 @@
 	struct stat stat_buf;	/* stat(2) struct contents */
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
-	uid_t User_id;		/* Owner id of the test file. */
-	gid_t Group_id;		/* Group id of the test file. */
+	uid_t user_id;		/* Owner id of the test file. */
+	gid_t group_id;		/* Group id of the test file. */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -120,15 +124,15 @@
 		Tst_count = 0;
 
 		/* Get the euid/egid of the process */
-		User_id = geteuid();
-		Group_id = getegid();
+		user_id = geteuid();
+		group_id = getegid();
 
 		/*
 		 * Call chown(2) with different user id and
 		 * group id (numeric values) to set it on testfile.
 		 */
 
-		TEST(chown(TESTFILE, -1, Group_id));
+		TEST(chown(TESTFILE, -1, group_id));
 
 		/* check return code of chown(2) */
 		if (TEST_RETURN == -1) {
@@ -153,12 +157,12 @@
 			/*
 			 * Check for expected Ownership ids set on testfile.
 			 */
-			if ((stat_buf.st_uid != User_id) ||
-			    (stat_buf.st_gid != Group_id)) {
+			if ((stat_buf.st_uid != user_id) ||
+			    (stat_buf.st_gid != group_id)) {
 				tst_resm(TFAIL, "%s: Incorrect ownership"
 					 "set to %d %d, Expected %d %d",
 					 TESTFILE, stat_buf.st_uid,
-					 stat_buf.st_gid, User_id, Group_id);
+					 stat_buf.st_gid, user_id, group_id);
 			}
 
 			/*
@@ -183,7 +187,7 @@
 	cleanup();
 
 	return 0;
-/*NOTREACHED*/
+
 }		/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/chown/chown04.c b/testcases/kernel/syscalls/chown/chown04.c
index 1ec79c6..c32f0dc 100644
--- a/testcases/kernel/syscalls/chown/chown04.c
+++ b/testcases/kernel/syscalls/chown/chown04.c
@@ -149,11 +149,15 @@
 	char *file_name;	/* ptr. for file name whose mode is modified */
 	char *test_desc;	/* test specific error message */
 	int ind;		/* counter to test different test conditions */
-	uid_t User_id;		/* Effective user id of a test process */
-	gid_t Group_id;		/* Effective group id of a test process */
+	uid_t user_id;		/* Effective user id of a test process */
+	gid_t group_id;		/* Effective group id of a test process */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -169,8 +173,8 @@
 	TEST_EXP_ENOS(exp_enos);
 
 	/* Set uid/gid values to that of test process */
-	User_id = geteuid();
-	Group_id = getegid();
+	user_id = geteuid();
+	group_id = getegid();
 
 	/* Check looping state if -c option given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -190,7 +194,7 @@
 			 * verify that it fails with -1 return value and
 			 * sets appropriate errno.
 			 */
-			TEST(chown(file_name, User_id, Group_id));
+			TEST(chown(file_name, user_id, group_id));
 
 			/* Check return code from chown(2) */
 			if (TEST_RETURN != -1) {
@@ -221,7 +225,7 @@
 	cleanup();
 
 	return 0;
-/*NOTREACHED*/
+
 }		/* End main */
 
 /*
@@ -245,7 +249,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/chown/chown05.c b/testcases/kernel/syscalls/chown/chown05.c
index ad84005..1252abe 100644
--- a/testcases/kernel/syscalls/chown/chown05.c
+++ b/testcases/kernel/syscalls/chown/chown05.c
@@ -108,12 +108,16 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 	int ind;		/* counter variable for chmod(2) tests */
-	uid_t User_id;		/* user id of the user set for testfile */
-	gid_t Group_id;		/* group id of the user set for testfile */
+	uid_t user_id;		/* user id of the user set for testfile */
+	gid_t group_id;		/* group id of the user set for testfile */
 	char *test_desc;	/* test specific message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -129,15 +133,15 @@
 
 		for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
 			test_desc = Test_cases[ind].desc;
-			User_id = Test_cases[ind].user_id;
-			Group_id = Test_cases[ind].group_id;
+			user_id = Test_cases[ind].user_id;
+			group_id = Test_cases[ind].group_id;
 
 			/*
 			 * Call chwon(2) with different user id and
 			 * group id (numeric values) to set it on
 			 * testfile.
 			 */
-			TEST(chown(TESTFILE, User_id, Group_id));
+			TEST(chown(TESTFILE, user_id, group_id));
 
 			/* check return code of chown(2) */
 			if (TEST_RETURN == -1) {
@@ -160,23 +164,23 @@
 						 "%s failed, errno:%d",
 						 TESTFILE, TEST_ERRNO);
 				}
-				if (User_id == -1) {
-					User_id = Test_cases[ind - 1].user_id;
+				if (user_id == -1) {
+					user_id = Test_cases[ind - 1].user_id;
 				}
-				if (Group_id == -1) {
-					Group_id = Test_cases[ind - 1].group_id;
+				if (group_id == -1) {
+					group_id = Test_cases[ind - 1].group_id;
 				}
 
 				/*
 				 * Check for expected Ownership ids
 				 * set on testfile.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id)) {
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id)) {
 					tst_resm(TFAIL, "%s: Incorrect "
 						 "ownership set, Expected %d "
-						 "%d", TESTFILE, User_id,
-						 Group_id);
+						 "%d", TESTFILE, user_id,
+						 group_id);
 				} else {
 					tst_resm(TPASS,
 						 "chown() succeeds to %s of %s",
@@ -192,7 +196,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 /*
  * void
diff --git a/testcases/kernel/syscalls/chroot/chroot01.c b/testcases/kernel/syscalls/chroot/chroot01.c
index ca27c04..a46837b 100644
--- a/testcases/kernel/syscalls/chroot/chroot01.c
+++ b/testcases/kernel/syscalls/chroot/chroot01.c
@@ -70,7 +70,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -99,7 +103,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -109,7 +113,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/chroot/chroot02.c b/testcases/kernel/syscalls/chroot/chroot02.c
index 2bb97cc..6d76552 100644
--- a/testcases/kernel/syscalls/chroot/chroot02.c
+++ b/testcases/kernel/syscalls/chroot/chroot02.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -125,7 +129,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/chroot/chroot03.c b/testcases/kernel/syscalls/chroot/chroot03.c
index 2232d82..c503df5 100644
--- a/testcases/kernel/syscalls/chroot/chroot03.c
+++ b/testcases/kernel/syscalls/chroot/chroot03.c
@@ -125,7 +125,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -164,7 +168,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/chroot/chroot04.c b/testcases/kernel/syscalls/chroot/chroot04.c
index 3ffca4f..1fe336d 100644
--- a/testcases/kernel/syscalls/chroot/chroot04.c
+++ b/testcases/kernel/syscalls/chroot/chroot04.c
@@ -70,7 +70,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -100,7 +104,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -132,12 +136,12 @@
 		tst_resm(TFAIL, "mkdir() failed to create"
 			 " a testing directory");
 		exit(1);
-		/* NOTREACHED */
+		
 	}
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
@@ -162,7 +166,7 @@
 		tst_resm(TFAIL, "rmdir() failed to removed"
 			 " a testing directory");
 		exit(1);
-		/* NOTREACHED */
+		
 	}
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/syscalls/clock_getres/clock_getres01.c b/testcases/kernel/syscalls/clock_getres/clock_getres01.c
index 6d4e6e7..c7f8b04 100644
--- a/testcases/kernel/syscalls/clock_getres/clock_getres01.c
+++ b/testcases/kernel/syscalls/clock_getres/clock_getres01.c
@@ -278,7 +278,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
@@ -297,7 +301,7 @@
 					break;
 				default:
 					usage(progname);
-					/* NOTREACHED */
+					
 				}
 			}
 
@@ -305,7 +309,7 @@
 			if (ac != optind) {
 				tst_resm(TINFO,"Options are not match.");
 				usage(progname);
-				// NOTREACHED
+				
 			}
 
 			/*
diff --git a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
index e80f63d..9ae9e9b 100644
--- a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
+++ b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
@@ -1,49 +1,49 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd		*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
 /*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
 /*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        clock_nanosleep01.c                                           */
-/*                                                                            */
-/* Description: This tests the clock_nanosleep() syscall                      */
+/*									    */
+/* File:	clock_nanosleep01.c					   */
+/*									    */
+/* Description: This tests the clock_nanosleep() syscall		      */
 /*									      */
 /* 									      */
 /*									      */
 /*									      */
 /*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* clock_nanosleep01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                     */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   clock_nanosleep01                                             */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* clock_nanosleep01 [-c n] [-e][-i n] [-I x] [-p x] [-t]		     */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   clock_nanosleep01					     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 #include <sys/syscall.h>
 #include <sys/types.h>
@@ -63,13 +63,13 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "clock_nanosleep01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -77,66 +77,66 @@
  */
 void sighandler(int sig)
 {
-        if (sig == SIGINT)
-                return;
-        // NOTREACHED
-        return;
+	if (sig == SIGINT)
+		return;
+	
+	return;
 }
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Exit with appropriate return code. */
+	tst_exit();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        /* Capture signals if any */
+	/* Capture signals if any */
 	act.sa_handler = sighandler;
 	sigfillset(&act.sa_mask);
 	sigaction(SIGINT, &act, NULL);
 
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -145,13 +145,6 @@
  */
 #define SYSCALL_NAME    "clock_nanosleep"
 
-
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
 		NORMAL,
 		NULL_POINTER,
@@ -165,11 +158,11 @@
 struct test_case {
 	clockid_t clk_id;
 	int ttype;
-        int flags;
-        time_t sec;
-        long nsec;
+	int flags;
+	time_t sec;
+	long nsec;
 	int ret;
-        int err;
+	int err;
 };
 
 
@@ -177,78 +170,78 @@
  *
  *   test status of errors on man page
  *
- *   EINTR              v (function was interrupted by a signal)
- *   EINVAL             v (invalid tv_nsec, etc.)
- *   ENOTSUP            can't check because not supported clk_id generates
- *                      EINVAL
+ *   EINTR	      v (function was interrupted by a signal)
+ *   EINVAL	     v (invalid tv_nsec, etc.)
+ *   ENOTSUP	    can't check because not supported clk_id generates
+ *		      EINVAL
  */
 
 
 static struct test_case tcase[] = {
-        { // case00
-                .clk_id         = CLOCK_REALTIME,
-                .ttype          = NORMAL,
-		.flags          = 0,
-                .sec            = 0,
-                .nsec           = 500000000, // 500msec
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .clk_id         = CLOCK_MONOTONIC,
-                .ttype          = NORMAL,
-		.flags          = 0,
-                .sec            = 0,
-                .nsec           = 500000000, // 500msec
-                .ret            = 0,
-                .err            = 0,
-        },
+	{ // case00
+		.clk_id	 = CLOCK_REALTIME,
+		.ttype	  = NORMAL,
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = 500000000, // 500msec
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.clk_id	 = CLOCK_MONOTONIC,
+		.ttype	  = NORMAL,
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = 500000000, // 500msec
+		.ret	    = 0,
+		.err	    = 0,
+	},
 	{ // case02
-                .ttype          = NORMAL,
-                .clk_id         = CLOCK_REALTIME,
-                .flags          = 0,
-                .sec            = 0,
-                .nsec           = -1,   // invalid
-                .ret            = EINVAL,
-                .err            = 0,
-        },
-        { // case03
-                .ttype          = NORMAL,
-                .clk_id         = CLOCK_REALTIME,
-                .flags          = 0,
-                .sec            = 0,
-                .nsec           = 1000000000,   // invalid
-                .ret            = EINVAL,
-                .err            = 0,
-        },
-        { // case04
-                .ttype          = NORMAL,
-                .clk_id         = CLOCK_THREAD_CPUTIME_ID, // not supported
-                .flags          = 0,
-                .sec            = 0,
-                .nsec           = 500000000, // 500msec
-                .ret            = EINVAL, // RHEL4U1 + 2.6.18 returns EINVAL
-                .err            = 0,
-        },
-        { // case05
-                .ttype          = SEND_SIGINT,
-                .clk_id         = CLOCK_REALTIME,
-                .flags          = 0,
-                .sec            = 10,
-                .nsec           = 0,
-                .ret            = EINTR,
-                .err            = 0,
-        },
+		.ttype	  = NORMAL,
+		.clk_id	 = CLOCK_REALTIME,
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = -1,   // invalid
+		.ret	    = EINVAL,
+		.err	    = 0,
+	},
+	{ // case03
+		.ttype	  = NORMAL,
+		.clk_id	 = CLOCK_REALTIME,
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = 1000000000,   // invalid
+		.ret	    = EINVAL,
+		.err	    = 0,
+	},
+	{ // case04
+		.ttype	  = NORMAL,
+		.clk_id	 = CLOCK_THREAD_CPUTIME_ID, // not supported
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = 500000000, // 500msec
+		.ret	    = EINVAL, // RHEL4U1 + 2.6.18 returns EINVAL
+		.err	    = 0,
+	},
+	{ // case05
+		.ttype	  = SEND_SIGINT,
+		.clk_id	 = CLOCK_REALTIME,
+		.flags	  = 0,
+		.sec	    = 10,
+		.nsec	   = 0,
+		.ret	    = EINTR,
+		.err	    = 0,
+	},
 #if 0   // glibc generates SEGV error (RHEL4U1 + 2.6.18)
-        { // caseXX
-                .ttype          = NULL_POINTER,
-                .clk_id         = CLOCK_REALTIME,
-                .flags          = 0,
-                .sec            = 0,
-                .nsec           = 500000000, // 500msec
-                .ret            = EFAULT,
-                .err            = 0,
-        },
+	{ // caseXX
+		.ttype	  = NULL_POINTER,
+		.clk_id	 = CLOCK_REALTIME,
+		.flags	  = 0,
+		.sec	    = 0,
+		.nsec	   = 500000000, // 500msec
+		.ret	    = EFAULT,
+		.err	    = 0,
+	},
 #endif
 };
 
@@ -260,23 +253,23 @@
 #define MAX_MSEC_DIFF   20
 
 static int chk_difftime(struct timespec *bef, struct timespec *aft,
-                        time_t sec, long nsec)
+			time_t sec, long nsec)
 {
-        struct timespec t;
-        time_t expect;
-        time_t result;
+	struct timespec t;
+	time_t expect;
+	time_t result;
 
-        t.tv_sec = aft->tv_sec - bef->tv_sec;
-        t.tv_nsec = aft->tv_nsec - bef->tv_nsec;
-        if (t.tv_nsec < 0) {
-                t.tv_sec -= 1;
-                t.tv_nsec += 1000000000;
-        }
-        expect = (sec * 1000) + (nsec / 1000000);
-        result = (t.tv_sec * 1000) + (t.tv_nsec / 1000000);
-        tst_resm(TINFO,"check sleep time: (min:%ld) < %ld < (max:%ld) (msec)",expect - MAX_MSEC_DIFF, result, expect + MAX_MSEC_DIFF);
-        if (result < expect - MAX_MSEC_DIFF || result > expect + MAX_MSEC_DIFF)
-                return -1;
+	t.tv_sec = aft->tv_sec - bef->tv_sec;
+	t.tv_nsec = aft->tv_nsec - bef->tv_nsec;
+	if (t.tv_nsec < 0) {
+		t.tv_sec -= 1;
+		t.tv_nsec += 1000000000;
+	}
+	expect = (sec * 1000) + (nsec / 1000000);
+	result = (t.tv_sec * 1000) + (t.tv_nsec / 1000000);
+	tst_resm(TINFO,"check sleep time: (min:%ld) < %ld < (max:%ld) (msec)",expect - MAX_MSEC_DIFF, result, expect + MAX_MSEC_DIFF);
+	if (result < expect - MAX_MSEC_DIFF || result > expect + MAX_MSEC_DIFF)
+		return -1;
 	return 0;
 }
 
@@ -290,102 +283,87 @@
  */
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
-        struct timespec beftp, afttp, rq, rm;
-        int rc, range_ok = 1, remain_ok = 1;
-        pid_t pid = 0;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
+	struct timespec beftp, afttp, rq, rm;
+	int rc, range_ok = 1, remain_ok = 1;
+	pid_t pid = 0;
 
 	 /*
-         * Check before sleep time
-         */
-        if (tc->ttype == SEND_SIGINT) {
-                pid = create_sig_proc(500000, SIGINT, UINT_MAX);
-                if (pid < 0)
-                        return 1;
-        }
+	 * Check before sleep time
+	 */
+	if (tc->ttype == SEND_SIGINT) {
+		pid = create_sig_proc(500000, SIGINT, UINT_MAX);
+		if (pid < 0)
+			return 1;
+	}
 
-        /*
-         * Check before sleep time
-         */
-        TEST(rc = clock_gettime(tc->clk_id, &beftp));
-        if (rc < 0) {
-                tst_resm(TFAIL|TTERRNO, "iclock_gettime failed");
-                result = 1;
-                goto EXIT;
-        }
+	/*
+	 * Check before sleep time
+	 */
+	TEST(rc = clock_gettime(tc->clk_id, &beftp));
+	if (rc < 0) {
+		tst_resm(TFAIL|TTERRNO, "iclock_gettime failed");
+		result = 1;
+		goto EXIT;
+	}
 	 /*
-         * Execute system call
-         */
-        rq.tv_sec = tc->sec;
-        rq.tv_nsec = tc->nsec;
-        // !!!CAUTION: 'clock_gettime' returns errno itself
-        errno = 0;
-        if (tc->ttype == NULL_POINTER)
-                TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, NULL, &rm));
-        else
-                TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, &rq, &rm));
-        sys_errno = errno;
-        if (sys_ret != 0)
-                goto TEST_END;
+	 * Execute system call
+	 */
+	rq.tv_sec = tc->sec;
+	rq.tv_nsec = tc->nsec;
+	// !!!CAUTION: 'clock_gettime' returns errno itself
+	errno = 0;
+	if (tc->ttype == NULL_POINTER)
+		TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, NULL, &rm));
+	else
+		TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, &rq, &rm));
+	sys_errno = errno;
+	if (sys_ret != 0)
+		goto TEST_END;
 	
 	 /*
-         * Check after sleep time
-         */
-        TEST(rc = clock_gettime(tc->clk_id, &afttp));
-        if (TEST_RETURN < 0) {
-                EPRINTF("clock_gettime failed.\n");
-                result = 1;
-                goto EXIT;
-        }
+	 * Check after sleep time
+	 */
+	TEST(rc = clock_gettime(tc->clk_id, &afttp));
+	if (TEST_RETURN < 0) {
+		EPRINTF("clock_gettime failed.\n");
+		result = 1;
+		goto EXIT;
+	}
 	range_ok = chk_difftime(&beftp, &afttp, tc->sec, tc->nsec) == 0;
 	/*
-         * Check remaining time
-         */
+	 * Check remaining time
+	 */
 TEST_END:
-        if (tc->ttype == NORMAL || tc->ttype == SEND_SIGINT) {
-                tst_resm(TINFO,"remain time: %ld %ld", rm.tv_sec, rm.tv_nsec);
-                if (tc->ttype == NORMAL)
-                        remain_ok = 1;
-                else
-                        remain_ok = rm.tv_sec != 0 || rm.tv_nsec != 0;
-        }
+	if (tc->ttype == NORMAL || tc->ttype == SEND_SIGINT) {
+		tst_resm(TINFO,"remain time: %ld %ld", rm.tv_sec, rm.tv_nsec);
+		if (tc->ttype == NORMAL)
+			remain_ok = 1;
+		else
+			remain_ok = rm.tv_sec != 0 || rm.tv_nsec != 0;
+	}
 
 	/*
-         * Check results
-         */
-        result |= (sys_ret != tc->ret) || !range_ok || !remain_ok;
-        if (!range_ok)
-                PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,"time range check", range_ok);
-        else
-                PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,"remain time check", remain_ok);
+	 * Check results
+	 */
+	result |= (sys_ret != tc->ret) || !range_ok || !remain_ok;
+	if (!range_ok)
+		PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,
+			"time range check", range_ok);
+	else
+		PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,
+			"remain time check", remain_ok);
 EXIT:
-        if (pid > 0) {
-                int st;
-                TEST(kill(pid, SIGTERM));
-                TEST(wait(&st));
-        }
-        return result;
+	if (pid > 0) {
+		int st;
+		TEST(kill(pid, SIGTERM));
+		TEST(wait(&st));
+	}
+	return result;
 }
 
-
-/*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG");
-        exit(1);
-}
-
-
 /*
  * main()
  */
@@ -394,6 +372,32 @@
 
 int main(int ac, char **av) {
 	int result = RESULT_OK;
+<<<<<<< HEAD
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
+
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+
+		Tst_count = 0;
+
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO,"(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO,"(case%02d) END => %s",
+					i, (ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
+=======
         int c;
         int i;
         int lc;                 /* loop counter */
@@ -428,7 +432,7 @@
                 		        break;
 		                default:
                 		        usage(progname);
-                        		// NOTREACHED
+                        		
                 		}
 		        }
 
@@ -436,7 +440,7 @@
 		if (ac != optind) {
         	        tst_resm(TINFO,"Options are not match.");
                 	usage(progname);
-                	// NOTREACHED
+                	
 	        }
 
 		/*
@@ -449,26 +453,23 @@
 	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
 	                result |= ret;
         	}
+>>>>>>> master
 		
-		/*
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "clock_nanosleep call succeeded");
-		                break;
+			switch (result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "clock_nanosleep call succeeded");
+				break;
 
-	        default:
-                 	   	tst_resm(TFAIL, "clock_nanosleep failed");
-        		        tst_resm(TINFO,"NG");
-				cleanup();
-				tst_exit();
-		                break;
-        	}
+			default:
+	 	   		tst_brkm(TFAIL|TERRNO, cleanup, "clock_nanosleep failed");
+				break;
+			}
 
-                }
-        }	
-        cleanup();
+		}
+
+	}
+
+	cleanup();
 	tst_exit();
-}
 
+}
diff --git a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
index c144ae7..9300ba3 100644
--- a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
+++ b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
@@ -126,7 +126,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/clone/clone01.c b/testcases/kernel/syscalls/clone/clone01.c
index 2ac5730..b9c71b7 100644
--- a/testcases/kernel/syscalls/clone/clone01.c
+++ b/testcases/kernel/syscalls/clone/clone01.c
@@ -98,9 +98,15 @@
 	int status, child_pid;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -142,7 +148,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/clone/clone02.c b/testcases/kernel/syscalls/clone/clone02.c
index 0be65fd..c313cd8 100644
--- a/testcases/kernel/syscalls/clone/clone02.c
+++ b/testcases/kernel/syscalls/clone/clone02.c
@@ -163,7 +163,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -237,7 +241,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/clone/clone03.c b/testcases/kernel/syscalls/clone/clone03.c
index e527341..367b91c 100644
--- a/testcases/kernel/syscalls/clone/clone03.c
+++ b/testcases/kernel/syscalls/clone/clone03.c
@@ -100,7 +100,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -164,7 +168,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/clone/clone04.c b/testcases/kernel/syscalls/clone/clone04.c
index a3d1c5b..bfa0cf6 100644
--- a/testcases/kernel/syscalls/clone/clone04.c
+++ b/testcases/kernel/syscalls/clone/clone04.c
@@ -106,9 +106,15 @@
 	void *test_stack;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -151,7 +157,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/clone/clone05.c b/testcases/kernel/syscalls/clone/clone05.c
index 8f4ee99..5d40574 100644
--- a/testcases/kernel/syscalls/clone/clone05.c
+++ b/testcases/kernel/syscalls/clone/clone05.c
@@ -97,9 +97,15 @@
 	void *child_stack;	/* stack for child */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -138,7 +144,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/clone/clone06.c b/testcases/kernel/syscalls/clone/clone06.c
index 53d1630..77f8e4f 100644
--- a/testcases/kernel/syscalls/clone/clone06.c
+++ b/testcases/kernel/syscalls/clone/clone06.c
@@ -105,9 +105,15 @@
 	char buff[MAX_LINE_LENGTH];
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -170,7 +176,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/clone/clone07.c b/testcases/kernel/syscalls/clone/clone07.c
index 184bbc0..86ed479 100644
--- a/testcases/kernel/syscalls/clone/clone07.c
+++ b/testcases/kernel/syscalls/clone/clone07.c
@@ -104,9 +104,15 @@
 	void *child_stack;	/* stack for child */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
diff --git a/testcases/kernel/syscalls/close/close01.c b/testcases/kernel/syscalls/close/close01.c
index 118916c..84e4ad1 100644
--- a/testcases/kernel/syscalls/close/close01.c
+++ b/testcases/kernel/syscalls/close/close01.c
@@ -95,8 +95,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -148,7 +152,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test
diff --git a/testcases/kernel/syscalls/close/close02.c b/testcases/kernel/syscalls/close/close02.c
index 414658f..465e5bd 100644
--- a/testcases/kernel/syscalls/close/close02.c
+++ b/testcases/kernel/syscalls/close/close02.c
@@ -75,8 +75,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -108,7 +112,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test
diff --git a/testcases/kernel/syscalls/close/close08.c b/testcases/kernel/syscalls/close/close08.c
index 42fb60f..7a4444a 100644
--- a/testcases/kernel/syscalls/close/close08.c
+++ b/testcases/kernel/syscalls/close/close08.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/connect/connect01.c b/testcases/kernel/syscalls/connect/connect01.c
index 6c92cbd..819c5b4 100644
--- a/testcases/kernel/syscalls/connect/connect01.c
+++ b/testcases/kernel/syscalls/connect/connect01.c
@@ -128,7 +128,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -171,7 +175,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}		/* End main */
+ }		/* End main */
 
 pid_t pid;
 
diff --git a/testcases/kernel/syscalls/creat/creat01.c b/testcases/kernel/syscalls/creat/creat01.c
index 1c34f2b..a8b15ff 100644
--- a/testcases/kernel/syscalls/creat/creat01.c
+++ b/testcases/kernel/syscalls/creat/creat01.c
@@ -94,7 +94,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* set "tstdir", and "testfile" variables */
@@ -126,7 +130,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * functest1() - check the functionality of the first test by making sure
@@ -151,7 +155,7 @@
 
 	if (stat(filename, &buf) < 0) {
 		tst_brkm(TBROK, cleanup, "failed to stat test file");
-	 /*NOTREACHED*/}
+	 }
 	if (buf.st_size != 0) {
 		tst_resm(TFAIL, "creat() FAILED to truncate "
 			 "file to zero bytes");
@@ -167,7 +171,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/creat/creat03.c b/testcases/kernel/syscalls/creat/creat03.c
index a6e5b04..0a63b8d 100644
--- a/testcases/kernel/syscalls/creat/creat03.c
+++ b/testcases/kernel/syscalls/creat/creat03.c
@@ -70,8 +70,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -86,7 +90,7 @@
 		if (TEST_RETURN == -1) {
 			tst_resm(TFAIL, "Cannot creat %s", pfilname);
 			continue;
-		 /*NOTREACHED*/}
+		 }
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (fstat(TEST_RETURN, &statbuf) == -1) {
@@ -112,7 +116,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test
diff --git a/testcases/kernel/syscalls/creat/creat04.c b/testcases/kernel/syscalls/creat/creat04.c
index 5c5c68d..620f82f 100644
--- a/testcases/kernel/syscalls/creat/creat04.c
+++ b/testcases/kernel/syscalls/creat/creat04.c
@@ -98,7 +98,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -194,7 +198,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -203,7 +207,7 @@
 {
 	/* The test must be run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/creat/creat05.c b/testcases/kernel/syscalls/creat/creat05.c
index f20a0c9..6ae3ad4 100644
--- a/testcases/kernel/syscalls/creat/creat05.c
+++ b/testcases/kernel/syscalls/creat/creat05.c
@@ -78,7 +78,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -112,7 +116,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -148,7 +152,7 @@
 	max_open = getdtablesize();
 	/* Allocate memory for stat and ustat structure variables */
 	if ((buf = (int *)malloc(sizeof(int) * max_open - first)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	/* now open as many files as we can up to max_open */
diff --git a/testcases/kernel/syscalls/creat/creat06.c b/testcases/kernel/syscalls/creat/creat06.c
index c80757e..30c3892 100644
--- a/testcases/kernel/syscalls/creat/creat06.c
+++ b/testcases/kernel/syscalls/creat/creat06.c
@@ -135,7 +135,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -172,7 +176,7 @@
 
 	return 0;
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -183,7 +187,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/creat/creat07.c b/testcases/kernel/syscalls/creat/creat07.c
index 948077a..03db086 100644
--- a/testcases/kernel/syscalls/creat/creat07.c
+++ b/testcases/kernel/syscalls/creat/creat07.c
@@ -84,7 +84,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	if (!Fflag) {
@@ -164,7 +168,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * help() - Prints out the help message for the -F option defined
@@ -198,12 +202,12 @@
 		path = dname;
 	else {
 		if ((pwd = getcwd(NULL, 0)) == NULL) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "Could not get current directory");
 		}
 		path = malloc(strlen(pwd) + strlen(dname) + 2);
 		if (path == NULL) {
-			tst_brkm(TBROK, tst_exit, "Cannot alloc path string");
+			tst_brkm(TBROK, NULL, "Cannot alloc path string");
 		}
 		sprintf(path, "%s/%s", pwd, dname);
 	}
@@ -215,14 +219,14 @@
 	 */
 	cmd = malloc(strlen(path) + strlen(bname) + 15);
 	if (cmd == NULL) {
-		tst_brkm(TBROK, tst_exit, "Cannot alloc command string");
+		tst_brkm(TBROK, NULL, "Cannot alloc command string");
 	}
 
 	sprintf(cmd, "cp -p %s/%s .", path, bname);
 	res = system(cmd);
 	free(cmd);
 	if (res == -1) {
-		tst_brkm(TBROK, tst_exit, "Cannot copy file %s", fname);
+		tst_brkm(TBROK, NULL, "Cannot copy file %s", fname);
 	}
 
 	fname = bname;
diff --git a/testcases/kernel/syscalls/creat/creat08.c b/testcases/kernel/syscalls/creat/creat08.c
index 4a7bbad..cc502d7 100644
--- a/testcases/kernel/syscalls/creat/creat08.c
+++ b/testcases/kernel/syscalls/creat/creat08.c
@@ -97,7 +97,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (issu() != 0) {
 		tst_resm(TINFO, "Must be root to run this test.");
diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c
index 2c10f03..a96ef11 100644
--- a/testcases/kernel/syscalls/creat/creat09.c
+++ b/testcases/kernel/syscalls/creat/creat09.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/dup/dup06.c b/testcases/kernel/syscalls/dup/dup06.c
index 46ee87f..2a884e0 100644
--- a/testcases/kernel/syscalls/dup/dup06.c
+++ b/testcases/kernel/syscalls/dup/dup06.c
@@ -77,7 +77,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* pick up the nofiles */
 	min = getdtablesize();
diff --git a/testcases/kernel/syscalls/dup/dup07.c b/testcases/kernel/syscalls/dup/dup07.c
index 5e14457..e16b6b4 100644
--- a/testcases/kernel/syscalls/dup/dup07.c
+++ b/testcases/kernel/syscalls/dup/dup07.c
@@ -70,7 +70,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	local_flag = PASSED;
 
diff --git a/testcases/kernel/syscalls/dup2/dup201.c b/testcases/kernel/syscalls/dup2/dup201.c
index 7c3665a..55b6305 100644
--- a/testcases/kernel/syscalls/dup2/dup201.c
+++ b/testcases/kernel/syscalls/dup2/dup201.c
@@ -110,7 +110,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -160,7 +164,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/dup2/dup202.c b/testcases/kernel/syscalls/dup2/dup202.c
index 3e8cc77..f7d0479 100644
--- a/testcases/kernel/syscalls/dup2/dup202.c
+++ b/testcases/kernel/syscalls/dup2/dup202.c
@@ -158,7 +158,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/dup2/dup203.c b/testcases/kernel/syscalls/dup2/dup203.c
index e540850..363f5d6 100644
--- a/testcases/kernel/syscalls/dup2/dup203.c
+++ b/testcases/kernel/syscalls/dup2/dup203.c
@@ -69,7 +69,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -90,31 +94,31 @@
 
 		if ((fd0 = creat(filename0, 0666)) == -1) {
 			tst_brkm(TBROK, cleanup, "cannot create first file");
-		 /*NOTREACHED*/}
+		 }
 		if (write(fd0, filename0, strlen(filename0)) == -1) {
 			tst_brkm(TBROK, cleanup, "filename0: write(2) failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd1 = creat(filename1, 0666)) == -1) {
 			tst_brkm(TBROK, cleanup, "Cannot create second file");
-		 /*NOTREACHED*/}
+		 }
 		if (write(fd1, filename1, strlen(filename1)) == -1) {
 			tst_brkm(TBROK, cleanup, "filename1: write(2) failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (close(fd0) == -1) {
 			tst_brkm(TBROK, cleanup, "close(2) fd0 failed");
-		 /*NOTREACHED*/}
+		 }
 		if ((fd0 = open(filename0, O_RDONLY)) == -1) {
 			tst_brkm(TBROK, cleanup, "open(2) on filename0 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (close(fd1) == -1) {
 			tst_brkm(TBROK, cleanup, "close(2) fd1 failed");
-		 /*NOTREACHED*/}
+		 }
 		if ((fd1 = open(filename1, O_RDONLY)) == -1) {
 			tst_brkm(TBROK, cleanup, "open(2) on filename1 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		TEST(dup2(fd0, fd1));
 
@@ -129,7 +133,7 @@
 			memset(buf, 0, sizeof(buf));
 			if (read(fd2, buf, sizeof(buf)) == -1) {
 				tst_brkm(TBROK, cleanup, "read(2) failed");
-			 /*NOTREACHED*/}
+			 }
 			if (strcmp(buf, filename0) != 0) {
 				tst_resm(TFAIL, "read from file got bad data");
 			}
@@ -155,19 +159,19 @@
 
 		if ((fd0 = creat(filename0, 0666)) == -1) {
 			tst_brkm(TBROK, cleanup, "Cannot create first file");
-		 /*NOTREACHED*/}
+		 }
 		if (fcntl(fd0, F_SETFD, 1) == -1) {
 			tst_brkm(TBROK, cleanup, "setting close on exec flag "
 				 "on fd0 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd2 = creat(filename1, 0666)) == -1) {
 			tst_brkm(TBROK, cleanup, "Cannot create second file");
-		 /*NOTREACHED*/}
+		 }
 
 		if (close(fd2) == -1) {
 			tst_brkm(TBROK, cleanup, "close(2) fd_closed failed");
-		 /*NOTREACHED*/}
+		 }
 
 		TEST(dup2(fd0, fd2));
 
@@ -183,11 +187,11 @@
 				tst_resm(TFAIL, "fcntl F_GETFD on fd1 failed - "
 					 "Expected rval of 0, got %d", rval);
 				break;
-			 /*NOTREACHED*/}
+			 }
 			if (!((rval = fcntl(fd0, F_GETFL, 0)) && O_WRONLY)) {
 				tst_resm(TFAIL, "fctnl F_GETFL bad rval on fd0 "
 					 "Expected 1 got %#x", rval);
-			 /*NOTREACHED*/}
+			 }
 			tst_resm(TPASS, "dup2 test 2 functionality is correct");
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -201,7 +205,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/dup2/dup204.c b/testcases/kernel/syscalls/dup2/dup204.c
index 990f87b..aadfdb4 100644
--- a/testcases/kernel/syscalls/dup2/dup204.c
+++ b/testcases/kernel/syscalls/dup2/dup204.c
@@ -67,7 +67,11 @@
 	struct stat oldbuf, newbuf;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -116,7 +120,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/dup2/dup205.c b/testcases/kernel/syscalls/dup2/dup205.c
index b731d59..9846bac 100644
--- a/testcases/kernel/syscalls/dup2/dup205.c
+++ b/testcases/kernel/syscalls/dup2/dup205.c
@@ -67,7 +67,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 /*--------------------------------------------------------------------*/
 	local_flag = PASSED;
diff --git a/testcases/kernel/syscalls/dup3/dup3_01.c b/testcases/kernel/syscalls/dup3/dup3_01.c
index f8d7358..4146aaf 100644
--- a/testcases/kernel/syscalls/dup3/dup3_01.c
+++ b/testcases/kernel/syscalls/dup3/dup3_01.c
@@ -73,7 +73,6 @@
 
 /* Global Variables */
 char *TCID = "dup3_01";		/* test program identifier.              */
-int testno;
 int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
@@ -99,9 +98,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -133,66 +129,42 @@
 int main(int argc, char *argv[])
 {
 	int fd, coe;
-	int lc;			/* loop counter */
-	char *msg;		/* message returned from parse_opts */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
+		tst_brkm(TCONF, cleanup,
 			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
 	}
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			fd = syscall(__NR_dup3, 1, 4, 0);
-			if (fd == -1) {
-				tst_resm(TFAIL, "dup3(0) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if (coe & FD_CLOEXEC) {
-				tst_resm(TFAIL,
-					 "dup3(0) set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-
-			fd = syscall(__NR_dup3, 1, 4, O_CLOEXEC);
-			if (fd == -1) {
-				tst_resm(TFAIL, "dup3(O_CLOEXEC) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if ((coe & FD_CLOEXEC) == 0) {
-				tst_resm(TFAIL,
-					 "dup3(O_CLOEXEC) set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-			tst_resm(TPASS, "dup3(O_CLOEXEC) PASSED");
-			cleanup();
-		}
+	fd = syscall(__NR_dup3, 1, 4, 0);
+	if (fd == -1) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "dup3(0) failed");
 	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+	}
+	if (coe & FD_CLOEXEC) {
+		tst_brkm(TFAIL, cleanup,
+			 "dup3(0) set close-on-exec flag");
+	}
+	close(fd);
+
+	fd = syscall(__NR_dup3, 1, 4, O_CLOEXEC);
+	if (fd == -1) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "dup3(O_CLOEXEC) failed");
+	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+	}
+	if ((coe & FD_CLOEXEC) == 0) {
+		tst_brkm(TFAIL, cleanup,
+			 "dup3(O_CLOEXEC) set close-on-exec flag");
+	}
+	close(fd);
+	tst_resm(TPASS, "dup3(O_CLOEXEC) PASSED");
+
+	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/epoll/epoll-ltp.c b/testcases/kernel/syscalls/epoll/epoll-ltp.c
index dc07fb1..909b226 100644
--- a/testcases/kernel/syscalls/epoll/epoll-ltp.c
+++ b/testcases/kernel/syscalls/epoll/epoll-ltp.c
@@ -220,16 +220,14 @@
 	num_epoll_create_test_calls++;
 	epoll_fd = epoll_create(fd_set_size);
 	if (epoll_fd >= 0) {
-		tst_resm(TFAIL,
-			 "epoll_create with negative set size returned a valid fd (errno = %d:%s)",
-			 errno, strerror(errno));
+		tst_resm(TFAIL|TERRNO,
+			 "epoll_create with negative set size succeeded unexpectedly");
 		num_epoll_create_test_fails++;
 		close(epoll_fd);
 	} else {
 		if (errno != EINVAL) {
-			tst_resm(TFAIL,
-				 "epoll_create with negative set size failed to set errno to EINVAL (%d:%s)",
-				 errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO,
+				 "epoll_create with negative set size didn't set errno to EINVAL");
 			num_epoll_create_test_fails++;
 		} else {
 			tst_resm(TPASS, "epoll_create with negative set size");
@@ -618,7 +616,7 @@
 						/* Now test the result */
 						if (!((result == RES_PASS)
 						      || (result == RES_PASS_RETV_MAT_ERRNO_IGN))) {
-							if (result > sizeof(result_strings) / sizeof(const char *)) {
+							if (result > (sizeof(result_strings) / sizeof(const char *))) {
 							/* Returned a result which has no corresponding text description */
 								EPOLL_CTL_TEST_FAIL
 								    ("FIXME FIX ME BUG in Test Program itself!");
@@ -660,8 +658,7 @@
 
 	/* Get the current time */
 	if (gettimeofday(&tv, NULL) != 0) {
-		tst_brkm(TBROK, NULL, "gettimeofday failed");
-		tst_exit();
+		tst_brkm(TBROK|TERRNO, NULL, "gettimeofday failed");
 	} else {
 		tst_resm(TINFO, "gettimeofday() works");
 	}
@@ -680,7 +677,7 @@
 	/* Create an epoll_fd for testing epoll_ctl */
 	epoll_fd = epoll_create(BACKING_STORE_SIZE_HINT);
 	if (epoll_fd < 0) {
-		return -1;
+		tst_brkm(TFAIL|TERRNO, NULL, "epoll_create failed");
 	}
 
 	tst_resm(TINFO, "Testing epoll_ctl");
@@ -689,15 +686,14 @@
 		/* ctl test(s) failed */
 	}
 
-	return 0;
+	tst_exit();
 }
 
 #else
 
 int main(void)
 {
-	tst_resm(TCONF, "No epoll support found.");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "No epoll support found.");
 }
 
 #endif
diff --git a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
index cb5092d..e8e0f5c 100644
--- a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
+++ b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
@@ -77,7 +77,6 @@
 
 /* Global Variables */
 char *TCID = "epoll_create1_01";	/* test program identifier.              */
-int testno;
 int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
@@ -103,9 +102,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -137,66 +133,44 @@
 int main(int argc, char *argv[])
 {
 	int fd, coe;
-	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 	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();
 
 	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			fd = syscall(__NR_epoll_create1, 0);
-			if (fd == -1) {
-				tst_resm(TFAIL, "epoll_create1(0) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if (coe & FD_CLOEXEC) {
-				tst_resm(TFAIL,
-					 "epoll_create1(0) set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-			fd = syscall(__NR_epoll_create1, EPOLL_CLOEXEC);
-			if (fd == -1) {
-				tst_resm(TFAIL,
-					 "epoll_create1(EPOLL_CLOEXEC) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if ((coe & FD_CLOEXEC) == 0) {
-				tst_resm(TFAIL,
-					 "epoll_create1(EPOLL_CLOEXEC) set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-			tst_resm(TPASS, "epoll_create1(EPOLL_CLOEXEC) PASSED");
-			cleanup();
-		}
+	fd = syscall(__NR_epoll_create1, 0);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup, "epoll_create1(0) failed");
 	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if (coe & FD_CLOEXEC) {
+		tst_brkm(TFAIL, cleanup,
+			 "epoll_create1(0) set close-on-exec flag");
+	}
+	close(fd);
+	fd = syscall(__NR_epoll_create1, EPOLL_CLOEXEC);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup,
+			 "epoll_create1(EPOLL_CLOEXEC) failed");
+	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if ((coe & FD_CLOEXEC) == 0) {
+		tst_brkm(TFAIL, cleanup,
+			 "epoll_create1(EPOLL_CLOEXEC) set close-on-exec flag");
+	}
+	close(fd);
+	tst_resm(TPASS, "epoll_create1(EPOLL_CLOEXEC) PASSED");
+
+	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index ce55746..ab4eb5a 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -671,11 +671,11 @@
 	int fd;
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -729,7 +729,7 @@
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	if (tst_kvercmp(2, 6, 22) < 0)
-		tst_brkm(TCONF, tst_exit, "2.6.22 or greater kernel required");
+		tst_brkm(TCONF, NULL, "2.6.22 or greater kernel required");
 
 	/* Create a temporary directory & chdir there */
 	tst_tmpdir();
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
index cde8fc3..059d345 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
@@ -102,9 +102,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -136,66 +133,40 @@
 int main(int argc, char *argv[])
 {
 	int fd, coe;
-	int lc;			/* loop counter */
-	char *msg;		/* message returned from parse_opts */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
-			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
+		tst_brkm(TCONF, cleanup,
+		    "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			fd = syscall(__NR_eventfd2, 1, 0);
-			if (fd == -1) {
-				tst_resm(TFAIL, "eventfd2(0) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if (coe & FD_CLOEXEC) {
-				tst_resm(TFAIL,
-					 "eventfd2(0) set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-
-			fd = syscall(__NR_eventfd2, 1, EFD_CLOEXEC);
-			if (fd == -1) {
-				tst_resm(TFAIL, "eventfd2(EFD_CLOEXEC) failed");
-				cleanup();
-				tst_exit();
-			}
-			coe = fcntl(fd, F_GETFD);
-			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if ((coe & FD_CLOEXEC) == 0) {
-				tst_resm(TFAIL,
-					 "eventfd2(EFD_CLOEXEC) does not set close-on-exec flag");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-			tst_resm(TPASS, "eventfd2(EFD_CLOEXEC) Passed");
-			cleanup();
-		}
+	fd = syscall(__NR_eventfd2, 1, 0);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup, "eventfd2(0) failed");
 	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if (coe & FD_CLOEXEC) {
+		tst_brkm(TFAIL, cleanup, "eventfd2(0) set close-on-exec flag");
+	}
+	close(fd);
+
+	fd = syscall(__NR_eventfd2, 1, EFD_CLOEXEC);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup, "eventfd2(EFD_CLOEXEC) failed");
+	}
+	coe = fcntl(fd, F_GETFD);
+	if (coe == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if ((coe & FD_CLOEXEC) == 0) {
+		tst_brkm(TFAIL, cleanup,
+			 "eventfd2(EFD_CLOEXEC) does not set close-on-exec flag");
+	}
+	close(fd);
+	tst_resm(TPASS, "eventfd2(EFD_CLOEXEC) Passed");
+	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
index 6a89110..5fb5259 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
@@ -99,9 +99,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -133,67 +130,43 @@
 int main(int argc, char *argv[])
 {
 	int fd, fl;
-	int lc;			/* loop counter */
-	char *msg;		/* message returned from parse_opts */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
-			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
+		tst_brkm(TCONF, NULL,
+		    "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			fd = syscall(__NR_eventfd2, 1, 0);
-			if (fd == -1) {
-				tst_resm(TFAIL, "eventfd2(0) failed");
-				cleanup();
-				tst_exit();
-			}
-			fl = fcntl(fd, F_GETFL);
-			if (fl == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if (fl & O_NONBLOCK) {
-				tst_resm(TFAIL,
-					 "eventfd2(0) sets non-blocking mode");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-
-			fd = syscall(__NR_eventfd2, 1, EFD_NONBLOCK);
-			if (fd == -1) {
-				tst_resm(TFAIL,
-					 "eventfd2(EFD_NONBLOCK) failed");
-				cleanup();
-				tst_exit();
-			}
-			fl = fcntl(fd, F_GETFL);
-			if (fl == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
-			}
-			if ((fl & O_NONBLOCK) == 0) {
-				tst_resm(TFAIL,
-					 "eventfd2(EFD_NONBLOCK) does not set non-blocking mode");
-				cleanup();
-				tst_exit();
-			}
-			close(fd);
-			tst_resm(TPASS, "eventfd2(EFD_NONBLOCK) PASSED");
-			cleanup();
-		}
+	Tst_count = 0;
+	fd = syscall(__NR_eventfd2, 1, 0);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup, "eventfd2(0) failed");
 	}
+	fl = fcntl(fd, F_GETFL);
+	if (fl == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if (fl & O_NONBLOCK) {
+		tst_brkm(TFAIL, cleanup,
+		    "eventfd2(0) sets non-blocking mode");
+	}
+	close(fd);
+
+	fd = syscall(__NR_eventfd2, 1, EFD_NONBLOCK);
+	if (fd == -1) {
+		tst_brkm(TFAIL, cleanup, "eventfd2(EFD_NONBLOCK) failed");
+	}
+	fl = fcntl(fd, F_GETFL);
+	if (fl == -1) {
+		tst_brkm(TBROK, cleanup, "fcntl failed");
+	}
+	if ((fl & O_NONBLOCK) == 0) {
+		tst_brkm(TFAIL, cleanup,
+			 "eventfd2(EFD_NONBLOCK) didn't set non-blocking mode");
+	}
+	close(fd);
+	tst_resm(TPASS, "eventfd2(EFD_NONBLOCK) PASSED");
+
+	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/execl/execl01.c b/testcases/kernel/syscalls/execl/execl01.c
index 66e54fa..cd97588 100644
--- a/testcases/kernel/syscalls/execl/execl01.c
+++ b/testcases/kernel/syscalls/execl/execl01.c
@@ -144,7 +144,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/execle/execle01.c b/testcases/kernel/syscalls/execle/execle01.c
index 61c1be7..e7305a4 100644
--- a/testcases/kernel/syscalls/execle/execle01.c
+++ b/testcases/kernel/syscalls/execle/execle01.c
@@ -145,7 +145,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/execlp/execlp01.c b/testcases/kernel/syscalls/execlp/execlp01.c
index c83eb06..6a41247 100644
--- a/testcases/kernel/syscalls/execlp/execlp01.c
+++ b/testcases/kernel/syscalls/execlp/execlp01.c
@@ -144,7 +144,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/execv/execv01.c b/testcases/kernel/syscalls/execv/execv01.c
index d2067aa..ff6dab3 100644
--- a/testcases/kernel/syscalls/execv/execv01.c
+++ b/testcases/kernel/syscalls/execv/execv01.c
@@ -145,7 +145,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/execve/execve01.c b/testcases/kernel/syscalls/execve/execve01.c
index 490802e..efe31ee 100644
--- a/testcases/kernel/syscalls/execve/execve01.c
+++ b/testcases/kernel/syscalls/execve/execve01.c
@@ -146,7 +146,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/execve/execve02.c b/testcases/kernel/syscalls/execve/execve02.c
index 3e6b2f2..8aa0ce5 100644
--- a/testcases/kernel/syscalls/execve/execve02.c
+++ b/testcases/kernel/syscalls/execve/execve02.c
@@ -95,8 +95,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	if (!Fflag) {
 		tst_resm(TWARN, "You must specify a test executable with"
@@ -164,7 +168,7 @@
 		}
 	}
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -185,7 +189,7 @@
 	int res;
 
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
@@ -207,12 +211,12 @@
 		path = dname;
 	else {
 		if ((pwd = getcwd(NULL, 0)) == NULL) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "Could not get current directory");
 		}
 		path = malloc(strlen(pwd) + strlen(dname) + 2);
 		if (path == NULL) {
-			tst_brkm(TBROK, tst_exit, "Cannot alloc path string");
+			tst_brkm(TBROK, NULL, "Cannot alloc path string");
 		}
 		sprintf(path, "%s/%s", pwd, dname);
 	}
@@ -224,14 +228,14 @@
 	 */
 	cmd = malloc(strlen(path) + strlen(bname) + 15);
 	if (cmd == NULL) {
-		tst_brkm(TBROK, tst_exit, "Cannot alloc command string");
+		tst_brkm(TBROK, NULL, "Cannot alloc command string");
 	}
 
 	sprintf(cmd, "cp -p %s/%s .", path, bname);
 	res = system(cmd);
 	free(cmd);
 	if (res == -1) {
-		tst_brkm(TBROK, tst_exit, "Cannot copy file %s", fname);
+		tst_brkm(TBROK, NULL, "Cannot copy file %s", fname);
 	}
 
 	fname = bname;
diff --git a/testcases/kernel/syscalls/execve/execve03.c b/testcases/kernel/syscalls/execve/execve03.c
index 5855169..575eb2f 100644
--- a/testcases/kernel/syscalls/execve/execve03.c
+++ b/testcases/kernel/syscalls/execve/execve03.c
@@ -132,7 +132,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -171,7 +175,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/execve/execve04.c b/testcases/kernel/syscalls/execve/execve04.c
index 1b2f676..729c8fd 100644
--- a/testcases/kernel/syscalls/execve/execve04.c
+++ b/testcases/kernel/syscalls/execve/execve04.c
@@ -101,7 +101,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_1, "nS", 1, &test_name);
@@ -199,7 +203,7 @@
 		}
 	}
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -235,12 +239,12 @@
 		path = dname;
 	else {
 		if ((pwd = getcwd(NULL, 0)) == NULL) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "Could not get current directory");
 		}
 		path = malloc(strlen(pwd) + strlen(dname) + 2);
 		if (path == NULL) {
-			tst_brkm(TBROK, tst_exit, "Cannot alloc path string");
+			tst_brkm(TBROK, NULL, "Cannot alloc path string");
 		}
 		sprintf(path, "%s/%s", pwd, dname);
 	}
@@ -252,14 +256,14 @@
 	 */
 	cmd = malloc(strlen(path) + strlen(bname) + 15);
 	if (cmd == NULL) {
-		tst_brkm(TBROK, tst_exit, "Cannot alloc command string");
+		tst_brkm(TBROK, NULL, "Cannot alloc command string");
 	}
 
 	sprintf(cmd, "cp -p %s/%s .", path, bname);
 	res = system(cmd);
 	free(cmd);
 	if (res == -1) {
-		tst_brkm(TBROK, tst_exit, "Cannot copy file %s", test_name);
+		tst_brkm(TBROK, NULL, "Cannot copy file %s", test_name);
 	}
 
 	test_name = bname;
diff --git a/testcases/kernel/syscalls/execve/execve05.c b/testcases/kernel/syscalls/execve/execve05.c
index 682a764..5e9dc56 100644
--- a/testcases/kernel/syscalls/execve/execve05.c
+++ b/testcases/kernel/syscalls/execve/execve05.c
@@ -80,14 +80,18 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 	setup();
 
 	if (ac != 5) {
 		tst_resm(TINFO, "Wrong number of arguments");
 		usage();
-	 /*NOTREACHED*/}
+	 }
 
 	/* check looping state if -i option given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -207,7 +211,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/execvp/execvp01.c b/testcases/kernel/syscalls/execvp/execvp01.c
index 64cc00e..d81a702 100644
--- a/testcases/kernel/syscalls/execvp/execvp01.c
+++ b/testcases/kernel/syscalls/execvp/execvp01.c
@@ -145,7 +145,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/exit/exit01.c b/testcases/kernel/syscalls/exit/exit01.c
index 37f870b..8221415 100644
--- a/testcases/kernel/syscalls/exit/exit01.c
+++ b/testcases/kernel/syscalls/exit/exit01.c
@@ -63,7 +63,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, cleanup, "OPTION PARSIkNG ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	 }
 
 	setup();		/* global setup for test */
 
@@ -126,7 +126,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/exit/exit02.c b/testcases/kernel/syscalls/exit/exit02.c
index 438b06c..cb9ce48 100644
--- a/testcases/kernel/syscalls/exit/exit02.c
+++ b/testcases/kernel/syscalls/exit/exit02.c
@@ -79,8 +79,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup for test */
 
@@ -178,7 +182,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/exit_group/exit_group01.c b/testcases/kernel/syscalls/exit_group/exit_group01.c
index 1145224..9616819 100644
--- a/testcases/kernel/syscalls/exit_group/exit_group01.c
+++ b/testcases/kernel/syscalls/exit_group/exit_group01.c
@@ -79,9 +79,6 @@
         /* Remove tmp dir and all files in it */
         TEST_CLEANUP;
         tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
 }
 
 /* Local  Functions */
@@ -112,45 +109,28 @@
 int main(int ac, char **av) {
         int status;
         pid_t cpid, w;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
-	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
 
         setup();
 
         /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-                     
-		     TEST(cpid = fork());     //call exit_group()
-                     if (TEST_RETURN == -1) {
-        			tst_resm(TFAIL, "fork() error ...errno %d",TEST_ERRNO);
-                        	cleanup();
-				tst_exit();
-                     } else if (TEST_RETURN == 0) {
-	                 	tst_resm(TINFO, "In the child process");
-                           	sleep(5);
-				TEST(syscall(__NR_exit_group,4));
-                     }else {
-				tst_resm(TINFO,"in the parent process");
-				TEST(w = wait(&status));
-				if (WIFEXITED(status) && (WEXITSTATUS(status) == 4)) {
-		                       tst_resm(TPASS,"exit_group call Succeed");
-		                        cleanup();
-		                }
-			  }
-			tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-                        cleanup();
-                        tst_exit();
-
+	cpid = fork();     //call exit_group()
+	if (cpid == -1) {
+        	tst_brkm(TFAIL|TERRNO, cleanup, "fork failed");
+	} else if (TEST_RETURN == 0) {
+		sleep(5);
+		TEST(syscall(__NR_exit_group,4));
+	} else {
+		w = wait(&status);
+		if (w == -1)
+			tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+		if (WIFEXITED(status) && (WEXITSTATUS(status) == 4))
+			tst_resm(TPASS, "exit_group succeeded");
+		else {
+			tst_resm(TFAIL|TERRNO,
+			    "exit_group failed (wait status = %d)", w);
                 }
         }	
+	cleanup();
         tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
index 5e00e4a..907dd16 100644
--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
@@ -99,7 +99,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise01.c b/testcases/kernel/syscalls/fadvise/posix_fadvise01.c
index 1b62633..a040903 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise01.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise01.c
@@ -96,7 +96,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise02.c b/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
index cd1fa82..311175d 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
@@ -96,7 +96,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise03.c b/testcases/kernel/syscalls/fadvise/posix_fadvise03.c
index b1d265a..92f3e92 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise03.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise03.c
@@ -116,7 +116,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise04.c b/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
index 5c83195..bfa554c 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
@@ -102,7 +102,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
index afc1391..f456c33 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
@@ -226,7 +226,11 @@
 	* parse standard options
 	***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/* perform global test setup, call setup() function. */
 	setup();
diff --git a/testcases/kernel/syscalls/fallocate/fallocate02.c b/testcases/kernel/syscalls/fallocate/fallocate02.c
index ddba28a..74b5787 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate02.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate02.c
@@ -275,7 +275,11 @@
 	     * parse standard options
      	***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/* perform global test setup, call setup() function. */
 	setup();
diff --git a/testcases/kernel/syscalls/fallocate/fallocate03.c b/testcases/kernel/syscalls/fallocate/fallocate03.c
index 24f6804..dcbeada 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate03.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate03.c
@@ -261,7 +261,11 @@
 	 * parse standard options
 	***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/* perform global test setup, call setup() function */
 	setup();
diff --git a/testcases/kernel/syscalls/fchdir/fchdir01.c b/testcases/kernel/syscalls/fchdir/fchdir01.c
index 482bd92..0a92b28 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir01.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir01.c
@@ -58,9 +58,10 @@
 #include "test.h"
 #include "usctest.h"
 
-#include <errno.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <fcntl.h>
+#include <libgen.h>
 #include <string.h>
 
 void cleanup(void);
@@ -84,9 +85,8 @@
 	int r_val;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
@@ -98,8 +98,7 @@
 
 		/* get the name of the test dirctory */
 		if ((temp_dir = (getcwd(temp_dir, 0))) == NULL) {
-			tst_brkm(TBROK, cleanup, "%s - getcwd() in main() "
-				 "failed", TCID);
+			tst_brkm(TBROK, cleanup, "getcwd failed");
 		}
 
 		/*
@@ -107,8 +106,7 @@
 		 */
 
 		if ((r_val = mkdir(TEST_DIR, MODES)) == -1) {
-			tst_brkm(TBROK, cleanup, "%s - mkdir() in main() "
-				 "failed", TCID);
+			tst_brkm(TBROK, cleanup, "mkdir failed");
 		}
 
 		if ((fd = open(TEST_DIR, O_RDONLY)) == -1) {
@@ -122,8 +120,7 @@
 		TEST(fchdir(fd));
 
 		if (TEST_RETURN == -1) {
-			tst_brkm(TFAIL, cleanup, "%s call failed - errno = %d :"
-				 " %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_brkm(TFAIL|TTERRNO, cleanup, "fchdir call failed");
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 				check_functionality();
@@ -162,8 +159,7 @@
 	}
 
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -172,35 +168,29 @@
 void check_functionality(void)
 {
 	char *buf = NULL;
-	char **bufptr = &buf;
 	char *dir;
 
 	/*
 	 * Get the current directory path.
 	 */
 	if ((buf = (getcwd(buf, 0))) == NULL) {
-		tst_brkm(TBROK, cleanup, "%s - getcwd() in "
-			 "check_functionality() failed", TCID);
+		tst_brkm(TBROK, cleanup, "getcwd failed");
 	}
 
 	/*
 	 * strip off all but the last directory name in the
 	 * current working directory.
 	 */
-	do {
-		if ((dir = strsep(bufptr, "/")) == NULL) {
-			tst_brkm(TBROK, cleanup, "%s - strsep() in "
-				 "check_functionality() failed", TCID);
-		}
-	} while (*bufptr != NULL);
+	if ((dir = basename(buf)) == NULL)
+		tst_brkm(TBROK, cleanup, "basename failed");
 
 	/*
 	 * Make sure we are in the right place.
 	 */
 	if (strcmp(TEST_DIR, dir) == 0) {
-		tst_resm(TPASS, "%s call succeeded", TCID);
+		tst_resm(TPASS, "fchdir call succeeded");
 	} else {
-		tst_resm(TFAIL, "%s functionality test failed", TCID);
+		tst_resm(TFAIL, "fchdir call failed");
 	}
 }
 
@@ -233,7 +223,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/fchdir/fchdir02.c b/testcases/kernel/syscalls/fchdir/fchdir02.c
index d814a53..cf10a6b 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir02.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir02.c
@@ -76,9 +76,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
@@ -103,19 +102,17 @@
 
 		switch (TEST_ERRNO) {
 		case EBADF:
-			tst_resm(TPASS, "expected failure - errno = %d : %s",
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TPASS, "failed with EBADF");
 			break;
 		default:
-			tst_brkm(TFAIL, cleanup, "call failed with an "
-				 "unexpected error - %d : %s", TEST_ERRNO,
-				 strerror(TEST_ERRNO));
+			tst_brkm(TFAIL|TTERRNO, cleanup,
+			    "call failed with an unexpected error");
 		}
 	}
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -150,7 +147,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/fchdir/fchdir03.c b/testcases/kernel/syscalls/fchdir/fchdir03.c
index e9258d4..7f89137 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir03.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir03.c
@@ -90,9 +90,8 @@
 	int status;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -115,42 +114,47 @@
 			 * TEST call is made.
 			 */
 			if (seteuid(ltpuser1->pw_uid) != 0) {
-				tst_resm(TINFO, "setreuid failed in child #1");
+				perror("setreuid failed in child #1");
 				exit(1);
 			}
 			if (mkdir(good_dir, 00400) != 0) {
-				tst_resm(TINFO, "mkdir failed in child #1");
+				perror("mkdir failed in child #1");
 				exit(1);
 			}
 			if ((fd = open(good_dir, O_RDONLY)) == -1) {
-				tst_brkm(TBROK, cleanup,
-					 "open of directory failed");
+				perror("opening directory failed");
 			}
 
 			TEST(fchdir(fd));
 
 			if (TEST_RETURN != -1) {
-				tst_resm(TFAIL, "call succeeded unexpectedly");
+				printf("Call succeeded unexpectedly\n");
+				exit(1);
 			} else if (TEST_ERRNO != EACCES) {
-				tst_resm(TFAIL, "expected EACCES - got %d",
-					 TEST_ERRNO);
+				printf("Expected %d - got %d\n",
+				    EACCES, TEST_ERRNO);
+				exit(1);
 			} else {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TPASS, "expected failure - errno = %d"
-					 " : %s", TEST_ERRNO,
-					 strerror(TEST_ERRNO));
+				printf("Got EACCES\n");
 			}
 
 			/* reset the process ID to the saved ID (root) */
 			if (setuid(0) == -1) {
-				tst_resm(TINFO, "setuid(0) failed");
+				perror("setuid(0) failed");
 			}
 
-		} else {	/* parent */
-			wait(&status);
-
-			/* let the child carry on */
-			exit(0);
+		} else {
+			if (wait(&status) == -1)
+				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+			else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
+				tst_brkm(TBROK, cleanup,
+				    "child exited abnormally (wait status = "
+				    "%d", status);
+			else {
+				/* let the child carry on */
+				exit(0);
+			}
 		}
 
 		/* clean up things in case we are looping */
@@ -161,7 +165,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -173,7 +177,7 @@
 
 	/* make sure the process ID is root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root.");
+		tst_brkm(TBROK, NULL, "Test must be run as root.");
 	}
 
 	/* capture signals */
@@ -211,7 +215,4 @@
 	 * Delete the test directory created in setup().
 	 */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/fchmod/fchmod01.c b/testcases/kernel/syscalls/fchmod/fchmod01.c
index 97c7393..f2b2398 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod01.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fchmod/fchmod02.c b/testcases/kernel/syscalls/fchmod/fchmod02.c
index 5439cbe..5e34816 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod02.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod02.c
@@ -107,7 +107,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -165,7 +169,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchmod/fchmod03.c b/testcases/kernel/syscalls/fchmod/fchmod03.c
index cd68574..77cf4ca 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod03.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod03.c
@@ -108,7 +108,11 @@
 	mode_t file_mode;	/* mode permissions set on testfile */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -166,7 +170,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -182,7 +186,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/fchmod/fchmod04.c b/testcases/kernel/syscalls/fchmod/fchmod04.c
index 563c7c9..216b936 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod04.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod04.c
@@ -108,7 +108,11 @@
 	mode_t dir_mode;	/* mode permissions set on testdirectory */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -167,7 +171,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -184,7 +188,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/fchmod/fchmod05.c b/testcases/kernel/syscalls/fchmod/fchmod05.c
index ade8a70..b8c94f4 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod05.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod05.c
@@ -109,7 +109,11 @@
 	mode_t dir_mode;	/* mode permissions set on test directory */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -167,7 +171,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchmod/fchmod06.c b/testcases/kernel/syscalls/fchmod/fchmod06.c
index d0e9e85..feebc7f 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod06.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod06.c
@@ -135,7 +135,11 @@
 	int mode;		/* creation mode for the node created */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -202,7 +206,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -222,7 +226,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/fchmod/fchmod07.c b/testcases/kernel/syscalls/fchmod/fchmod07.c
index a557aa3..48935c3 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod07.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod07.c
@@ -100,7 +100,11 @@
 	TST_TOTAL = sizeof(Modes) / sizeof(int);
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -171,7 +175,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
index 3384b1d..9d53286 100644
--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
@@ -99,7 +99,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fchown/fchown01.c b/testcases/kernel/syscalls/fchown/fchown01.c
index 88eeddb..151d9ef 100644
--- a/testcases/kernel/syscalls/fchown/fchown01.c
+++ b/testcases/kernel/syscalls/fchown/fchown01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fchown/fchown02.c b/testcases/kernel/syscalls/fchown/fchown02.c
index 4abf3ce..64e0d37 100644
--- a/testcases/kernel/syscalls/fchown/fchown02.c
+++ b/testcases/kernel/syscalls/fchown/fchown02.c
@@ -121,15 +121,19 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 	int ind;		/* counter variable for chmod(2) tests */
-	uid_t User_id;		/* user id of the user set for testfile */
-	gid_t Group_id;		/* group id of the user set for testfile */
+	uid_t user_id;		/* user id of the user set for testfile */
+	gid_t group_id;		/* group id of the user set for testfile */
 	int fildes;		/* File descriptor for testfile */
 	int test_flag;		/* test condition specific flag variable */
 	char *file_name;	/* ptr. for test file name */
 	char *test_desc;	/* test specific message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -147,8 +151,8 @@
 			fildes = Test_cases[ind].fd;
 			file_name = Test_cases[ind].pathname;
 			test_desc = Test_cases[ind].desc;
-			User_id = Test_cases[ind].user_id;
-			Group_id = Test_cases[ind].group_id;
+			user_id = Test_cases[ind].user_id;
+			group_id = Test_cases[ind].group_id;
 			test_flag = Test_cases[ind].test_flag;
 
 			if (fildes == 1) {
@@ -162,7 +166,7 @@
 			 * group id (numeric values) to set it on
 			 * testfile.
 			 */
-			TEST(fchown(fildes, User_id, Group_id));
+			TEST(fchown(fildes, user_id, group_id));
 
 			/* check return code of fchown(2) */
 			if (TEST_RETURN == -1) {
@@ -190,12 +194,12 @@
 				 * Check for expected Ownership ids
 				 * set on testfile.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id)) {
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id)) {
 					tst_resm(TFAIL, "%s: Incorrect"
 						 " ownership set, Expected %d "
 						 "%d", file_name,
-						 User_id, Group_id);
+						 user_id, group_id);
 				}
 
 				/*
@@ -232,7 +236,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchown/fchown03.c b/testcases/kernel/syscalls/fchown/fchown03.c
index 17a8372..d7b3fe1 100644
--- a/testcases/kernel/syscalls/fchown/fchown03.c
+++ b/testcases/kernel/syscalls/fchown/fchown03.c
@@ -103,11 +103,15 @@
 	struct stat stat_buf;	/* stat(2) struct contents */
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
-	uid_t User_id;		/* Owner id of the test file. */
-	gid_t Group_id;		/* Group id of the test file. */
+	uid_t user_id;		/* Owner id of the test file. */
+	gid_t group_id;		/* Group id of the test file. */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -122,15 +126,15 @@
 		Tst_count = 0;
 
 		/* Get the euid/egid of the process */
-		User_id = geteuid();
-		Group_id = getegid();
+		user_id = geteuid();
+		group_id = getegid();
 
 		/*
 		 * Call fchwon(2) with different user id and
 		 * group id (numeric values) to set it on
 		 * testfile.
 		 */
-		TEST(fchown(fildes, -1, Group_id));
+		TEST(fchown(fildes, -1, group_id));
 
 		/* check return code of fchown(2) */
 		if (TEST_RETURN == -1) {
@@ -157,11 +161,11 @@
 			 * Check for expected Ownership ids
 			 * set on testfile.
 			 */
-			if ((stat_buf.st_uid != User_id) ||
-			    (stat_buf.st_gid != Group_id)) {
+			if ((stat_buf.st_uid != user_id) ||
+			    (stat_buf.st_gid != group_id)) {
 				tst_resm(TFAIL, "%s: Incorrect "
 					 "ownership set, Expected %d %d",
-					 TESTFILE, User_id, Group_id);
+					 TESTFILE, user_id, group_id);
 			}
 
 			/*
@@ -185,7 +189,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }				/* End main */
 
 /*
@@ -202,7 +206,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/fchown/fchown04.c b/testcases/kernel/syscalls/fchown/fchown04.c
index 6be2e17..743873e 100644
--- a/testcases/kernel/syscalls/fchown/fchown04.c
+++ b/testcases/kernel/syscalls/fchown/fchown04.c
@@ -126,11 +126,15 @@
 	char *test_desc;	/* test specific error message */
 	int fd;			/* test file descriptor */
 	int ind;		/* counter to test different test conditions */
-	uid_t User_id;		/* Effective user id of a test process */
-	gid_t Group_id;		/* Effective group id of a test process */
+	uid_t user_id;		/* Effective user id of a test process */
+	gid_t group_id;		/* Effective group id of a test process */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -146,8 +150,8 @@
 	TEST_EXP_ENOS(exp_enos);
 
 	/* Set uid/gid values to that of test process */
-	User_id = geteuid();
-	Group_id = getegid();
+	user_id = geteuid();
+	group_id = getegid();
 
 	/* Check looping state if -i option given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -169,7 +173,7 @@
 			 * verify that it fails with -1 return value and
 			 * sets appropriate errno.
 			 */
-			TEST(fchown(fd, User_id, Group_id));
+			TEST(fchown(fd, user_id, group_id));
 
 			/* Check return code from fchown(2) */
 			if (TEST_RETURN == -1) {
@@ -199,7 +203,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchown/fchown05.c b/testcases/kernel/syscalls/fchown/fchown05.c
index 140da7c..2475982 100644
--- a/testcases/kernel/syscalls/fchown/fchown05.c
+++ b/testcases/kernel/syscalls/fchown/fchown05.c
@@ -109,12 +109,16 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 	int ind;		/* counter variable for chmod(2) tests */
-	uid_t User_id;		/* user id of the user set for testfile */
-	gid_t Group_id;		/* group id of the user set for testfile */
+	uid_t user_id;		/* user id of the user set for testfile */
+	gid_t group_id;		/* group id of the user set for testfile */
 	char *test_desc;	/* test specific message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -130,15 +134,15 @@
 
 		for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
 			test_desc = Test_cases[ind].desc;
-			User_id = Test_cases[ind].user_id;
-			Group_id = Test_cases[ind].group_id;
+			user_id = Test_cases[ind].user_id;
+			group_id = Test_cases[ind].group_id;
 
 			/*
 			 * Call fchwon(2) with different user id and
 			 * group id (numeric values) to set it on
 			 * testfile.
 			 */
-			TEST(fchown(fildes, User_id, Group_id));
+			TEST(fchown(fildes, user_id, group_id));
 
 			/* check return code of fchown(2) */
 			if (TEST_RETURN == -1) {
@@ -161,22 +165,22 @@
 						 "%s failed, errno:%d",
 						 TESTFILE, TEST_ERRNO);
 				}
-				if (User_id == -1) {
-					User_id = Test_cases[ind - 1].user_id;
+				if (user_id == -1) {
+					user_id = Test_cases[ind - 1].user_id;
 				}
-				if (Group_id == -1) {
-					Group_id = Test_cases[ind - 1].group_id;
+				if (group_id == -1) {
+					group_id = Test_cases[ind - 1].group_id;
 				}
 
 				/*
 				 * Check for expected Ownership ids
 				 * set on testfile.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id)) {
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id)) {
 					tst_resm(TFAIL, "%s: Incorrect owner"
 						 "ship set, Expected %d %d",
-						 TESTFILE, User_id, Group_id);
+						 TESTFILE, user_id, group_id);
 				} else {
 					tst_resm(TPASS,
 						 "fchown() succeeds to %s of %s",
@@ -191,7 +195,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
index 7e5d871..664dbea 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
@@ -103,7 +103,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl01.c b/testcases/kernel/syscalls/fcntl/fcntl01.c
index 916f25d..e2f85d7 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl01.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl01.c
@@ -55,7 +55,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -275,7 +279,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fcntl/fcntl02.c b/testcases/kernel/syscalls/fcntl/fcntl02.c
index c2adb9e..32f6bf4 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl02.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl02.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl03.c b/testcases/kernel/syscalls/fcntl/fcntl03.c
index 69a1577..842f3d1 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl03.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl03.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl04.c b/testcases/kernel/syscalls/fcntl/fcntl04.c
index 21e1d26..6ad5720 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl04.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl04.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl05.c b/testcases/kernel/syscalls/fcntl/fcntl05.c
index 616c9af..364862b 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl05.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl05.c
@@ -141,7 +141,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl06.c b/testcases/kernel/syscalls/fcntl/fcntl06.c
index 2759f8c..e830778 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl06.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl06.c
@@ -79,7 +79,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -94,7 +98,7 @@
 			tst_resm(TINFO, "fcntl remote locking feature not "
 				 "implemented in the kernel: exitting");
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			tst_resm(TPASS, "fcntl on file failed: Test " "PASSED");
 		}
 	}
diff --git a/testcases/kernel/syscalls/fcntl/fcntl09.c b/testcases/kernel/syscalls/fcntl/fcntl09.c
index 41e3c0b..f57e47a 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl09.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl09.c
@@ -141,7 +141,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl10.c b/testcases/kernel/syscalls/fcntl/fcntl10.c
index 9aa6748..5e6b43d 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl10.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl10.c
@@ -141,7 +141,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
index 50f5e45..b829fc9 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl11.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
@@ -300,7 +300,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "ddddd", &parent_pipe[0],
diff --git a/testcases/kernel/syscalls/fcntl/fcntl12.c b/testcases/kernel/syscalls/fcntl/fcntl12.c
index 9844012..c150e82 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl12.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl12.c
@@ -65,7 +65,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -85,7 +89,7 @@
 		if (pid < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+		 } else if (pid == 0) {	/* child */
 			max_files = getdtablesize();
 			for (i = 0; i < max_files; i++) {
 				if ((fd = open(fname, O_CREAT | O_RDONLY,
@@ -113,7 +117,7 @@
 		tst_resm(TINFO, "Exit block 1");
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fcntl/fcntl13.c b/testcases/kernel/syscalls/fcntl/fcntl13.c
index 1368619..e26b40f 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl13.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl13.c
@@ -58,7 +58,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -182,7 +186,7 @@
 		tst_resm(TINFO, "Exit block 4");
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
index 2f7b70b..0c09d7c 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl14.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
@@ -596,7 +596,7 @@
 		tst_resm(TFAIL, "SIGUSR1 signal setup failed, errno = %d",
 			 errno);
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_alarm;
@@ -605,7 +605,7 @@
 	if ((sigaction(SIGALRM, &act, NULL)) < 0) {
 		tst_resm(TFAIL, "SIGALRM signal setup failed");
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 }
 
 void wake_parent(void)
@@ -804,18 +804,18 @@
 		fd = open(tmpname, file_flag, file_mode);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* seek into file if indicated */
 		if (seek) {
 			if (lseek(fd, seek, 0) < 0) {
 				tst_brkm(TBROK, cleanup, "lseek() failed");
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		/* Initialize first parent lock structure */
@@ -871,7 +871,7 @@
 				      thiscase->a_type, fd, test, parent) < 0) {
 				tst_resm(TFAIL, "self_exec failed");
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 #else
 			dochild();
 #endif
@@ -879,7 +879,7 @@
 		if (child < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		/* parent process */
 		if ((thiscase->c_flag) == WILLBLOCK) {
 			/*
@@ -975,7 +975,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = av[0];
@@ -1067,12 +1071,12 @@
 		fd = open(tmpname, O_CREAT | O_RDWR | O_TRUNC, 0777);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* Write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* Initialize lock structure */
 		flock.l_type = F_WRLCK;
@@ -1118,12 +1122,12 @@
 		fd = open(tmpname, O_CREAT | O_RDWR | O_TRUNC, 0777);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* Write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* Initialize first parent lock structure */
 		thiscase = &testcases[58];
@@ -1142,12 +1146,12 @@
 		/* Write some additional data to end of file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* Mask signal to avoid race */
 		if (sighold(SIGUSR1) < 0) {
 			tst_brkm(TBROK, cleanup, "sighold failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* spawn a child process */
 		if ((child = FORK_OR_VFORK()) == 0) {
@@ -1158,7 +1162,7 @@
 				      thiscase->a_type, fd, test, parent) < 0) {
 				tst_resm(TFAIL, "self_exec failed");
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 #else
 			dochild();
 #endif
@@ -1166,7 +1170,7 @@
 		if (child < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/* parent process */
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl15.c b/testcases/kernel/syscalls/fcntl/fcntl15.c
index f6df559..a375224 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl15.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl15.c
@@ -541,7 +541,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&dochild1_uc, "nddds", 1, &uc_file_flag,
diff --git a/testcases/kernel/syscalls/fcntl/fcntl16.c b/testcases/kernel/syscalls/fcntl/fcntl16.c
index 6bdefb7..7b806c9 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl16.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl16.c
@@ -464,7 +464,7 @@
 		fd = open(tmpname, file_flag, file_mode);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/* write some dummy data to the file */
 		(void)write(fd, FILEDATA, 10);
@@ -664,7 +664,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(dochild_uc, "ddddd", &kid_uc, &parent, &test,
diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
index bc35a35..b2d66c0 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl17.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
@@ -393,7 +393,7 @@
 {
 	tst_resm(TFAIL, "Unexpected death of child process");
 	cleanup();
- /*NOTREACHED*/}
+ }
 
 void catch_alarm()
 {
@@ -415,7 +415,7 @@
 	tst_resm(TFAIL, "Alarm expired, deadlock not detected");
 	tst_resm(TWARN, "You may need to kill child processes by hand");
 	cleanup();
- /*NOTREACHED*/}
+ }
 
 int main(int ac, char **av)
 {
@@ -426,7 +426,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child1, "nddddddddd", 1, &file_fd,
@@ -449,7 +453,7 @@
 	if (setup()) {		/* global testup */
 		tst_resm(TINFO, "setup failed");
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -473,7 +477,7 @@
 		} else if (child_pid1 < 0) {
 			perror("Fork failed: child 1");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/* parent */
 
@@ -497,7 +501,7 @@
 					 "1 failed");
 			}
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/* parent */
 
@@ -526,7 +530,7 @@
 					 "failed");
 			}
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		/* parent */
 
 		close(parent_pipe[1]);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl18.c b/testcases/kernel/syscalls/fcntl/fcntl18.c
index e95ca1e..4adcba3 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl18.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl18.c
@@ -71,7 +71,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
index 1982ee3..d10d8a6 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl19.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
@@ -307,7 +307,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "ddddd", &parent_pipe[0], &parent_pipe[1],
diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
index f15cde5..6afc7c2 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl20.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
@@ -302,7 +302,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "ddddd", &parent_pipe[0], &parent_pipe[1],
diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
index 06b27ac..85b2666 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl21.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
@@ -303,7 +303,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "ddddd", &parent_pipe[0], &parent_pipe[1],
diff --git a/testcases/kernel/syscalls/fcntl/fcntl22.c b/testcases/kernel/syscalls/fcntl/fcntl22.c
index 170d36a..4a109a3 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl22.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl22.c
@@ -104,7 +104,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* setup */
diff --git a/testcases/kernel/syscalls/fcntl/fcntl23.c b/testcases/kernel/syscalls/fcntl/fcntl23.c
index 74bd180..6962d61 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl23.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl23.c
@@ -116,7 +116,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl24.c b/testcases/kernel/syscalls/fcntl/fcntl24.c
index 0a010db..33c092f 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl24.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl24.c
@@ -116,7 +116,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl25.c b/testcases/kernel/syscalls/fcntl/fcntl25.c
index 3fa3fef..add616f 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl25.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl25.c
@@ -117,7 +117,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl26.c b/testcases/kernel/syscalls/fcntl/fcntl26.c
index b81fb2a..c72c127 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl26.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl26.c
@@ -117,7 +117,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl27.c b/testcases/kernel/syscalls/fcntl/fcntl27.c
index 69f41b9..03779b9 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl27.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl27.c
@@ -117,7 +117,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fcntl/fcntl28.c b/testcases/kernel/syscalls/fcntl/fcntl28.c
index 9b55f96..cd163d9 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl28.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl28.c
@@ -114,7 +114,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fdatasync/fdatasync01.c b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
index f6e9c98..9e6b454 100644
--- a/testcases/kernel/syscalls/fdatasync/fdatasync01.c
+++ b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
@@ -88,9 +88,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -118,7 +118,7 @@
 	/* perform global cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -139,13 +139,13 @@
 	/* Initialize unique filename for each child process */
 	if (sprintf(filename, "fdatasync_%d", getpid()) <= 0) {
 		tst_brkm(TBROK, cleanup, "Failed to initialize filename");
-	 /*NOTREACHED*/}
+	 }
 	if ((fd = open(filename, O_CREAT | O_WRONLY, 0777)) == -1) {	//mode must be specified when O_CREATE is in the flag
 		tst_brkm(TBROK, cleanup, "open() failed");
-	 /*NOTREACHED*/}
+	 }
 	if ((write(fd, filename, strlen(filename) + 1)) == -1) {
 		tst_brkm(TBROK, cleanup, "write() failed");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -168,4 +168,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/fdatasync/fdatasync02.c b/testcases/kernel/syscalls/fdatasync/fdatasync02.c
index 2c0d352..7f20d6a 100644
--- a/testcases/kernel/syscalls/fdatasync/fdatasync02.c
+++ b/testcases/kernel/syscalls/fdatasync/fdatasync02.c
@@ -114,9 +114,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -154,7 +154,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 int setup1(void)
@@ -177,7 +177,7 @@
 {
 	/* close special file */
 	if (close(fd) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to close fd of %s", SPL_FILE);
+		tst_brkm(TBROK, NULL, "Failed to close fd of %s", SPL_FILE);
 	}
 }
 
@@ -215,4 +215,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
index a220f6e..db221c6 100644
--- a/testcases/kernel/syscalls/flock/flock01.c
+++ b/testcases/kernel/syscalls/flock/flock01.c
@@ -100,10 +100,10 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -203,4 +203,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock02.c b/testcases/kernel/syscalls/flock/flock02.c
index dec1060..8f66f0e 100644
--- a/testcases/kernel/syscalls/flock/flock02.c
+++ b/testcases/kernel/syscalls/flock/flock02.c
@@ -98,10 +98,10 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -222,4 +222,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock03.c b/testcases/kernel/syscalls/flock/flock03.c
index 6e512cc..dcb82cc 100644
--- a/testcases/kernel/syscalls/flock/flock03.c
+++ b/testcases/kernel/syscalls/flock/flock03.c
@@ -96,10 +96,10 @@
 	int fd;			/* for opening the temporary file */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&childfunc_uc, "ds", &fd_uc, filename);
 #endif
@@ -257,4 +257,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock04.c b/testcases/kernel/syscalls/flock/flock04.c
index 05e9543..bed1c22 100644
--- a/testcases/kernel/syscalls/flock/flock04.c
+++ b/testcases/kernel/syscalls/flock/flock04.c
@@ -98,10 +98,10 @@
 	pid_t pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -169,7 +169,7 @@
 
 	cleanup();
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup()
@@ -229,4 +229,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock05.c b/testcases/kernel/syscalls/flock/flock05.c
index 797da4a..f440164 100644
--- a/testcases/kernel/syscalls/flock/flock05.c
+++ b/testcases/kernel/syscalls/flock/flock05.c
@@ -98,10 +98,10 @@
 	pid_t pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -168,7 +168,7 @@
 	close(fd1);
 	cleanup();
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup()
@@ -228,4 +228,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/flock/flock06.c b/testcases/kernel/syscalls/flock/flock06.c
index 6128390..1d268fb 100644
--- a/testcases/kernel/syscalls/flock/flock06.c
+++ b/testcases/kernel/syscalls/flock/flock06.c
@@ -83,10 +83,10 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	setup();
 
@@ -200,4 +200,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/fork/fork01.c b/testcases/kernel/syscalls/fork/fork01.c
index 1870f95..a284293 100644
--- a/testcases/kernel/syscalls/fork/fork01.c
+++ b/testcases/kernel/syscalls/fork/fork01.c
@@ -206,7 +206,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fork/fork02.c b/testcases/kernel/syscalls/fork/fork02.c
index 2ae920e..0182655 100644
--- a/testcases/kernel/syscalls/fork/fork02.c
+++ b/testcases/kernel/syscalls/fork/fork02.c
@@ -67,8 +67,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -105,7 +109,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork03.c b/testcases/kernel/syscalls/fork/fork03.c
index 8f7118e..3e907d7 100644
--- a/testcases/kernel/syscalls/fork/fork03.c
+++ b/testcases/kernel/syscalls/fork/fork03.c
@@ -67,8 +67,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -127,7 +131,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork06.c b/testcases/kernel/syscalls/fork/fork06.c
index 4e41dba..7ac8e8e 100644
--- a/testcases/kernel/syscalls/fork/fork06.c
+++ b/testcases/kernel/syscalls/fork/fork06.c
@@ -65,8 +65,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -115,7 +119,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork07.c b/testcases/kernel/syscalls/fork/fork07.c
index 7a97f6f..97c5673 100644
--- a/testcases/kernel/syscalls/fork/fork07.c
+++ b/testcases/kernel/syscalls/fork/fork07.c
@@ -86,8 +86,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	if (Nflag) {
 		if (sscanf(Nforkarg, "%i", &Nforks) != 1) {
@@ -201,7 +205,7 @@
 	fclose(rea);
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 void help()
diff --git a/testcases/kernel/syscalls/fork/fork08.c b/testcases/kernel/syscalls/fork/fork08.c
index 47248f0..d10d341 100644
--- a/testcases/kernel/syscalls/fork/fork08.c
+++ b/testcases/kernel/syscalls/fork/fork08.c
@@ -70,8 +70,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -169,7 +173,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork09.c b/testcases/kernel/syscalls/fork/fork09.c
index 27025d9..a5e0eb6 100644
--- a/testcases/kernel/syscalls/fork/fork09.c
+++ b/testcases/kernel/syscalls/fork/fork09.c
@@ -76,8 +76,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -87,7 +91,7 @@
 	fildeses = (FILE **) malloc((OPEN_MAX + 10) * sizeof(FILE *));
 	if (fildeses == NULL) {
 		tst_brkm(TBROK, cleanup, "malloc failed");
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * check looping state if -i option is given
@@ -107,7 +111,7 @@
 		if ((first = creat(filname, 0660)) == -1) {
 			tst_brkm(TBROK, cleanup, "Cannot open first file %s, "
 				 "errno = %d", filname, errno);
-		 /*NOTREACHED*/}
+		 }
 		close(first);
 
 		tst_resm(TINFO, "first file descriptor is %d ", first);
@@ -115,7 +119,7 @@
 		if (unlink(filname) == -1) {
 			tst_brkm(TBROK, cleanup, "Cannot unlink file %s, "
 				 "errno = %d", filname, errno);
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * now open all the files for the test
@@ -129,7 +133,7 @@
 				tst_brkm(TBROK, cleanup, "Parent: cannot open "
 					 "file %d %s errno = %d", nfiles,
 					 filname, errno);
-			 /*NOTREACHED*/}
+			 }
 #ifdef DEBUG
 			tst_resm(TINFO, "filname: %s", filname);
 #endif
@@ -139,7 +143,7 @@
 
 		if ((pid = fork()) == -1) {
 			tst_brkm(TBROK, cleanup, "Fork failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* child */
 			nfiles--;
@@ -147,7 +151,7 @@
 				tst_resm(TINFO, "Child could not close file "
 					 "#%d, errno = %d", nfiles, errno);
 				exit(1);
-			 /*NOTREACHED*/} else {
+			 } else {
 				sprintf(childfile, "cfile.%d", getpid());
 				if ((fildeses[nfiles] =
 				     fopen(childfile, "a")) == NULL) {
@@ -155,7 +159,7 @@
 						 "file %s, errno = %d",
 						 childfile, errno);
 					exit(1);
-				 /*NOTREACHED*/} else {
+				 } else {
 					tst_resm(TINFO, "Child opened new "
 						 "file #%d", nfiles);
 					unlink(childfile);
@@ -180,7 +184,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork10.c b/testcases/kernel/syscalls/fork/fork10.c
index f764715..3774277 100644
--- a/testcases/kernel/syscalls/fork/fork10.c
+++ b/testcases/kernel/syscalls/fork/fork10.c
@@ -71,8 +71,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -91,18 +95,18 @@
 		if ((fildes = creat(fnamebuf, 0600)) < 0) {
 			tst_brkm(TBROK, cleanup, "Parent: cannot open %s for "
 				 "write, errno = %d", fnamebuf, errno);
-		 /*NOTREACHED*/}
+		 }
 		write(fildes, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n", 27);
 		close(fildes);
 
 		if ((fildes = open(fnamebuf, 0)) == -1) {
 			tst_brkm(TBROK, cleanup, "Parent: cannot open %s for "
 				 "reading", fnamebuf);
-		 /*NOTREACHED*/}
+		 }
 
 		if ((pid = fork()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #1 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* child */
 			tst_resm(TINFO, "fork child A");
@@ -117,7 +121,7 @@
 			/* parent starts second child */
 			if ((pid = fork()) == -1) {
 				tst_brkm(TBROK, cleanup, "fork() #2 failed");
-			 /*NOTREACHED*/}
+			 }
 
 			if (pid == 0) {	/* child */
 				if (read(fildes, chilchar, 1) <= 0) {
@@ -159,7 +163,7 @@
 	close(fildes);
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork11.c b/testcases/kernel/syscalls/fork/fork11.c
index d19a65c..2f46fa2 100644
--- a/testcases/kernel/syscalls/fork/fork11.c
+++ b/testcases/kernel/syscalls/fork/fork11.c
@@ -64,8 +64,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -105,7 +109,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fork/fork12.c b/testcases/kernel/syscalls/fork/fork12.c
index 4170704..d0733fe 100644
--- a/testcases/kernel/syscalls/fork/fork12.c
+++ b/testcases/kernel/syscalls/fork/fork12.c
@@ -69,8 +69,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -122,7 +126,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fstat/fstat01.c b/testcases/kernel/syscalls/fstat/fstat01.c
index aa32a6a..6861c07 100644
--- a/testcases/kernel/syscalls/fstat/fstat01.c
+++ b/testcases/kernel/syscalls/fstat/fstat01.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fstat/fstat02.c b/testcases/kernel/syscalls/fstat/fstat02.c
index 38e3852..b2366b2 100644
--- a/testcases/kernel/syscalls/fstat/fstat02.c
+++ b/testcases/kernel/syscalls/fstat/fstat02.c
@@ -86,8 +86,8 @@
 char *TCID = "fstat02";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-uid_t User_id;			/* user id/group id of test process */
-gid_t Group_id;
+uid_t user_id;			/* user id/group id of test process */
+gid_t group_id;
 int fildes;			/* File descriptor of testfile */
 
 char nobody_uid[] = "nobody";
@@ -103,7 +103,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -138,8 +142,8 @@
 			 * Verify the data returned by fstat(2)
 			 * aganist the expected data.
 			 */
-			if ((stat_buf.st_uid != User_id) ||
-			    (stat_buf.st_gid != Group_id) ||
+			if ((stat_buf.st_uid != user_id) ||
+			    (stat_buf.st_gid != group_id) ||
 			    (stat_buf.st_size != FILE_SIZE) ||
 			    ((stat_buf.st_mode & MASK) != FILE_MODE)) {
 				tst_resm(TFAIL, "Functionality of fstat(2) on "
@@ -156,7 +160,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -178,7 +182,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
@@ -212,8 +216,8 @@
 	}
 
 	/* Get the uid/gid of the process */
-	User_id = getuid();
-	Group_id = getgid();
+	user_id = getuid();
+	group_id = getgid();
 
 }				/* End setup() */
 
diff --git a/testcases/kernel/syscalls/fstat/fstat03.c b/testcases/kernel/syscalls/fstat/fstat03.c
index 435217b..2aeddbb 100644
--- a/testcases/kernel/syscalls/fstat/fstat03.c
+++ b/testcases/kernel/syscalls/fstat/fstat03.c
@@ -78,7 +78,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -124,7 +128,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/fstat/fstat04.c b/testcases/kernel/syscalls/fstat/fstat04.c
index a7c8fb8..5484174 100644
--- a/testcases/kernel/syscalls/fstat/fstat04.c
+++ b/testcases/kernel/syscalls/fstat/fstat04.c
@@ -85,8 +85,8 @@
 char *TCID = "fstat04";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-uid_t User_id;			/* user id/group id of test process */
-gid_t Group_id;
+uid_t user_id;			/* user id/group id of test process */
+gid_t group_id;
 int fildes;			/* File descriptor of testfile */
 
 char nobody_uid[] = "nobody";
@@ -102,7 +102,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -137,8 +141,8 @@
 			 * Verify the data returned by fstat(2)
 			 * aganist the expected data.
 			 */
-			if ((stat_buf.st_uid != User_id) ||
-			    (stat_buf.st_gid != Group_id) ||
+			if ((stat_buf.st_uid != user_id) ||
+			    (stat_buf.st_gid != group_id) ||
 			    (stat_buf.st_size != FILE_SIZE) ||
 			    ((stat_buf.st_mode & MASK) != FILE_MODE)) {
 				tst_resm(TFAIL, "Functionality of fstat(2) on "
@@ -155,7 +159,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -177,7 +181,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
@@ -211,8 +215,8 @@
 	}
 
 	/* Get the uid/gid of the process */
-	User_id = getuid();
-	Group_id = getgid();
+	user_id = getuid();
+	group_id = getgid();
 
 }				/* End setup() */
 
diff --git a/testcases/kernel/syscalls/fstat/fstat05.c b/testcases/kernel/syscalls/fstat/fstat05.c
index 2777597..3f56ff3 100644
--- a/testcases/kernel/syscalls/fstat/fstat05.c
+++ b/testcases/kernel/syscalls/fstat/fstat05.c
@@ -137,11 +137,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Buffer points outside user's accessible address space. */
 	ptr_str = &stat_buf;	/* if it was for conformance testing */
@@ -189,7 +193,7 @@
 	 * in the setup().
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 #else
@@ -223,7 +227,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
index c4498a6..dc443f6 100644
--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
@@ -113,30 +113,12 @@
 
 	/* Disable test if the version of the kernel is less than 2.6.16 */
 	if ((tst_kvercmp(2, 6, 16)) < 0) {
-		tst_resm(TWARN, "This test can only run on kernels that are ");
-		tst_resm(TWARN, "2.6.16 and higher");
-		exit(0);
+		tst_brkm(TCONF, NULL,
+		    "This test can only run on kernels that are 2.6.16 and higher");
 	}
 
-	/* report failure if run with stubs */
-#ifdef __NR_fstatat64
-	if (__NR_fstatat64 == 0)
-#endif
-#ifdef __NR_newfstatat
-		if (__NR_newfstatat == 0)
-#endif
-		{
-			tst_resm(TFAIL,
-				 "fstatat() Failed, neither __NR_fstatat64 "
-				 "no __NR_newfstatat is implemented ");
-			exit(0);
-		}
-
-	/***************************************************************
-	 * parse standard options
-	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/***************************************************************
 	 * perform global setup for test
@@ -167,16 +149,11 @@
 				 ***************************************************************/
 				if (STD_FUNCTIONAL_TEST) {
 					/* No Verification test, yet... */
-					tst_resm(TPASS,
-						 "fstatat() returned the expected  errno %d: %s",
-						 TEST_ERRNO,
-						 strerror(TEST_ERRNO));
+					tst_resm(TPASS|TTERRNO,
+						 "fstatat() failed as expected");
 				}
 			} else {
-				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL,
-					 "fstatat() Failed, errno=%d : %s",
-					 TEST_ERRNO, strerror(TEST_ERRNO));
+				tst_resm(TFAIL|TTERRNO, "fstatat failed")
 			}
 		}
 
@@ -186,8 +163,7 @@
 	 * cleanup and exit
 	 ***************************************************************/
 	cleanup();
-
-	return (0);
+	tst_exit();
 }				/* End main */
 
 void setup_every_copy()
@@ -201,32 +177,32 @@
 
 	ret = mkdir(pathname, 0700);
 	if (ret < 0) {
-		perror("mkdir: ");
-		exit(-1);
+		perror("mkdir");
+		exit(1);
 	}
 
 	dirfd = open(pathname, O_DIRECTORY);
 	if (dirfd < 0) {
-		perror("open: ");
-		exit(-1);
+		perror("open");
+		exit(1);
 	}
 
 	fd = open(testfile, O_CREAT | O_RDWR, 0600);
 	if (fd < 0) {
-		perror("open: ");
-		exit(-1);
+		perror("open");
+		exit(1);
 	}
 
 	fd = open(testfile2, O_CREAT | O_RDWR, 0600);
 	if (fd < 0) {
-		perror("open: ");
-		exit(-1);
+		perror("open");
+		exit(1);
 	}
 
 	fd = open(testfile3, O_CREAT | O_RDWR, 0600);
 	if (fd < 0) {
-		perror("open: ");
-		exit(-1);
+		perror("open");
+		exit(1);
 	}
 
 	fds[0] = fds[1] = fds[4] = dirfd;
@@ -249,7 +225,7 @@
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}				/* End setup() */
+}
 
 /***************************************************************
  * cleanup() - performs all ONE TIME cleanup for this test at
@@ -268,7 +244,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-}				/* End cleanup() */
+}
diff --git a/testcases/kernel/syscalls/fstatfs/fstatfs01.c b/testcases/kernel/syscalls/fstatfs/fstatfs01.c
index 07087ee..f703f77 100644
--- a/testcases/kernel/syscalls/fstatfs/fstatfs01.c
+++ b/testcases/kernel/syscalls/fstatfs/fstatfs01.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fstatfs/fstatfs02.c b/testcases/kernel/syscalls/fstatfs/fstatfs02.c
index 01a0fd2..7498924 100644
--- a/testcases/kernel/syscalls/fstatfs/fstatfs02.c
+++ b/testcases/kernel/syscalls/fstatfs/fstatfs02.c
@@ -88,7 +88,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -127,7 +131,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fsync/fsync01.c b/testcases/kernel/syscalls/fsync/fsync01.c
index d566e73..106f5a7 100644
--- a/testcases/kernel/syscalls/fsync/fsync01.c
+++ b/testcases/kernel/syscalls/fsync/fsync01.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/fsync/fsync02.c b/testcases/kernel/syscalls/fsync/fsync02.c
index bdacf07..8b487ad 100644
--- a/testcases/kernel/syscalls/fsync/fsync02.c
+++ b/testcases/kernel/syscalls/fsync/fsync02.c
@@ -89,7 +89,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -158,7 +162,7 @@
 	close(fd);
 	sync();
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fsync/fsync03.c b/testcases/kernel/syscalls/fsync/fsync03.c
index 3532fed..91cd68b 100644
--- a/testcases/kernel/syscalls/fsync/fsync03.c
+++ b/testcases/kernel/syscalls/fsync/fsync03.c
@@ -82,7 +82,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -121,7 +125,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate01.c b/testcases/kernel/syscalls/ftruncate/ftruncate01.c
index ac17403..294d1c2 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate01.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate01.c
@@ -99,7 +99,11 @@
 	off_t file_length;	/* test file length */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -161,7 +165,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate02.c b/testcases/kernel/syscalls/ftruncate/ftruncate02.c
index ad802a8..459a3b4 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate02.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate02.c
@@ -105,7 +105,11 @@
 	int err_flag = 0;	/* error indicator flag */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -248,7 +252,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate04.c b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
index 02ecc23..6726aec 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate04.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
@@ -295,7 +295,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 #ifdef UCLINUX
 	maybe_run_child(&dochild, "dddd", filename, &recstart, &reclen, &ppid);
@@ -314,7 +314,7 @@
 			 " not support mandatory locks. Cannot run this test.");
 		tst_rmdir();
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		setvbuf(stdin, 0, _IOLBF, BUFSIZ);
diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
index 5eed7b6..91d8b5c 100644
--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
@@ -102,7 +102,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index 9782dbd..c71f002 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -105,9 +105,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -138,7 +135,6 @@
 /*
  * Global variables
  */
-static int opt_debug;
 static char *progname;
 
 enum test_type {
@@ -351,11 +347,6 @@
 	if (tc->policy == MPOL_DEFAULT)
 		nodemask_zero(&nodemask);
 	cmp_ok = tc->policy == policy && (tc->from_node == NONE || nodemask_equal(&nodemask,&getnodemask));
-	if (opt_debug) {
-		nodemask_dump("nodemask Expect:", &nodemask);
-		nodemask_dump("nodemask Result:", &getnodemask);
-		tst_resm(TINFO,"policy E:%d R:%d", tc->policy, policy);
-	}
 TEST_END:
 	/*
 	 * Check results
@@ -367,96 +358,40 @@
 
 
 /*
- * usage()
- */
-
-void usage(const char *progname)
-{
-	tst_resm(TINFO, "usage: %s [options]", progname);
-	tst_resm(TINFO, "This is a regression test program of %s system call.", SYSCALL_NAME);
-	tst_resm(TINFO, "options:");
-	tst_resm(TINFO, "    -d --debug	   Show debug messages");
-	tst_resm(TINFO, "    -h --help	    Show this message");
-
-	tst_resm(TINFO,"NG");
-	exit(1);
-}
-
-
-/*
  * main()
  */
 
 
 
 int main(int argc, char **argv) {
-	int c, i, lc, ret;
-	char *msg;	      /* message returned from parse_opts */
-
-	struct option long_options[] = {
-		{ "debug", no_argument, 0, 'd' },
-		{ "help",  no_argument, 0, 'h' },
-		{ NULL, 0, NULL, 0 }
-	};
-
-	progname = basename(argv[0]);
-
-	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
-	     tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	     tst_exit();
-	}
+	int i, ret;
 
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); lc++) {
+	ret = 0;
 
-		Tst_count = 0;
-
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-
-			TEST(c = getopt_long(argc, argv, "dh", long_options, NULL));
-
-			while (TEST_RETURN != -1) {
-				switch (c) {
-				case 'd':
-					opt_debug = 1;
-					break;
-				default:
-					usage(progname);
-					// NOTREACHED
-				}
-			}
-
-			/*
-			 * Execute test
-		 	 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(*tcase)); i++) {
-				tst_resm(TINFO, "(case%02d) START", i);
-				ret = do_test(&tcase[i]);
-				tst_resm((ret == 0 ? TPASS : TFAIL | TERRNO),
-					 "(case%02d) END", i);
-			}
-		
-		}
-
+	/*
+	 * Execute test
+	 */
+	for (i = 0; ret == 0 && i < (int)(sizeof(tcase) / sizeof(*tcase));
+	    i++) {
+		tst_resm(TINFO, "(case%02d) START", i);
+		ret = do_test(&tcase[i]);
+		tst_resm((ret == 0 ? TPASS : TFAIL|TERRNO), "(case%02d) END",
+		    i);
 	}
 
 	cleanup();
 	tst_exit();
 
-
 }
 #else
 int main(void) {
-	tst_resm(TBROK, "XXX: test is broken on libnuma v2 (read numa_helpers.h for more details).");
-	return 0;
+	tst_brkm(TBROK, NULL, "XXX: test is broken on libnuma v2 (read numa_helpers.h for more details).");
 }
 #endif
 #else
 int main(void) {
-	tst_resm(TCONF, "System doesn't have required numa support");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "System doesn't have required numa support");
 }
 #endif
diff --git a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
index 754193c..d8adc48 100644
--- a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
+++ b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
@@ -82,7 +82,11 @@
 	size_t len_ptr;		/* size of structure struct robust_list_head */
 	int retval;
 
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index c335471..6370c82 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -63,7 +63,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
      	* perform global setup for test
diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
index eb66b11..f1db668 100644
--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
@@ -114,7 +114,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	setup();		/* global setup */
 
@@ -158,7 +162,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getcwd/getcwd01.c b/testcases/kernel/syscalls/getcwd/getcwd01.c
index 1c7908a..19ab072 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd01.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd01.c
@@ -95,7 +95,11 @@
 	char *test_erg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 	setup();
 
@@ -139,7 +143,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 void setup_test4()
diff --git a/testcases/kernel/syscalls/getcwd/getcwd02.c b/testcases/kernel/syscalls/getcwd/getcwd02.c
index 5adffd7..2498430 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd02.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd02.c
@@ -92,7 +92,11 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 	setup();
 
@@ -105,11 +109,11 @@
 		if ((fin = popen(pwd, "r")) == NULL) {
 			tst_resm(TINFO, "%s: can't run %s", TCID, pwd);
 			tst_brkm(TBROK, cleanup, "%s FAILED", TCID);
-		 /*NOTREACHED*/}
+		 }
 		while (fgets(pwd_buf, sizeof(pwd_buf), fin) != NULL) {
 			if ((cp = strchr(pwd_buf, '\n')) == NULL) {
 				tst_brkm(TBROK, cleanup, "pwd output too long");
-			 /*NOTREACHED*/}
+			 }
 			*cp = 0;
 			cp_cur = pwd_buf;
 		}
@@ -124,7 +128,7 @@
 		do_block7();
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 void do_block1()		//valid cwd[]: -> Should work fine
diff --git a/testcases/kernel/syscalls/getcwd/getcwd03.c b/testcases/kernel/syscalls/getcwd/getcwd03.c
index 4c6c6b2..cb9dbfc 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd03.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd03.c
@@ -83,7 +83,11 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -103,10 +107,10 @@
 		sprintf(dir1, "getcwd1.%d", getpid());
 		if (mkdir(dir1, 00755) < 0) {
 			tst_brkm(TBROK, cleanup, "mkdir(2) failed");
-		 /*NOTREACHED*/}
+		 }
 		if (chdir(dir1) != 0) {
 			tst_brkm(TBROK, cleanup, "chdir(2) failed");
-		 /*NOTREACHED*/}
+		 }
 
 		pwd1 = getpwd();
 		if (getcwd(cwd1, sizeof cwd1) == NULL) {
@@ -118,7 +122,7 @@
 			tst_brkm(TFAIL, cleanup, "getcwd() returned unexpected "
 				 "working directory: expected: %s, got: %s\n",
 				 pwd1, cwd1);
-		 /*NOTREACHED*/}
+		 }
 
 		tst_resm(TINFO, "getcwd(2) succeeded in returning correct path "
 			 "for dir1");
@@ -134,12 +138,12 @@
 		if (symlink(dir1, dir2) < 0) {
 			tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d",
 				 errno);
-		 /*NOTREACHED*/}
+		 }
 
 		if (chdir(dir2) != 0) {
 			tst_brkm(TBROK, cleanup, "chdir(2) failed: errno: %d",
 				 errno);
-		 /*NOTREACHED*/}
+		 }
 
 		pwd2 = getpwd();
 		if (getcwd(cwd2, sizeof cwd2) == NULL) {
@@ -153,7 +157,7 @@
 		    ((n = readlink(dir2, link2, sizeof(link2))) < 0)) {
 			tst_brkm(TBROK, cleanup, "readlink(2) failed: errno:%d",
 				 errno);
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Finally compare the pwd, cwd, link informations:
@@ -201,7 +205,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 void setup()
@@ -240,11 +244,11 @@
 	if ((fin = popen(pwd, "r")) == NULL) {
 		tst_resm(TINFO, "%s: can't run %s", TCID, pwd);
 		tst_brkm(TBROK, cleanup, "%s FAILED", TCID);
-	 /*NOTREACHED*/}
+	 }
 	while (fgets(buf, BUFSIZ, fin) != NULL) {
 		if ((cp = strchr(buf, '\n')) == NULL) {
 			tst_brkm(TBROK, cleanup, "pwd output too long");
-		 /*NOTREACHED*/}
+		 }
 		*cp = 0;
 		cp_cur = buf;
 	}
diff --git a/testcases/kernel/syscalls/getdents/getdents01.c b/testcases/kernel/syscalls/getdents/getdents01.c
index 6cde9bb..fbf2d43 100644
--- a/testcases/kernel/syscalls/getdents/getdents01.c
+++ b/testcases/kernel/syscalls/getdents/getdents01.c
@@ -95,7 +95,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -187,7 +191,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getdents/getdents02.c b/testcases/kernel/syscalls/getdents/getdents02.c
index 86a5c5a..8d4198f 100644
--- a/testcases/kernel/syscalls/getdents/getdents02.c
+++ b/testcases/kernel/syscalls/getdents/getdents02.c
@@ -93,7 +93,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -173,7 +177,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getdents/getdents03.c b/testcases/kernel/syscalls/getdents/getdents03.c
index c97e262..39df308 100644
--- a/testcases/kernel/syscalls/getdents/getdents03.c
+++ b/testcases/kernel/syscalls/getdents/getdents03.c
@@ -96,7 +96,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -182,7 +186,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getdents/getdents04.c b/testcases/kernel/syscalls/getdents/getdents04.c
index 0227452..ea5e490 100644
--- a/testcases/kernel/syscalls/getdents/getdents04.c
+++ b/testcases/kernel/syscalls/getdents/getdents04.c
@@ -98,7 +98,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -209,7 +213,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getdomainname/getdomainname01.c b/testcases/kernel/syscalls/getdomainname/getdomainname01.c
index ddf5d76..e3e8450 100644
--- a/testcases/kernel/syscalls/getdomainname/getdomainname01.c
+++ b/testcases/kernel/syscalls/getdomainname/getdomainname01.c
@@ -85,9 +85,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -118,7 +124,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/getegid/getegid01.c b/testcases/kernel/syscalls/getegid/getegid01.c
index c3eab8b..412ce42 100644
--- a/testcases/kernel/syscalls/getegid/getegid01.c
+++ b/testcases/kernel/syscalls/getegid/getegid01.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getegid/getegid02.c b/testcases/kernel/syscalls/getegid/getegid02.c
index ce87ee9..bf119e9 100644
--- a/testcases/kernel/syscalls/getegid/getegid02.c
+++ b/testcases/kernel/syscalls/getegid/getegid02.c
@@ -83,8 +83,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -129,7 +133,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/geteuid/geteuid01.c b/testcases/kernel/syscalls/geteuid/geteuid01.c
index 139dbc7..48bd4f7 100644
--- a/testcases/kernel/syscalls/geteuid/geteuid01.c
+++ b/testcases/kernel/syscalls/geteuid/geteuid01.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getgid/getgid01.c b/testcases/kernel/syscalls/getgid/getgid01.c
index 6d4b7f8..03dfb86 100644
--- a/testcases/kernel/syscalls/getgid/getgid01.c
+++ b/testcases/kernel/syscalls/getgid/getgid01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getgid/getgid03.c b/testcases/kernel/syscalls/getgid/getgid03.c
index 130822b..f35c2a6 100644
--- a/testcases/kernel/syscalls/getgid/getgid03.c
+++ b/testcases/kernel/syscalls/getgid/getgid03.c
@@ -83,8 +83,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -128,7 +132,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getgroups/getgroups02.c b/testcases/kernel/syscalls/getgroups/getgroups02.c
index b9234d1..dd0c51c 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups02.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups02.c
@@ -141,7 +141,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getgroups/getgroups03.c b/testcases/kernel/syscalls/getgroups/getgroups03.c
index b6618e7..350859b 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups03.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups03.c
@@ -102,7 +102,11 @@
 	int gidsetsize = NGROUPS;	/* total groups */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -151,7 +155,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getgroups/getgroups04.c b/testcases/kernel/syscalls/getgroups/getgroups04.c
index e908ebf..0bbcd10 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups04.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups04.c
@@ -108,7 +108,11 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -161,7 +165,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/gethostid/gethostid01.c b/testcases/kernel/syscalls/gethostid/gethostid01.c
index a0b87dc..eeb5671 100644
--- a/testcases/kernel/syscalls/gethostid/gethostid01.c
+++ b/testcases/kernel/syscalls/gethostid/gethostid01.c
@@ -155,7 +155,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/gethostname/gethostname01.c b/testcases/kernel/syscalls/gethostname/gethostname01.c
index 59c2cf5..68f6454 100644
--- a/testcases/kernel/syscalls/gethostname/gethostname01.c
+++ b/testcases/kernel/syscalls/gethostname/gethostname01.c
@@ -130,23 +130,17 @@
 
 	char hname[100];	/* host name */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
+	/***************************************************************
+	 * check looping state if -c option given
+	 ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -156,7 +150,6 @@
 		 * TEST CASE:
 		 *  Get host name
 		 */
-		;
 
 		/* Call gethostname(2) */
 		TEST(gethostname(hname, sizeof(hname)));
@@ -170,9 +163,9 @@
 			continue;	/* next loop for MTKERNEL */
 		}
 
-	/***************************************************************
-	 * only perform functional verification if flag set (-f not given)
-	 ***************************************************************/
+		/***************************************************************
+		 * only perform functional verification if flag set (-f not given)
+		 ***************************************************************/
 		if (STD_FUNCTIONAL_TEST) {
 			/* No Verification test, yet... */
 			tst_resm(TPASS,
@@ -181,12 +174,9 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
 
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -212,7 +202,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/getitimer/getitimer01.c b/testcases/kernel/syscalls/getitimer/getitimer01.c
index f33592a..1ba3e94 100644
--- a/testcases/kernel/syscalls/getitimer/getitimer01.c
+++ b/testcases/kernel/syscalls/getitimer/getitimer01.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -121,7 +125,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getitimer/getitimer02.c b/testcases/kernel/syscalls/getitimer/getitimer02.c
index e0d79b6..8a45f91 100644
--- a/testcases/kernel/syscalls/getitimer/getitimer02.c
+++ b/testcases/kernel/syscalls/getitimer/getitimer02.c
@@ -75,7 +75,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -117,7 +121,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getitimer/getitimer03.c b/testcases/kernel/syscalls/getitimer/getitimer03.c
index 44c54b9..9237e5f 100644
--- a/testcases/kernel/syscalls/getitimer/getitimer03.c
+++ b/testcases/kernel/syscalls/getitimer/getitimer03.c
@@ -77,7 +77,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -135,7 +139,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getpagesize/getpagesize01.c b/testcases/kernel/syscalls/getpagesize/getpagesize01.c
index 444d70c..690526d 100644
--- a/testcases/kernel/syscalls/getpagesize/getpagesize01.c
+++ b/testcases/kernel/syscalls/getpagesize/getpagesize01.c
@@ -62,45 +62,27 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	/***************************************************************
-	* perform global setup for test
-	***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-	/***************************************************************
-	* check looping state if -c option given
-	***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
 		Tst_count = 0;
 
-		/*
-		 * TEST CASE:
-		 *  Get page size
-		 */
-		;
-
 		/* Call getpagesize(2) */
 		TEST(getpagesize());
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
-			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL,
-				 "getpagesize -  Get page size failed, errno=%d : %s",
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TTERRNO, "getpagesize failed"),
 			continue;	/* next loop for MTKERNEL */
 		}
 
-	/***************************************************************
-         * only perform functional verification if flag set (-f not given)
-         ***************************************************************/
 		if (STD_FUNCTIONAL_TEST) {
 			size = getpagesize();
 			tst_resm(TINFO, "Page Size is %d", size);
@@ -118,14 +100,10 @@
 					 "getpagesize - Page size returned %d",
 					 ret_sysconf);
 		}
-	}			/* End for TEST_LOOPING */
+	}
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
-
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -151,7 +129,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/getpeername/getpeername01.c b/testcases/kernel/syscalls/getpeername/getpeername01.c
index a114276..dd73f42 100644
--- a/testcases/kernel/syscalls/getpeername/getpeername01.c
+++ b/testcases/kernel/syscalls/getpeername/getpeername01.c
@@ -113,7 +113,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -154,7 +158,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 void setup(void)
diff --git a/testcases/kernel/syscalls/getpgid/getpgid01.c b/testcases/kernel/syscalls/getpgid/getpgid01.c
index cfefa4d..35b9c7a 100644
--- a/testcases/kernel/syscalls/getpgid/getpgid01.c
+++ b/testcases/kernel/syscalls/getpgid/getpgid01.c
@@ -69,7 +69,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
diff --git a/testcases/kernel/syscalls/getpgid/getpgid02.c b/testcases/kernel/syscalls/getpgid/getpgid02.c
index d0ecee5..5d58ad0 100644
--- a/testcases/kernel/syscalls/getpgid/getpgid02.c
+++ b/testcases/kernel/syscalls/getpgid/getpgid02.c
@@ -85,7 +85,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -123,7 +127,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getpgrp/getpgrp01.c b/testcases/kernel/syscalls/getpgrp/getpgrp01.c
index ed9c26c..281ad99 100644
--- a/testcases/kernel/syscalls/getpgrp/getpgrp01.c
+++ b/testcases/kernel/syscalls/getpgrp/getpgrp01.c
@@ -135,7 +135,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getpid/getpid01.c b/testcases/kernel/syscalls/getpid/getpid01.c
index ed0fefa..e6114c3 100644
--- a/testcases/kernel/syscalls/getpid/getpid01.c
+++ b/testcases/kernel/syscalls/getpid/getpid01.c
@@ -130,7 +130,7 @@
 	char *msg;		/* message returned from parse_opts */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -163,7 +163,6 @@
 	}			/* End for TEST_LOOPING */
 
 	cleanup();
-
 	tst_exit();
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/getppid/getppid01.c b/testcases/kernel/syscalls/getppid/getppid01.c
index b8923b6..5edba06 100644
--- a/testcases/kernel/syscalls/getppid/getppid01.c
+++ b/testcases/kernel/syscalls/getppid/getppid01.c
@@ -135,7 +135,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/getppid/getppid02.c b/testcases/kernel/syscalls/getppid/getppid02.c
index d8625ba..7b43f71 100644
--- a/testcases/kernel/syscalls/getppid/getppid02.c
+++ b/testcases/kernel/syscalls/getppid/getppid02.c
@@ -62,7 +62,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -110,7 +114,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getpriority/getpriority01.c b/testcases/kernel/syscalls/getpriority/getpriority01.c
index b00211f..10bbdfd 100644
--- a/testcases/kernel/syscalls/getpriority/getpriority01.c
+++ b/testcases/kernel/syscalls/getpriority/getpriority01.c
@@ -95,7 +95,11 @@
 	TST_TOTAL = sizeof(prio_which) / sizeof(int);
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -135,7 +139,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getpriority/getpriority02.c b/testcases/kernel/syscalls/getpriority/getpriority02.c
index 364e9dd..43dbd3b 100644
--- a/testcases/kernel/syscalls/getpriority/getpriority02.c
+++ b/testcases/kernel/syscalls/getpriority/getpriority02.c
@@ -114,7 +114,11 @@
 	uid_t who;		/* process uid of the test process */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -173,7 +177,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresgid/getresgid01.c b/testcases/kernel/syscalls/getresgid/getresgid01.c
index 3fe8ef9..2abb3cf 100644
--- a/testcases/kernel/syscalls/getresgid/getresgid01.c
+++ b/testcases/kernel/syscalls/getresgid/getresgid01.c
@@ -87,7 +87,11 @@
 	 eff_gid, sav_gid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -139,7 +143,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresgid/getresgid02.c b/testcases/kernel/syscalls/getresgid/getresgid02.c
index 6c8a1d2..d12e937 100644
--- a/testcases/kernel/syscalls/getresgid/getresgid02.c
+++ b/testcases/kernel/syscalls/getresgid/getresgid02.c
@@ -97,7 +97,11 @@
 	 eff_gid, sav_gid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -151,7 +155,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresgid/getresgid03.c b/testcases/kernel/syscalls/getresgid/getresgid03.c
index de4fe51..b108203 100644
--- a/testcases/kernel/syscalls/getresgid/getresgid03.c
+++ b/testcases/kernel/syscalls/getresgid/getresgid03.c
@@ -98,7 +98,11 @@
 	 eff_gid, sav_gid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -152,7 +156,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresuid/getresuid01.c b/testcases/kernel/syscalls/getresuid/getresuid01.c
index 01c1b94..7442107 100644
--- a/testcases/kernel/syscalls/getresuid/getresuid01.c
+++ b/testcases/kernel/syscalls/getresuid/getresuid01.c
@@ -92,7 +92,11 @@
 	 eff_uid, sav_uid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -145,7 +149,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresuid/getresuid02.c b/testcases/kernel/syscalls/getresuid/getresuid02.c
index e1fd10f..216cd73 100644
--- a/testcases/kernel/syscalls/getresuid/getresuid02.c
+++ b/testcases/kernel/syscalls/getresuid/getresuid02.c
@@ -97,7 +97,11 @@
 	 eff_uid, sav_uid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -151,7 +155,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getresuid/getresuid03.c b/testcases/kernel/syscalls/getresuid/getresuid03.c
index c5e2f68..6274245 100644
--- a/testcases/kernel/syscalls/getresuid/getresuid03.c
+++ b/testcases/kernel/syscalls/getresuid/getresuid03.c
@@ -97,7 +97,11 @@
 	 eff_uid, sav_uid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -151,7 +155,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/getrusage/getrusage01.c b/testcases/kernel/syscalls/getrusage/getrusage01.c
old mode 100755
new mode 100644
index 8fb9e4e..2faed98
--- a/testcases/kernel/syscalls/getrusage/getrusage01.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage01.c
@@ -86,9 +86,15 @@
 	struct rusage usage;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -120,7 +126,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/getrusage/getrusage02.c b/testcases/kernel/syscalls/getrusage/getrusage02.c
old mode 100755
new mode 100644
index d5a6864..9f6219b
--- a/testcases/kernel/syscalls/getrusage/getrusage02.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage02.c
@@ -109,9 +109,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -147,7 +153,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/getsid/getsid01.c b/testcases/kernel/syscalls/getsid/getsid01.c
index 3cf4d13..58994f6 100644
--- a/testcases/kernel/syscalls/getsid/getsid01.c
+++ b/testcases/kernel/syscalls/getsid/getsid01.c
@@ -80,7 +80,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -147,7 +151,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getsid/getsid02.c b/testcases/kernel/syscalls/getsid/getsid02.c
index 6b28098..abc791e 100644
--- a/testcases/kernel/syscalls/getsid/getsid02.c
+++ b/testcases/kernel/syscalls/getsid/getsid02.c
@@ -99,7 +99,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -138,7 +142,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/getsockname/getsockname01.c b/testcases/kernel/syscalls/getsockname/getsockname01.c
index af969d0..3527a6a 100644
--- a/testcases/kernel/syscalls/getsockname/getsockname01.c
+++ b/testcases/kernel/syscalls/getsockname/getsockname01.c
@@ -112,7 +112,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -146,7 +150,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 void setup(void)
diff --git a/testcases/kernel/syscalls/getsockopt/getsockopt01.c b/testcases/kernel/syscalls/getsockopt/getsockopt01.c
index 280a231..9ea0c77 100644
--- a/testcases/kernel/syscalls/getsockopt/getsockopt01.c
+++ b/testcases/kernel/syscalls/getsockopt/getsockopt01.c
@@ -137,7 +137,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -173,7 +177,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 void setup(void)
diff --git a/testcases/kernel/syscalls/gettid/gettid01.c b/testcases/kernel/syscalls/gettid/gettid01.c
index c54f1f2..8cce12e 100644
--- a/testcases/kernel/syscalls/gettid/gettid01.c
+++ b/testcases/kernel/syscalls/gettid/gettid01.c
@@ -52,9 +52,8 @@
 	int lc;			/* loop counter */
 	char *msg;		/* parse_opts() return message */
 
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -85,7 +84,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -112,8 +111,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
index 10241bd..bc1fff2 100644
--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
+++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -107,7 +111,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
index af0a9dc..00e0bc8 100644
--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
+++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
@@ -87,7 +87,11 @@
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, opts, help)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/syscalls/getuid/getuid01.c b/testcases/kernel/syscalls/getuid/getuid01.c
index 541bbd4..a9c5599 100644
--- a/testcases/kernel/syscalls/getuid/getuid01.c
+++ b/testcases/kernel/syscalls/getuid/getuid01.c
@@ -132,23 +132,14 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -166,9 +157,6 @@
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
 
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "getuid() returned %ld",
@@ -178,12 +166,8 @@
 
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
-
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -209,7 +193,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/getuid/getuid02.c b/testcases/kernel/syscalls/getuid/getuid02.c
index b77c44e..fc1f358 100644
--- a/testcases/kernel/syscalls/getuid/getuid02.c
+++ b/testcases/kernel/syscalls/getuid/getuid02.c
@@ -55,15 +55,13 @@
 
 int main(int ac, char **av)
 {
+	struct passwd *pwent;
 	int lc;			/* loop counter */
 	char *msg;		/* message returned by parse_opts */
 
-	struct passwd *getpwuid(), *pwent;
-
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -75,7 +73,7 @@
 		TEST(GETEUID());
 
 		if (TEST_RETURN < 0) {
-			tst_brkm(TBROK, cleanup, "This should never happen");
+			tst_brkm(TBROK|TTERRNO, cleanup, "geteuid* failed");
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
@@ -105,8 +103,7 @@
 		}
 	}
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -132,7 +129,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/getuid/getuid03.c b/testcases/kernel/syscalls/getuid/getuid03.c
index 58e5b1a..4275e09 100644
--- a/testcases/kernel/syscalls/getuid/getuid03.c
+++ b/testcases/kernel/syscalls/getuid/getuid03.c
@@ -56,11 +56,10 @@
 
 int main(int ac, char **av)
 {
+	struct passwd *pwent;
 	int lc;			/* loop counter */
 	char *msg;		/* message returned by parse_opts */
 
-	struct passwd *getpwuid(), *pwent;
-
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -108,8 +107,7 @@
 		}
 	}
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -135,7 +133,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/inotify/inotify01.c b/testcases/kernel/syscalls/inotify/inotify01.c
index 0853d4a..f51c64a 100644
--- a/testcases/kernel/syscalls/inotify/inotify01.c
+++ b/testcases/kernel/syscalls/inotify/inotify01.c
@@ -49,8 +49,9 @@
 #include <sys/syscall.h>
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
-#if defined(HAVE_SYS_INOTIFY_H) && defined(__NR_inotify_init)
+#if defined(HAVE_SYS_INOTIFY_H)
 #include <sys/inotify.h>
 
 #define EVENT_MAX 1024
@@ -100,7 +101,7 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -119,64 +120,56 @@
 		 * generate sequence of events
 		 */
 		if (chmod(fname, 0755) < 0) {
-			tst_brkm(TBROK, cleanup,
-				 "chmod(%s, 0755) Failed, errno=%d : %s",
-				 fname, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "chmod(%s, 0755) failed", fname);
 		}
 		event_set[Tst_count] = IN_ATTRIB;
 		Tst_count++;
 
 		if ((fd = open(fname, O_RDONLY)) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
-				 fname, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+			    "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 		}
 		event_set[Tst_count] = IN_OPEN;
 		Tst_count++;
 
 		if (read(fd, buf, BUF_SIZE) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "read(%d, buf, %d) Failed, errno=%d : %s",
-				 fd, BUF_SIZE, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+			    "read(%d, buf, %d) failed", fd, BUF_SIZE);
 		}
 		event_set[Tst_count] = IN_ACCESS;
 		Tst_count++;
 
 		if (close(fd) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "close(%s) Failed, errno=%d : %s",
-				 fname, errno, strerror(errno));
+			tst_brkm(TBROK, cleanup, "close(%s) failed", fname);
 		}
 		event_set[Tst_count] = IN_CLOSE_NOWRITE;
 		Tst_count++;
 
 		if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
 			tst_brkm(TBROK, cleanup,
-				 "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
-				 fname, errno, strerror(errno));
+			    "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 		}
 		event_set[Tst_count] = IN_OPEN;
 		Tst_count++;
 
 		if (write(fd, buf, BUF_SIZE) == -1) {
 			tst_brkm(TBROK, cleanup,
-				 "write(%d, %s, 1) Failed, errno=%d : %s",
-				 fd, fname, errno, strerror(errno));
+			    "write(%d, %s, 1) failed", fd, fname);
 		}
 		event_set[Tst_count] = IN_MODIFY;
 		Tst_count++;
 
 		if (close(fd) == -1) {
 			tst_brkm(TBROK, cleanup,
-				 "close(%s) Failed, errno=%d : %s",
-				 fname, errno, strerror(errno));
+			    "close(%s) failed", fname);
 		}
 		event_set[Tst_count] = IN_CLOSE_WRITE;
 		Tst_count++;
 
 		if (TST_TOTAL != Tst_count) {
 			tst_brkm(TBROK, cleanup,
-				 "TST_TOTAL and Tst_count are not equal");
+			     "TST_TOTAL and Tst_count are not equal");
 		}
 		Tst_count = 0;
 
@@ -186,9 +179,8 @@
 		int len, i = 0, test_num = 0;
 		if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
 			tst_brkm(TBROK, cleanup,
-				 "read(%d, buf, %d) Failed, errno=%d : %s",
-				 fd_notify, EVENT_BUF_LEN, errno,
-				 strerror(errno));
+			    "read(%d, buf, %d) failed",
+			    fd_notify, EVENT_BUF_LEN);
 
 		}
 
@@ -221,19 +213,15 @@
 			i += EVENT_SIZE + event->len;
 		}
 		for (; test_num < TST_TOTAL; test_num++) {
-			tst_resm(TFAIL, "don't get event: mask=%x ",
-				 event_set[test_num]);
+			tst_resm(TFAIL, "didn't get event: mask=%x",
+			    event_set[test_num]);
 
 		}
 
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -252,40 +240,32 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
-			 fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed",
+			 fname);
 	}
 	if ((write(fd, fname, 1)) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "write(%d, %s, 1) Failed, errno=%d : %s",
-			 fd, fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup, "write(%d, %s, 1) failed",
+		    fd, fname);
 	}
 
 	/* close the file we have open */
 	if (close(fd) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "close(%s) Failed, errno=%d : %s",
-			 fname, errno, strerror(errno));
+		tst_brkm(TBROK, cleanup, "close(%s) failed", fname);
 	}
 	if ((fd_notify = myinotify_init()) < 0) {
 		if (errno == ENOSYS) {
-			tst_resm(TCONF,
+			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
-			tst_resm(TCONF, "Test will not run.");
-			tst_exit();
 		} else {
-			tst_brkm(TBROK, cleanup,
-				 "inotify_init () Failed, errno=%d : %s",
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup, "inotify_init failed");
 		}
 	}
 
 	if ((wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS)) < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "inotify_add_watch (%d, %s, IN_ALL_EVENTS)"
-			 "Failed, errno=%d : %s",
-			 fd_notify, fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+		    "inotify_add_watch (%d, %s, IN_ALL_EVENTS) failed",
+		    fd_notify, fname);
 	};
 
 }				/* End setup() */
@@ -297,15 +277,13 @@
 void cleanup()
 {
 	if (myinotify_rm_watch(fd_notify, wd) < 0) {
-		tst_resm(TWARN, "inotify_rm_watch (%d, %d) Failed,"
-			 "errno=%d : %s",
-			 fd_notify, wd, errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "inotify_rm_watch (%d, %d) failed",
+			 fd_notify, wd);
 
 	}
 
 	if (close(fd_notify) == -1) {
-		tst_resm(TWARN, "close(%d) Failed, errno=%d : %s",
-			 fd_notify, errno, strerror(errno));
+		tst_resm(TWARN, "close(%d) failed", fd_notify);
 	}
 
 	/*
@@ -316,9 +294,6 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 #else
@@ -326,19 +301,9 @@
 char *TCID = "inotify01";	/* Test program identifier.    */
 int TST_TOTAL = 0;		/* Total number of test cases. */
 
-int main()
+int main(void)
 {
-#ifndef __NR_inotify_init
-	tst_resm(TCONF, "This test needs a kernel that has inotify syscall.");
-	tst_resm(TCONF,
-		 "Inotify syscall can be found at kernel 2.6.13 or higher.");
-	return 0;
-#endif
-#ifndef HAVE_SYS_INOTIFY_H
-	tst_resm(TBROK, "can't find header sys/inotify.h");
-	return 1;
-#endif
-	return 0;
+	tst_brkm(TCONF, NULL, "system doesn't have required inotify support");
 }
 
 #endif
diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c
index 6657299..8c26912 100644
--- a/testcases/kernel/syscalls/inotify/inotify02.c
+++ b/testcases/kernel/syscalls/inotify/inotify02.c
@@ -53,8 +53,9 @@
 #include <sys/syscall.h>
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
-#if defined(__NR_inotify_init) && defined(HAVE_SYS_INOTIFY_H)
+#if defined(HAVE_SYS_INOTIFY_H)
 #include <sys/inotify.h>
 
 #ifndef IN_MOVE_SELF
@@ -116,7 +117,7 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -135,18 +136,17 @@
 		 * generate sequence of events
 		 */
 		if (chmod(".", 0755) < 0) {
-			tst_brkm(TBROK, cleanup,
-				 "chmod(\".\", 0755) Failed, errno=%d : %s",
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "chmod(\".\", 0755) failed");
 		}
 		event_set[Tst_count].mask = IN_ISDIR | IN_ATTRIB;
 		strcpy(event_set[Tst_count].name, "");
 		Tst_count++;
 
 		if ((fd = creat(FILE_NAME1, 0755)) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "creat(\"%s\", 755) Failed, errno=%d : %s",
-				 FILE_NAME1, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "creat(\"%s\", 755) failed",
+				 FILE_NAME1);
 		}
 
 		event_set[Tst_count].mask = IN_CREATE;
@@ -157,19 +157,17 @@
 		Tst_count++;
 
 		if (close(fd) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "close(%s) Failed, errno=%d : %s", FILE_NAME1,
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "close(%s) failed", FILE_NAME1);
 		}
 		event_set[Tst_count].mask = IN_CLOSE_WRITE;
 		strcpy(event_set[Tst_count].name, FILE_NAME1);
 		Tst_count++;
 
 		if (rename(FILE_NAME1, FILE_NAME2) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "rename(%s, %s) Failed, errno=%d : %s",
-				 FILE_NAME1, FILE_NAME2, errno,
-				 strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "rename(%s, %s) failed",
+				 FILE_NAME1, FILE_NAME2);
 		}
 		event_set[Tst_count].mask = IN_MOVED_FROM;
 		strcpy(event_set[Tst_count].name, FILE_NAME1);
@@ -179,25 +177,23 @@
 		Tst_count++;
 
 		if (getcwd(fname1, BUF_SIZE) == NULL) {
-			tst_brkm(TBROK | TERRNO, cleanup,
-				 "getcwd(%p, %d) Failed", fname1,
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "getcwd(%p, %d) failed", fname1,
 				 BUF_SIZE);
 		}
 
 		snprintf(fname2, BUF_SIZE, "%s.rename1", fname1);
 		if (rename(fname1, fname2) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "rename(%s, %s) Failed, errno=%d : %s", fname1,
-				 fname2, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "rename(%s, %s) failed", fname1, fname2);
 		}
 		event_set[Tst_count].mask = IN_MOVE_SELF;
 		strcpy(event_set[Tst_count].name, "");
 		Tst_count++;
 
 		if (unlink(FILE_NAME2) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "unlink(%s) Failed, errno=%d : %s", FILE_NAME2,
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "unlink(%s) failed", FILE_NAME2);
 		}
 		event_set[Tst_count].mask = IN_DELETE;
 		strcpy(event_set[Tst_count].name, FILE_NAME2);
@@ -211,15 +207,13 @@
 		 */
 		snprintf(fname3, BUF_SIZE, "%s.rename2", fname1);
 		if (rename(fname2, fname3) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "rename(%s, %s) Failed, errno=%d : %s", fname2,
-				 fname3, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "rename(%s, %s) failed", fname2, fname3);
 		}
 
 		if (rename(fname3, fname1) == -1) {
-			tst_brkm(TBROK, cleanup,
-				 "rename(%s, %s) Failed, errno=%d : %s", fname3,
-				 fname1, errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "rename(%s, %s) failed", fname3, fname1);
 		}
 		event_set[Tst_count].mask = IN_MOVE_SELF;
 		strcpy(event_set[Tst_count].name, "");
@@ -233,11 +227,10 @@
 		Tst_count = 0;
 
 		int len, i = 0, test_num = 0;
-		if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
-			tst_brkm(TBROK, cleanup,
-				 "read(%d, buf, %d) Failed, errno=%d : %s",
-				 fd_notify, EVENT_BUF_LEN, errno,
-				 strerror(errno));
+		if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) == -1) {
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "read(%d, buf, %d) failed",
+				 fd_notify, EVENT_BUF_LEN);
 
 		}
 
@@ -294,15 +287,14 @@
 		}
 
 		for (; test_num < TST_TOTAL; test_num++) {
-			tst_resm(TFAIL, "don't get event: mask=%x ",
-				 event_set[test_num]);
+			tst_resm(TFAIL, "didn't get event: mask=%x ",
+				 event_set[test_num].mask);
 		}
 	}			/* End for TEST_LOOPING */
 
 	/* cleanup and exit */
 	cleanup();
-
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -321,22 +313,18 @@
 
 	if ((fd_notify = myinotify_init()) < 0) {
 		if (errno == ENOSYS) {
-			tst_resm(TCONF,
+			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
-			tst_resm(TCONF, "Test will not run.");
-			tst_exit();
 		} else {
-			tst_brkm(TBROK, cleanup,
-				 "inotify_init () Failed, errno=%d : %s", errno,
-				 strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup,
+				 "inotify_init () failed");
 		}
 	}
 
 	if ((wd = myinotify_add_watch(fd_notify, ".", IN_ALL_EVENTS)) < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "inotify_add_watch (%d, \".\", IN_ALL_EVENTS)"
-			 "Failed, errno=%d : %s", fd_notify, errno,
-			 strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "inotify_add_watch (%d, \".\", IN_ALL_EVENTS) failed",
+			 fd_notify);
 	};
 
 }				/* End setup() */
@@ -349,14 +337,12 @@
 {
 	if (myinotify_rm_watch(fd_notify, wd) < 0) {
 		tst_resm(TWARN,
-			 "inotify_rm_watch (%d, %d) Failed," "errno=%d : %s",
-			 fd_notify, wd, errno, strerror(errno));
+			 "inotify_rm_watch (%d, %d) failed,", fd_notify, wd);
 
 	}
 
 	if (close(fd_notify) == -1) {
-		tst_resm(TWARN, "close(%d) Failed, errno=%d : %s", fd_notify,
-			 errno, strerror(errno));
+		tst_resm(TWARN, "close(%d) failed", fd_notify);
 	}
 
 	/*
@@ -367,9 +353,6 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 #else
@@ -377,19 +360,9 @@
 char *TCID = "inotify02";	/* Test program identifier.    */
 int TST_TOTAL = 0;		/* Total number of test cases. */
 
-int main()
+int main(void)
 {
-#ifndef __NR_inotify_init
-	tst_resm(TCONF, "This test needs a kernel that has inotify syscall.");
-	tst_resm(TCONF,
-		 "Inotify syscall can be found at kernel 2.6.13 or higher.");
-	return 0;
-#endif
-#ifndef HAVE_SYS_INOTIFY_H
-	tst_resm(TBROK, "can't find header sys/inotify.h");
-	return 1;
-#endif
-	return 0;
+	tst_brkm(TCONF, NULL, "system doesn't have required inotify support");
 }
 
 #endif
diff --git a/testcases/kernel/syscalls/inotify/inotify03.c b/testcases/kernel/syscalls/inotify/inotify03.c
index 92b5e51..45cf617 100644
--- a/testcases/kernel/syscalls/inotify/inotify03.c
+++ b/testcases/kernel/syscalls/inotify/inotify03.c
@@ -48,8 +48,9 @@
 #include <signal.h>
 #include "test.h"
 #include "usctest.h"
+#include "linux_syscall_numbers.h"
 
-#if defined(HAVE_SYS_INOTIFY_H) && defined(__NR_inotify_init)
+#if defined(HAVE_SYS_INOTIFY_H)
 #include <sys/inotify.h>
 
 #define EVENT_MAX 1024
@@ -115,16 +116,14 @@
 	int len, i, test_num;
 
 	/* parse standard options */
-	msg = parse_opts(ac, av, (option_t *) options, &help);
-	if (msg != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, options, &help)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* Check for mandatory option of the testcase */
 	if (!Dflag) {
 		tst_brkm(TBROK, NULL, "You must specifiy the device used for "
 			 " mounting with -D option, Run '%s  -h' for option "
 			 " information.", TCID);
-		tst_exit();
 	}
 
 	if (Tflag) {
@@ -174,9 +173,9 @@
 
 	len = read(fd_notify, event_buf, EVENT_BUF_LEN);
 	if (len < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "read(%d, buf, %d) Failed, errno=%d : %s",
-			 fd_notify, EVENT_BUF_LEN, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "read(%d, buf, %d) failed",
+			 fd_notify, EVENT_BUF_LEN);
 	}
 
 	/* check events */
@@ -214,18 +213,15 @@
 	}
 	ret = myinotify_rm_watch(fd_notify, wd);
 	if (ret != -1 || errno != EINVAL)
-		tst_resm(TFAIL, "inotify_rm_watch (%d, %d) return %d "
-			 "errno=%d : %s (instead of %d)",
-			 fd_notify, wd, ret, errno, EINVAL, strerror(errno));
+		tst_resm(TFAIL|TERRNO,
+			"inotify_rm_watch (%d, %d) didn't return EINVAL",
+			fd_notify, wd);
 	else
-		tst_resm(TPASS, "inotify_rm_watch (%d, %d) return %d "
-			 "errno=%d : %s",
-			 fd_notify, wd, ret, errno, strerror(errno));
+		tst_resm(TPASS, "inotify_rm_watch (%d, %d) returned EINVAL",
+			fd_notify, wd);
 
-	/* cleanup and exit */
 	cleanup();
-
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -246,9 +242,8 @@
 	(void)sprintf(mntpoint, "mnt_%d", getpid());
 
 	if (mkdir(mntpoint, DIR_MODE) < 0) {
-		tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) failed; "
-			 "errno = %d: %s", mntpoint, DIR_MODE, errno,
-			 strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
+			mntpoint, DIR_MODE);
 	}
 
 	/* Call mount(2) */
@@ -258,55 +253,46 @@
 	/* check return code */
 	if (TEST_RETURN != 0) {
 		TEST_ERROR_LOG(TEST_ERRNO);
-		tst_brkm(TBROK, cleanup, "mount(2) Failed errno = %d : %s",
-			 TEST_ERRNO, strerror(TEST_ERRNO));
+		tst_brkm(TBROK|TTERRNO, cleanup, "mount(2) failed");
 	}
 	mount_flag = 1;
 
 	sprintf(fname, "%s/tfile_%d", mntpoint, getpid());
 	fd = open(fname, O_RDWR | O_CREAT, 0700);
 	if (fd == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
-			 fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed",
+			 fname);
 	}
 
 	ret = write(fd, fname, 1);
 	if (ret == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "write(%d, %s, 1) Failed, errno=%d : %s",
-			 fd, fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "write(%d, %s, 1) failed",
+			 fd, fname);
 	}
 
 	/* close the file we have open */
 	if (close(fd) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "close(%s) Failed, errno=%d : %s",
-			 fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", fname);
 	}
 
 	fd_notify = myinotify_init();
 
 	if (fd_notify < 0) {
 		if (errno == ENOSYS) {
-			tst_resm(TCONF,
+			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
-			tst_resm(TCONF, "Test will not run.");
-			cleanup();
-			tst_exit();
 		} else {
-			tst_brkm(TBROK, cleanup,
-				 "inotify_init () Failed, errno=%d : %s",
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TERRNO, cleanup, "inotify_init failed");
 		}
 	}
 
 	wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS);
 	if (wd < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "inotify_add_watch (%d, %s, IN_ALL_EVENTS)"
-			 "Failed, errno=%d : %s",
-			 fd_notify, fname, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "inotify_add_watch (%d, %s, IN_ALL_EVENTS) failed.",
+			 fd_notify, fname);
 	};
 
 }				/* End setup() */
@@ -319,17 +305,13 @@
 {
 	free(Fstype);
 	if (close(fd_notify) == -1) {
-		tst_resm(TWARN, "close(%d) Failed, errno=%d : %s",
-			 fd_notify, errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "close(%d) failed", fd_notify);
 	}
 
 	if (mount_flag) {
 		TEST(umount(mntpoint));
 		if (TEST_RETURN != 0) {
-			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TWARN, "umount(2) Failed "
-				 "while unmounting errno = %d : %s",
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TWARN|TTERRNO, "umount(%s) failed", mntpoint);
 		}
 	}
 
@@ -341,9 +323,6 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 /*
@@ -363,17 +342,7 @@
 
 int main()
 {
-#ifndef __NR_inotify_init
-	tst_resm(TCONF, "This test needs a kernel that has inotify syscall.");
-	tst_resm(TCONF,
-		 "Inotify syscall can be found at kernel 2.6.13 or higher.");
-	return 0;
-#endif
-#ifndef HAVE_SYS_INOTIFY_H
-	tst_resm(TBROK, "can't find header sys/inotify.h");
-	return 1;
-#endif
-	return 0;
+	tst_brkm(TCONF, NULL, "system doesn't have required inotify support");
 }
 
 #endif
diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
index 9cdd37a..d7bb0e1 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
@@ -102,9 +102,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -140,10 +137,13 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
 	if (msg != NULL) {
+>>>>>>> master
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
 			"This test can only run on kernels that are 2.6.27 "
@@ -157,12 +157,12 @@
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			fd = syscall(__NR_inotify_init1, 0);
 			if (fd == -1) {
-				tst_brkm(TFAIL, cleanup,
+				tst_brkm(TFAIL|TERRNO, cleanup,
 					"inotify_init1(0) failed");
 			}
 			coe = fcntl(fd, F_GETFD);
 			if (coe == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
+				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
 			}
 			if (coe & FD_CLOEXEC) {
 				tst_brkm(TFAIL, cleanup,
@@ -172,25 +172,23 @@
 
 			fd = syscall(__NR_inotify_init1, IN_CLOEXEC);
 			if (fd == -1) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL|TERRNO, cleanup,
 					 "inotify_init1(IN_CLOEXEC) failed");
-				cleanup();
-				tst_exit();
 			}
 			coe = fcntl(fd, F_GETFD);
 			if (coe == -1) {
 				tst_resm(TBROK|TERRNO, "fcntl failed");
 			} else if ((coe & FD_CLOEXEC) == 0) {
 				tst_resm(TFAIL,
-					"inotify_init1(O_CLOEXEC) does not "
+					"inotify_init1(O_CLOEXEC) did not "
 					"set close-on-exit");
 			} else {
 				close(fd);
 				tst_resm(TPASS, "inotify_init1(O_CLOEXEC) "
 					"PASSED");
 			}
-			cleanup();
 		}
 	}
 	tst_exit();
+	cleanup();
 }
diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
index d603c5e..eacdc95 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
@@ -99,9 +99,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -137,10 +134,13 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
 	if (msg != NULL) {
+>>>>>>> master
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
 			"This test can only run on kernels that are 2.6.27 "
@@ -154,46 +154,36 @@
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			fd = syscall(__NR_inotify_init1, 0);
 			if (fd == -1) {
-				tst_resm(TFAIL, "inotify_init1(0) failed");
-				cleanup();
-				tst_exit();
+				tst_brkm(TFAIL|TERRNO, cleanup,
+					"inotify_init1(0) failed");
 			}
 			fl = fcntl(fd, F_GETFL);
 			if (fl == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
+				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
 			}
 			if (fl & O_NONBLOCK) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL, cleanup,
 					"inotify_init1(0) set non-blocking "
 					"mode");
-				cleanup();
-				tst_exit();
 			}
 			close(fd);
 
 			fd = syscall(__NR_inotify_init1, IN_NONBLOCK);
 			if (fd == -1) {
-				tst_resm(TFAIL,
+				tst_resm(TFAIL|TERRNO, cleanup,
 					 "inotify_init1(IN_NONBLOCK) failed");
-				cleanup();
-				tst_exit();
 			}
 			fl = fcntl(fd, F_GETFL);
 			if (fl == -1) {
-				tst_brkm(TBROK, cleanup, "fcntl failed");
-				tst_exit();
+				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
 			}
 			if ((fl & O_NONBLOCK) == 0) {
-				tst_resm(TFAIL,
+				tst_brkm(TFAIL, cleanup,
 					"inotify_init1(IN_NONBLOCK) set "
 					"non-blocking mode");
-				cleanup();
-				tst_exit();
 			}
 			close(fd);
 			tst_resm(TPASS, "inotify_init1(IN_NONBLOCK) PASSED");
-			cleanup();
 		}
 	}
 	tst_exit();
diff --git a/testcases/kernel/syscalls/io_cancel/io_cancel01.c b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
index 18bd62c..0cbcc5f 100644
--- a/testcases/kernel/syscalls/io_cancel/io_cancel01.c
+++ b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
@@ -73,8 +73,12 @@
 
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/io_destroy/io_destroy01.c b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
index e698da2..140a125 100644
--- a/testcases/kernel/syscalls/io_destroy/io_destroy01.c
+++ b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
@@ -73,8 +73,12 @@
 
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/io_getevents/io_getevents01.c b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
index 8936d9d..91a8509 100644
--- a/testcases/kernel/syscalls/io_getevents/io_getevents01.c
+++ b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
@@ -73,8 +73,12 @@
 
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/io_setup/io_setup01.c b/testcases/kernel/syscalls/io_setup/io_setup01.c
index 0fa0a94..4aeee64 100644
--- a/testcases/kernel/syscalls/io_setup/io_setup01.c
+++ b/testcases/kernel/syscalls/io_setup/io_setup01.c
@@ -46,8 +46,6 @@
 	 * print errno log if that option was specified
 	 */
 	TEST_CLEANUP;
-
-	tst_exit();
 }
 
 /*
@@ -71,10 +69,8 @@
 	io_context_t ctx;
 	int expected_return;
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index 64279c0..c581a14 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -78,8 +78,12 @@
 
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -175,7 +179,7 @@
 		rval = io_setup(1, &ctx);
 		if (rval != 0) {
 			tst_brkm(TBROK, cleanup, "io_setup failed: %d", rval);
-		 /*NOTREACHED*/}
+		 }
 
 		TEST(io_submit(ctx, 1, iocbs));
 		if (TEST_RETURN == 0) {
diff --git a/testcases/kernel/syscalls/ioctl/ioctl01.c b/testcases/kernel/syscalls/ioctl/ioctl01.c
index 1acc239..b083529 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl01.c
@@ -115,7 +115,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	if (!Devflag) {
@@ -126,7 +130,7 @@
 	}
 
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	setup();
@@ -168,7 +172,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ioctl/ioctl02.c b/testcases/kernel/syscalls/ioctl/ioctl02.c
index 73d17e4..f9f772d 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl02.c
@@ -114,7 +114,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "dS", &parentpid, &childtty);
@@ -128,7 +132,7 @@
 	}
 
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	setup();
@@ -146,7 +150,7 @@
 
 		if ((childpid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (childpid == 0) {	/* child */
 #ifdef UCLINUX
@@ -169,7 +173,7 @@
 			kill(childpid, SIGTERM);
 			waitpid(childpid, NULL, 0);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/* run the parent test */
 		if ((rval = run_ptest()) == -1) {
@@ -210,7 +214,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/ioperm/ioperm01.c b/testcases/kernel/syscalls/ioperm/ioperm01.c
index 4069b30..9a59304 100644
--- a/testcases/kernel/syscalls/ioperm/ioperm01.c
+++ b/testcases/kernel/syscalls/ioperm/ioperm01.c
@@ -95,9 +95,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -128,7 +134,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -141,8 +147,8 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	/*
 	 * The value of IO_BITMAP_BITS (include/asm-i386/processor.h) changed
@@ -174,7 +180,7 @@
 	 * Reset I/O privileges for the specified port.
 	 */
 	if ((ioperm(io_addr, NUM_BYTES, TURN_OFF)) == -1) {
-		tst_brkm(TBROK, tst_exit, "ioperm() cleanup failed");
+		tst_brkm(TBROK, NULL, "ioperm() cleanup failed");
 	}
 
 	/*
diff --git a/testcases/kernel/syscalls/ioperm/ioperm02.c b/testcases/kernel/syscalls/ioperm/ioperm02.c
index 92891eb..aa2aa7d 100644
--- a/testcases/kernel/syscalls/ioperm/ioperm02.c
+++ b/testcases/kernel/syscalls/ioperm/ioperm02.c
@@ -116,9 +116,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -173,7 +179,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -194,7 +200,7 @@
 {
 	/* reset user as root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to set uid as root");
+		tst_brkm(TBROK, NULL, "Failed to set uid as root");
 	}
 }
 
@@ -207,12 +213,12 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
 	}
 
 	/* Check if "nobody" user id exists */
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "\"nobody\" user id doesn't exist");
+		tst_brkm(TBROK, NULL, "\"nobody\" user id doesn't exist");
 	}
 
 	/*
diff --git a/testcases/kernel/syscalls/iopl/iopl01.c b/testcases/kernel/syscalls/iopl/iopl01.c
index f5e224d..7048cc3 100644
--- a/testcases/kernel/syscalls/iopl/iopl01.c
+++ b/testcases/kernel/syscalls/iopl/iopl01.c
@@ -89,10 +89,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -126,7 +124,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -139,8 +137,8 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
@@ -167,9 +165,6 @@
 	 */
 	TEST_CLEANUP;
 
-	/* exit with return code appropriate for results */
-	tst_exit();
-
 }				/* End cleanup() */
 
 #else /* __i386__ */
diff --git a/testcases/kernel/syscalls/iopl/iopl02.c b/testcases/kernel/syscalls/iopl/iopl02.c
index 965425c..7efa5b0 100644
--- a/testcases/kernel/syscalls/iopl/iopl02.c
+++ b/testcases/kernel/syscalls/iopl/iopl02.c
@@ -113,10 +113,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -169,7 +167,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -190,7 +188,7 @@
 {
 	/* reset user as root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "Failed to set uid as root");
+		tst_brkm(TBROK, NULL, "Failed to set uid as root");
 	}
 }
 
@@ -203,12 +201,12 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
 	}
 
 	/* Check if "nobody" user id exists */
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "\"nobody\" user id doesn't exist");
+		tst_brkm(TBROK, NULL, "\"nobody\" user id doesn't exist");
 	}
 
 	/* Set up the expected error numbers for -e option */
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
index 9898f2c..5cf2d66 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
@@ -76,7 +76,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -117,7 +121,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
index 7153fd9..a9e687d 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
@@ -78,7 +78,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -131,7 +135,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
index dc45e59..121e29f 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -111,7 +115,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
index fc9de9a..783b09a 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
@@ -110,7 +110,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -148,7 +152,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -169,7 +173,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
index 783e6ee..5de0144 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
@@ -82,7 +82,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
index 783bcf7..0047ce6 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
@@ -87,9 +87,9 @@
 	char *msg;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	maybe_run_child(&do_child_1, "ndd", 1, &msqid, &c1_msgp.type);
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
index 599b37d..cac5d6b 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
@@ -123,7 +123,11 @@
 	/* parse standard options */
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	maybe_run_child(&do_child_1_uclinux, "ndd", 1, &key_uclinux,
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
index 5306800..17aa706 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
@@ -127,7 +127,11 @@
 	/* parse standard options */
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	maybe_run_child(&do_child_1_uclinux, "ndd", 1, &key_uclinux,
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
index 7a220ae..4ea4e0d 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
@@ -120,7 +120,11 @@
 	/* parse standard options */
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	maybe_run_child(&do_child_1_uclinux, "ndd", 1, &key_uclinux,
@@ -452,7 +456,11 @@
 		cleanup();
 
 	MSGMNI = nr_msgqs - get_used_msgqueues();
+<<<<<<< HEAD
+	if (MSGMNI > MAXNPROCS)
+=======
 	if ( MSGMNI > MAXNPROCS )
+>>>>>>> master
 		MSGMNI = MAXNPROCS;
 	if (MSGMNI <= 0) {
 		tst_resm(TBROK,
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
index b8e484c..bf74033 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
@@ -130,7 +130,11 @@
 	/* parse standard options */
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	maybe_run_child(&do_child_1_uclinux, "ndd", 1, &key_uclinux,
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget01.c b/testcases/kernel/syscalls/ipc/msgget/msgget01.c
index 77ceb5a..ef3c999 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget01.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget01.c
@@ -73,7 +73,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -119,7 +123,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget02.c b/testcases/kernel/syscalls/ipc/msgget/msgget02.c
index 2674f91..7bba407 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget02.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget02.c
@@ -91,7 +91,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -141,7 +145,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget03.c b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
index 7bec9a0..6a5a9f6 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget03.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
@@ -76,7 +76,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -119,7 +123,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget04.c b/testcases/kernel/syscalls/ipc/msgget/msgget04.c
index 4c5bf7e..7f69c8a 100644
--- a/testcases/kernel/syscalls/ipc/msgget/msgget04.c
+++ b/testcases/kernel/syscalls/ipc/msgget/msgget04.c
@@ -79,7 +79,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -125,7 +129,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -144,7 +148,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
index 747044e..99dbfce 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv01.c
@@ -87,7 +87,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "d", &msg_q_1);
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
index a036f2c..0fd5209 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv02.c
@@ -101,7 +101,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -142,7 +146,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -163,7 +167,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
index d70b8bf..677a2a2 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c
@@ -89,7 +89,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -130,7 +134,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv04.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv04.c
index 37eb0c7..e1ad660 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv04.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv04.c
@@ -100,7 +100,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -141,7 +145,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
index 650b72c..68869c4 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
@@ -93,7 +93,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "d", &msg_q_1);
@@ -158,7 +162,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
index 34b7a40..819c1a8 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv06.c
@@ -95,7 +95,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "d", &msg_q_1);
@@ -164,7 +168,7 @@
 		}
 	}
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
index 8a6d854..1001d55 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd01.c
@@ -81,7 +81,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -136,7 +140,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
index 545e074..6fe5ee5 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd02.c
@@ -92,7 +92,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -130,7 +134,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -149,7 +153,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd03.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd03.c
index 3d502aa..71b31d2 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd03.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd03.c
@@ -98,7 +98,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -142,7 +146,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd04.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd04.c
index e6481a7..f0c82c4 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd04.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd04.c
@@ -76,7 +76,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -115,7 +119,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
index f900cab..a027fa6 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
@@ -97,7 +97,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "d", &msg_q_1);
@@ -162,7 +166,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
index 3163894..8de4457 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd06.c
@@ -91,7 +91,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 #define PIPE_NAME	"msgsnd06"
@@ -172,7 +176,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl01.c b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
index 1fa08ed..f226a75 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl01.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
@@ -147,7 +147,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = av[0];
@@ -249,7 +253,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl02.c b/testcases/kernel/syscalls/ipc/semctl/semctl02.c
index 394a406..5852643 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl02.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl02.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -114,7 +118,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -133,7 +137,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl03.c b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
index 351f320..a53245b 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl03.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl03.c
@@ -104,7 +104,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -140,7 +144,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl04.c b/testcases/kernel/syscalls/ipc/semctl/semctl04.c
index ebc67da..59ca88e 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl04.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl04.c
@@ -83,7 +83,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl05.c b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
index c4296c8..63291a1 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl05.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl05.c
@@ -103,7 +103,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -143,7 +147,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl06.c b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
index a42e4cb..644e83a 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl06.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
@@ -116,7 +116,11 @@
 	char *msg;
 	if ((msg =
 	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	argv0 = argv[0];
diff --git a/testcases/kernel/syscalls/ipc/semget/semget01.c b/testcases/kernel/syscalls/ipc/semget/semget01.c
index 219fc1d..3899869 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget01.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget01.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -115,7 +119,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semget/semget02.c b/testcases/kernel/syscalls/ipc/semget/semget02.c
index a4562d4..3f18f2c 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget02.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget02.c
@@ -85,7 +85,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -122,7 +126,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -132,7 +136,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/semget/semget03.c b/testcases/kernel/syscalls/ipc/semget/semget03.c
index 6907d35..388055f 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget03.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget03.c
@@ -67,7 +67,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -104,7 +108,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semget/semget05.c b/testcases/kernel/syscalls/ipc/semget/semget05.c
index 2171d3e..2b5c149 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget05.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget05.c
@@ -81,7 +81,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Set the MAXIDS for the specific machine by reading the system limit
@@ -132,7 +136,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semget/semget06.c b/testcases/kernel/syscalls/ipc/semget/semget06.c
index 47b42f7..c84fc7a 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget06.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget06.c
@@ -73,7 +73,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -114,7 +118,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop01.c b/testcases/kernel/syscalls/ipc/semop/semop01.c
index e9e29ea..7b0d612 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop01.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop01.c
@@ -83,7 +83,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -144,7 +148,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return (0);
+	  return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop02.c b/testcases/kernel/syscalls/ipc/semop/semop02.c
index 995b58b..329e249 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop02.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop02.c
@@ -109,7 +109,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -148,7 +152,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -160,7 +164,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/semop/semop03.c b/testcases/kernel/syscalls/ipc/semop/semop03.c
index fdaacf5..e3b1044 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop03.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop03.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -123,7 +127,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop04.c b/testcases/kernel/syscalls/ipc/semop/semop04.c
index ddd7af2..b2ae8da 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop04.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop04.c
@@ -87,7 +87,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -140,7 +144,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop05.c b/testcases/kernel/syscalls/ipc/semop/semop05.c
index c20ed88..b2a47a6 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop05.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop05.c
@@ -117,7 +117,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "dd", &i_uclinux, &sem_id_1);
@@ -218,7 +222,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat01.c b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
index a2554c5..0c0e8b6 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat01.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
@@ -92,7 +92,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -139,7 +143,7 @@
 
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat02.c b/testcases/kernel/syscalls/ipc/shmat/shmat02.c
index adfef3d..f9aaf8a 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat02.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat02.c
@@ -111,7 +111,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -157,7 +161,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -169,7 +173,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat03.c b/testcases/kernel/syscalls/ipc/shmat/shmat03.c
index 2f3abe9..d2af29c 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat03.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat03.c
@@ -80,7 +80,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
index 0b396ad..cd21b3c 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
@@ -142,7 +142,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = av[0];
@@ -214,7 +218,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
index 2f5e4b0..d68e299 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl02.c
@@ -111,7 +111,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -157,7 +161,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -169,7 +173,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
index 29ad293..3cd3e60 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl03.c
@@ -100,7 +100,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
index 8e6e7de..e96c76a 100644
--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
+++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl04.c
@@ -62,7 +62,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -88,7 +92,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
index af8c3a4..aa7082e 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
+++ b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
@@ -84,7 +84,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -125,7 +129,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c b/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
index c3d1ee9..5210ec6 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
+++ b/testcases/kernel/syscalls/ipc/shmdt/shmdt02.c
@@ -65,7 +65,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -103,7 +107,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget01.c b/testcases/kernel/syscalls/ipc/shmget/shmget01.c
index 3494d63..823f3f2 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget01.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget01.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -142,7 +146,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget02.c b/testcases/kernel/syscalls/ipc/shmget/shmget02.c
index d512d89..b476359 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget02.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget02.c
@@ -99,7 +99,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -139,7 +143,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget03.c b/testcases/kernel/syscalls/ipc/shmget/shmget03.c
index 6738ce3..e3ef703 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget03.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget03.c
@@ -76,7 +76,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -116,7 +120,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget04.c b/testcases/kernel/syscalls/ipc/shmget/shmget04.c
index 7a5f22a..54ba0af 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget04.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget04.c
@@ -70,7 +70,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -109,7 +113,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -128,7 +132,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget05.c b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
index ad9c898..70beb0a 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget05.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
@@ -79,7 +79,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -99,7 +103,7 @@
 
 		cleanup();
 
-	 /*NOTREACHED*/} else {	/* parent */
+	 } else {	/* parent */
 		/* wait for the child to return */
 		if (waitpid(pid, NULL, 0) == -1) {
 			tst_brkm(TBROK, cleanup, "waitpid failed");
diff --git a/testcases/kernel/syscalls/keyctl/keyctl01.c b/testcases/kernel/syscalls/keyctl/keyctl01.c
index 6205ce6..f4d612e 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl01.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl01.c
@@ -125,7 +125,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
@@ -178,7 +182,7 @@
 
 	}
 	cleanup();
-	/* NOTREACHED */
+	
 	return (1);
 }
 #else
diff --git a/testcases/kernel/syscalls/kill/kill01.c b/testcases/kernel/syscalls/kill/kill01.c
index 49e483d..017faeb 100644
--- a/testcases/kernel/syscalls/kill/kill01.c
+++ b/testcases/kernel/syscalls/kill/kill01.c
@@ -82,7 +82,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -117,7 +121,7 @@
 		if (TEST_RETURN == -1) {
 			tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-		 /*NOTREACHED*/}
+		 }
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -139,7 +143,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -150,7 +154,7 @@
 	int exno = 1;
 
 	pause();
-	 /*NOTREACHED*/ exit(exno);
+	  exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill03.c b/testcases/kernel/syscalls/kill/kill03.c
index 89e4aea..ff4ef09 100644
--- a/testcases/kernel/syscalls/kill/kill03.c
+++ b/testcases/kernel/syscalls/kill/kill03.c
@@ -84,7 +84,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -124,7 +128,7 @@
 				 "Expected a return value of -1 got %ld",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO),
 				 TEST_RETURN);
-		 /*NOTREACHED*/}
+		 }
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -146,7 +150,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -157,7 +161,7 @@
 	int exno = 1;
 
 	pause();
-	 /*NOTREACHED*/ exit(exno);
+	  exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill04.c b/testcases/kernel/syscalls/kill/kill04.c
index 58590da..f631b94 100644
--- a/testcases/kernel/syscalls/kill/kill04.c
+++ b/testcases/kernel/syscalls/kill/kill04.c
@@ -84,7 +84,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -140,7 +144,7 @@
 				 "Expected a return value of -1 got %ld",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO),
 				 TEST_RETURN);
-		 /*NOTREACHED*/}
+		 }
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -162,7 +166,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -173,7 +177,7 @@
 	int exno = 1;
 
 	pause();
-	 /*NOTREACHED*/ exit(exno);
+	  exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill05.c b/testcases/kernel/syscalls/kill/kill05.c
index 0bd76aa..9586ebe 100644
--- a/testcases/kernel/syscalls/kill/kill05.c
+++ b/testcases/kernel/syscalls/kill/kill05.c
@@ -107,7 +107,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -127,7 +131,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill06.c b/testcases/kernel/syscalls/kill/kill06.c
index 4bddbdf..cf3aa1f 100644
--- a/testcases/kernel/syscalls/kill/kill06.c
+++ b/testcases/kernel/syscalls/kill/kill06.c
@@ -83,7 +83,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -126,7 +130,7 @@
 			/* Kill all processes in this process group */
 			TEST(kill(-getpgrp(), TEST_SIG));
 			sleep(300);
-			 /*NOTREACHED*/
+			 
 			    tst_resm(TINFO, "%d never recieved a"
 				     " signal", getpid());
 			exit(exno);
@@ -159,7 +163,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -170,7 +174,7 @@
 	int exno = 1;
 
 	sleep(299);
-	 /*NOTREACHED*/
+	 
 	    tst_resm(TINFO, "%d never recieved a" " signal", getpid());
 	exit(exno);
 }
diff --git a/testcases/kernel/syscalls/kill/kill07.c b/testcases/kernel/syscalls/kill/kill07.c
index 5c11dd9..9eeea4e 100644
--- a/testcases/kernel/syscalls/kill/kill07.c
+++ b/testcases/kernel/syscalls/kill/kill07.c
@@ -95,7 +95,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -153,7 +157,7 @@
 		if (TEST_RETURN == -1) {
 			tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-		 /*NOTREACHED*/}
+		 }
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -180,11 +184,11 @@
 		}
 		if (shmdt(flag)) {
 			tst_brkm(TBROK, cleanup, "shmdt failed ");
-		 /*NOTREACHED*/}
+		 }
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -206,7 +210,7 @@
 	int exno = 1;
 
 	sleep(300);
-	 /*NOTREACHED*/ tst_resm(TINFO, "Child never recieved a signal");
+	  tst_resm(TINFO, "Child never recieved a signal");
 	exit(exno);
 }
 
diff --git a/testcases/kernel/syscalls/kill/kill08.c b/testcases/kernel/syscalls/kill/kill08.c
index 56abb84..67c4858 100644
--- a/testcases/kernel/syscalls/kill/kill08.c
+++ b/testcases/kernel/syscalls/kill/kill08.c
@@ -83,7 +83,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
@@ -126,7 +130,7 @@
 			/* Kill all processes in this process group */
 			TEST(kill(0, TEST_SIG));
 			pause();
-			 /*NOTREACHED*/ exit(exno);
+			  exit(exno);
 		} else {
 			waitpid(pid1, &status, 0);
 			if (TEST_RETURN != 0) {
@@ -156,7 +160,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -167,7 +171,7 @@
 	int exno = 1;
 
 	pause();
-	 /*NOTREACHED*/ exit(exno);
+	  exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
index fb70c12..303857a 100644
--- a/testcases/kernel/syscalls/kill/kill10.c
+++ b/testcases/kernel/syscalls/kill/kill10.c
@@ -226,25 +226,25 @@
 	Tst_nobuf = 1;
 
 	if ((msg = parse_opts(ac, av, options, &help))) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (nflag) {
 		if (sscanf(narg, "%i", &num_procs) != 1) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 			    "-n option arg is not a number");
 		}
 	}
 	if (gflag) {
 		if (sscanf(garg, "%i", &num_pgrps) != 1) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 			    "-g option arg is not a number");
 		}
 	}
 
 	if (dflag) {
 		if (sscanf(darg, "%i", &debug_flag) != 1) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 			    "-d option arg is not a number");
 		}
 	}
diff --git a/testcases/kernel/syscalls/kill/kill11.c b/testcases/kernel/syscalls/kill/kill11.c
index d2dd9f4..20ed012 100644
--- a/testcases/kernel/syscalls/kill/kill11.c
+++ b/testcases/kernel/syscalls/kill/kill11.c
@@ -101,7 +101,12 @@
 
 #ifdef UCLINUX
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg =
+	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+=======
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+>>>>>>> master
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	maybe_run_child(&do_child, "dd", &temp, &sig);
diff --git a/testcases/kernel/syscalls/lchown/lchown01.c b/testcases/kernel/syscalls/lchown/lchown01.c
index 1ac3bb3..d78d450 100644
--- a/testcases/kernel/syscalls/lchown/lchown01.c
+++ b/testcases/kernel/syscalls/lchown/lchown01.c
@@ -114,9 +114,15 @@
 	char *msg;
 	int i;
 
+<<<<<<< HEAD
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	}
+=======
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
+>>>>>>> master
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/lchown/lchown02.c b/testcases/kernel/syscalls/lchown/lchown02.c
index 5411a20..4b98781 100644
--- a/testcases/kernel/syscalls/lchown/lchown02.c
+++ b/testcases/kernel/syscalls/lchown/lchown02.c
@@ -152,9 +152,15 @@
 	gid_t group_id;
 	int i;
 
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	}
+=======
 	/* Parse standard options given to run the test. */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	setup();
 	/* set the expected errnos... */
diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
index d2a3965..038408d 100644
--- a/testcases/kernel/syscalls/linkat/linkat01.c
+++ b/testcases/kernel/syscalls/linkat/linkat01.c
@@ -211,7 +211,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/listen/listen01.c b/testcases/kernel/syscalls/listen/listen01.c
index 94f6918..c94dd1f 100644
--- a/testcases/kernel/syscalls/listen/listen01.c
+++ b/testcases/kernel/syscalls/listen/listen01.c
@@ -92,7 +92,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -128,7 +132,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 void setup(void)
diff --git a/testcases/kernel/syscalls/llseek/llseek01.c b/testcases/kernel/syscalls/llseek/llseek01.c
index 426f4bc..7638508 100644
--- a/testcases/kernel/syscalls/llseek/llseek01.c
+++ b/testcases/kernel/syscalls/llseek/llseek01.c
@@ -106,7 +106,11 @@
 	loff_t offset;		/* Ret value from llseek */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -191,7 +195,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/llseek/llseek02.c b/testcases/kernel/syscalls/llseek/llseek02.c
index 04566f4..698e8a9 100644
--- a/testcases/kernel/syscalls/llseek/llseek02.c
+++ b/testcases/kernel/syscalls/llseek/llseek02.c
@@ -129,7 +129,11 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -187,7 +191,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/lseek/lseek06.c b/testcases/kernel/syscalls/lseek/lseek06.c
index b5cb66c..2ae7e92 100644
--- a/testcases/kernel/syscalls/lseek/lseek06.c
+++ b/testcases/kernel/syscalls/lseek/lseek06.c
@@ -98,7 +98,11 @@
 	char read_buf[1];	/* data read from temp. file */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -168,7 +172,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/lseek/lseek07.c b/testcases/kernel/syscalls/lseek/lseek07.c
index 1a6c156..013dcdc 100644
--- a/testcases/kernel/syscalls/lseek/lseek07.c
+++ b/testcases/kernel/syscalls/lseek/lseek07.c
@@ -102,7 +102,11 @@
 	off_t offset;		/* byte position in temporary file */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -209,7 +213,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/lseek/lseek08.c b/testcases/kernel/syscalls/lseek/lseek08.c
index 1879886..fc74ce3 100644
--- a/testcases/kernel/syscalls/lseek/lseek08.c
+++ b/testcases/kernel/syscalls/lseek/lseek08.c
@@ -98,7 +98,11 @@
 	char read_buf[1];	/* data read from temp. file */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -160,7 +164,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return 0;
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/lseek/lseek09.c b/testcases/kernel/syscalls/lseek/lseek09.c
index c4b5b8e..1023a00 100644
--- a/testcases/kernel/syscalls/lseek/lseek09.c
+++ b/testcases/kernel/syscalls/lseek/lseek09.c
@@ -100,7 +100,11 @@
 	char read_buf[BUFSIZ];	/* data read from temp. file */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -180,7 +184,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/lseek/lseek10.c b/testcases/kernel/syscalls/lseek/lseek10.c
index 7781496..582e4dd 100644
--- a/testcases/kernel/syscalls/lseek/lseek10.c
+++ b/testcases/kernel/syscalls/lseek/lseek10.c
@@ -132,7 +132,11 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -191,7 +195,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/lstat/lstat01.c b/testcases/kernel/syscalls/lstat/lstat01.c
index 09a5d98..ce5f0c8 100644
--- a/testcases/kernel/syscalls/lstat/lstat01.c
+++ b/testcases/kernel/syscalls/lstat/lstat01.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/lstat/lstat02.c b/testcases/kernel/syscalls/lstat/lstat02.c
index 0e56dcb..8c26102 100644
--- a/testcases/kernel/syscalls/lstat/lstat02.c
+++ b/testcases/kernel/syscalls/lstat/lstat02.c
@@ -152,7 +152,11 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -214,7 +218,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -233,7 +237,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/lstat/lstat03.c b/testcases/kernel/syscalls/lstat/lstat03.c
index 4d67a9e..46bbb88 100644
--- a/testcases/kernel/syscalls/lstat/lstat03.c
+++ b/testcases/kernel/syscalls/lstat/lstat03.c
@@ -87,8 +87,8 @@
 char *TCID = "lstat03";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
-uid_t User_id;			/* user id/group id of test process */
-gid_t Group_id;
+uid_t user_id;			/* user id/group id of test process */
+gid_t group_id;
 
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
@@ -103,7 +103,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -139,8 +143,8 @@
 			 * Verify the data returned by lstat(2)
 			 * aganist the expected data.
 			 */
-			if ((stat_buf.st_uid != User_id) ||
-			    (stat_buf.st_gid != Group_id) ||
+			if ((stat_buf.st_uid != user_id) ||
+			    (stat_buf.st_gid != group_id) ||
 			    (!(stat_buf.st_mode && S_IFLNK)) ||
 			    (stat_buf.st_size != strlen(TESTFILE))) {
 				tst_resm(TFAIL, "Functionality of lstat(2) on "
@@ -157,7 +161,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -180,7 +184,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -229,8 +233,8 @@
 	}
 
 	/* Get the uid/gid of the process */
-	User_id = getuid();
-	Group_id = getgid();
+	user_id = getuid();
+	group_id = getgid();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
index 198ba83..b0c2304 100644
--- a/testcases/kernel/syscalls/mbind/mbind01.c
+++ b/testcases/kernel/syscalls/mbind/mbind01.c
@@ -361,7 +361,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/memmap/mem03.c b/testcases/kernel/syscalls/memmap/mem03.c
index 9d135a6..10c28c9 100644
--- a/testcases/kernel/syscalls/memmap/mem03.c
+++ b/testcases/kernel/syscalls/memmap/mem03.c
@@ -141,7 +141,7 @@
 	/* clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mkdir/mkdir01.c b/testcases/kernel/syscalls/mkdir/mkdir01.c
index 0966d4e..72dffd2 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir01.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir01.c
@@ -129,6 +129,12 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
+<<<<<<< HEAD
+    /***************************************************************
+     * parse standard options
+     ***************************************************************/
+=======
+>>>>>>> master
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
diff --git a/testcases/kernel/syscalls/mkdir/mkdir02.c b/testcases/kernel/syscalls/mkdir/mkdir02.c
index 7f00d2c..515c7fa 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir02.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir02.c
@@ -107,7 +107,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -135,7 +139,7 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TFAIL, cleanup, "fork() failed");
-			/* NOTREACHED */
+			
 		}
 
 		if (pid == 0) {	/* first child */
@@ -147,7 +151,7 @@
 					 "effective gid to %d",
 					 ltpuser1->pw_gid, ltpuser1->pw_gid);
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			/* being ltupuser1 */
 			rval = setreuid(ltpuser1->pw_uid, ltpuser1->pw_uid);
@@ -158,7 +162,7 @@
 					 "effective uid to %d",
 					 ltpuser1->pw_uid, ltpuser1->pw_uid);
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 
 			/*
@@ -171,7 +175,7 @@
 					 " a directory with Set "
 					 " group ID turn on ");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			if (stat(tstdir1, &buf1) == -1) {
 				perror("stat");
@@ -179,18 +183,18 @@
 					 "failed to stat the new directory"
 					 "in mkdir()");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			if (chmod(tstdir1, buf1.st_mode | S_ISGID) != 0) {
 				perror("chmod");
 				tst_resm(TFAIL, "failed to set S_ISGID bit");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 
 			/* Successfully create the parent directory */
 			exit(0);
-			/* NOTREACHED */
+			
 		}
 		wait(&status);
 		if (WEXITSTATUS(status) != 0) {
@@ -211,7 +215,7 @@
 		if ((pid1 = FORK_OR_VFORK()) < 0) {
 			perror("fork failed");
 			tst_brkm(TFAIL, cleanup, "fork() failed");
-			/* NOTREACHED */
+			
 		} else if (pid1 == 0) {	/* second child */
 
 			/* being user ltpuser2 */
@@ -223,7 +227,7 @@
 					 ltpuser2->pw_gid, ltpuser2->pw_gid);
 				perror("setregid");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			rval = setreuid(ltpuser2->pw_uid, ltpuser2->pw_uid);
 			if (rval < 0) {
@@ -233,7 +237,7 @@
 					 ltpuser2->pw_uid, ltpuser2->pw_uid);
 				perror("setreuid");
 				exit(1);
-				/* NOTREACHED */
+				
 
 			}
 
@@ -247,7 +251,7 @@
 					 " a directory %s under %s ", tstdir2,
 					 tstdir1);
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			/*
 			 * check the group ID
@@ -259,14 +263,14 @@
 					 "failed to stat the new directory"
 					 "in mkdir()");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			if (stat(tstdir1, &buf1) == -1) {
 				tst_resm(TFAIL,
 					 "failed to stat the new directory"
 					 "in mkdir()");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			if (buf.st_gid != buf1.st_gid) {
 				tst_resm(TFAIL, "mkdir() FAILED to inherit "
@@ -274,7 +278,7 @@
 					 " directory %d",
 					 buf.st_gid, buf1.st_gid);
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 
 			/* check the S_ISGID  bit */
@@ -283,11 +287,11 @@
 					 " the S_ISGID bit from parent "
 					 " directory");
 				exit(1);
-				/* NOTREACHED */
+				
 			}
 			/* PASS */
 			exit(0);
-			/* NOTREACHED */
+			
 		}
 
 		waitpid(pid1, &status, 0);
@@ -298,7 +302,7 @@
 			tst_resm(TFAIL, "Test to attempt to make a directory"
 				 " inherits group ID FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 	}			/* End for TEST_LOOPING */
 
@@ -307,7 +311,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mkdir/mkdir03.c b/testcases/kernel/syscalls/mkdir/mkdir03.c
index abd5559..5052367 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir03.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir03.c
@@ -139,7 +139,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -192,7 +196,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
@@ -252,7 +256,7 @@
 	/* create a file */
 	if ((fileHandle2 = creat(tstfile5, PERMS)) == -1) {
 		tst_brkm(TBROK, cleanup, "creat a file failed");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mkdir/mkdir04.c b/testcases/kernel/syscalls/mkdir/mkdir04.c
index 045534d..238d6cb 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir04.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir04.c
@@ -111,7 +111,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -136,7 +140,7 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TBROK, cleanup, "fork #1 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* first child */
 			/* set to ltpuser1 */
@@ -148,13 +152,13 @@
 					 ltpuser1->pw_uid, ltpuser1->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 			/* create the parent directory with 0700 permits */
 			if (mkdir(tstdir1, PERMS) == -1) {
 				tst_resm(TFAIL, "mkdir(%s, %#o) Failed",
 					 tstdir1, PERMS);
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 			/* create tstdir1 succeeded */
 			exit(0);
 		}
@@ -170,7 +174,7 @@
 
 		if ((pid1 = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TBROK, cleanup, "fork #2 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid1 == 0) {	/* second child */
 			/* set to ltpuser2 */
@@ -182,17 +186,17 @@
 					 ltpuser2->pw_uid, ltpuser2->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 			if (mkdir(tstdir2, PERMS) != -1) {
 				tst_resm(TFAIL, "mkdir(%s, %#o) unexpected "
 					 "succeeded", tstdir2, PERMS);
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 			if (errno != EACCES) {
 				tst_resm(TFAIL, "Expected EACCES got %d",
 					 errno);
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 			/* PASS */
 			exit(0);
 		}
@@ -213,7 +217,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -223,8 +227,8 @@
 {
 	/* must run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run this as root");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must run this as root");
+	 }
 
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/syscalls/mkdir/mkdir05.c b/testcases/kernel/syscalls/mkdir/mkdir05.c
index 092fdb1..66f28ac 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir05.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir05.c
@@ -98,7 +98,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -134,7 +138,7 @@
 			if (stat(tstdir1, &buf) == -1) {
 				tst_brkm(TBROK, cleanup, "failed to stat the "
 					 "new directory");
-			 /*NOTREACHED*/}
+			 }
 			/* check the owner */
 			if (buf.st_uid != geteuid()) {
 				tst_resm(TFAIL, "mkdir() FAILED to set owner ID"
@@ -163,7 +167,7 @@
 	 * cleanup and exit
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -173,7 +177,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/mkdir/mkdir08.c b/testcases/kernel/syscalls/mkdir/mkdir08.c
index f6b01f3..55d0e8a 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir08.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir08.c
@@ -139,7 +139,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
index 3ab0c65..4fde6fc 100644
--- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
@@ -91,7 +91,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/mknod/mknod02.c b/testcases/kernel/syscalls/mknod/mknod02.c
index 4956504..b2b010f 100644
--- a/testcases/kernel/syscalls/mknod/mknod02.c
+++ b/testcases/kernel/syscalls/mknod/mknod02.c
@@ -110,7 +110,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -198,7 +202,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod03.c b/testcases/kernel/syscalls/mknod/mknod03.c
index 1c84bb4..b8013d8 100644
--- a/testcases/kernel/syscalls/mknod/mknod03.c
+++ b/testcases/kernel/syscalls/mknod/mknod03.c
@@ -110,7 +110,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -197,7 +201,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod04.c b/testcases/kernel/syscalls/mknod/mknod04.c
index 9fee08c..e0c95a6 100644
--- a/testcases/kernel/syscalls/mknod/mknod04.c
+++ b/testcases/kernel/syscalls/mknod/mknod04.c
@@ -110,7 +110,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -197,7 +201,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod05.c b/testcases/kernel/syscalls/mknod/mknod05.c
index 9ab0c04..5dd4f7b 100644
--- a/testcases/kernel/syscalls/mknod/mknod05.c
+++ b/testcases/kernel/syscalls/mknod/mknod05.c
@@ -110,7 +110,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -196,7 +200,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod06.c b/testcases/kernel/syscalls/mknod/mknod06.c
index e51c76c..7b97146 100644
--- a/testcases/kernel/syscalls/mknod/mknod06.c
+++ b/testcases/kernel/syscalls/mknod/mknod06.c
@@ -142,7 +142,11 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -207,7 +211,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod07.c b/testcases/kernel/syscalls/mknod/mknod07.c
index e803c8f..ffd22a9 100644
--- a/testcases/kernel/syscalls/mknod/mknod07.c
+++ b/testcases/kernel/syscalls/mknod/mknod07.c
@@ -124,7 +124,11 @@
 	int mode;		/* creation mode for the node created */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -184,7 +188,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -206,7 +210,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/mknod/mknod08.c b/testcases/kernel/syscalls/mknod/mknod08.c
index 1a673c5..502314b 100644
--- a/testcases/kernel/syscalls/mknod/mknod08.c
+++ b/testcases/kernel/syscalls/mknod/mknod08.c
@@ -109,7 +109,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -195,7 +199,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknod/mknod09.c b/testcases/kernel/syscalls/mknod/mknod09.c
index f2f4dbb..5510f46 100644
--- a/testcases/kernel/syscalls/mknod/mknod09.c
+++ b/testcases/kernel/syscalls/mknod/mknod09.c
@@ -89,7 +89,11 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -137,7 +141,7 @@
 	/* Call cleanup */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index f703548..c6be3d0 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -99,7 +99,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/mlock/mlock03.c b/testcases/kernel/syscalls/mlock/mlock03.c
index d11e42d..3008713 100644
--- a/testcases/kernel/syscalls/mlock/mlock03.c
+++ b/testcases/kernel/syscalls/mlock/mlock03.c
@@ -58,7 +58,7 @@
 
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		fp = fopen("/proc/self/maps", "r");
diff --git a/testcases/kernel/syscalls/mlockall/mlockall01.c b/testcases/kernel/syscalls/mlockall/mlockall01.c
index 42b87f1..9c21c73 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall01.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall01.c
@@ -160,7 +160,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* set the expected errnos... */
diff --git a/testcases/kernel/syscalls/mmap/mmap001.c b/testcases/kernel/syscalls/mmap/mmap001.c
index 58ae0d8..e344625 100644
--- a/testcases/kernel/syscalls/mmap/mmap001.c
+++ b/testcases/kernel/syscalls/mmap/mmap001.c
@@ -50,8 +50,6 @@
 	TEST_CLEANUP;
 
 	tst_rmdir();
-
-	tst_exit();
 }
 
 void setup()
@@ -69,7 +67,10 @@
 
 	snprintf(buf, 1024, "testfile.%d", getpid());
 
-	filename = strdup(buf);
+	if ((filename = strdup(buf)) == NULL) {
+		tst_brkm(TBROK|TERRNO, cleanup, "strdup failed");
+	}
+	
 }
 
 void help()
@@ -94,14 +95,14 @@
 	unsigned int pages, memsize;
 
 	if ((msg = parse_opts(argc, argv, options, help)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	if (m_opt) {
 		memsize = pages = atoi(m_copt);
 
 		if (memsize < 1) {
 			tst_brkm(TBROK, cleanup, "Invalid arg for -m: %s",
-				 m_copt);
+				m_copt);
 		}
 
 		memsize *= getpagesize();	/* N PAGES */
@@ -115,40 +116,43 @@
 	}
 
 	tst_resm(TINFO, "mmap()ing file of %u pages or %u bytes", pages,
-		 memsize);
+		memsize);
 
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		fd = open(filename, O_RDWR | O_CREAT, 0666);
+		fd = open(filename, O_RDWR|O_CREAT, 0666);
 		if ((fd == -1))
-			tst_brkm(TBROK, cleanup, "Problems opening files");
+			tst_brkm(TBROK|TERRNO, cleanup,
+				"opening %s failed", filename);
 
 		if (lseek(fd, memsize, SEEK_SET) != memsize) {
+			TEST_ERRNO = errno;
 			close(fd);
-			tst_brkm(TBROK, cleanup,
-				 "Problems doing the lseek: %d: %s", errno,
-				 strerror(errno));
+			tst_brkm(TBROK|TTERRNO, cleanup, "lseek failed");
 		}
 
 		if (write(fd, "\0", 1) != 1) {
+			TEST_ERRNO = errno;
 			close(fd);
-			tst_brkm(TBROK, cleanup, "Problems writing: %d: %s",
-				 errno, strerror(errno));
+			tst_brkm(TBROK|TTERRNO, cleanup,
+				"writing to %s failed", filename);
 		}
 
 		array = mmap(0, memsize, PROT_WRITE, MAP_SHARED, fd, 0);
 		if (array == (char *)MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() failed: %d: %s",
-				 errno, strerror(errno));
-			tst_exit();
+			TEST_ERRNO = errno;
+			close(fd);
+			tst_brkm(TBROK|TTERRNO, cleanup,
+				"mmapping %s failed", filename);
 		} else {
 			tst_resm(TPASS, "mmap() completed successfully.");
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
+
 			tst_resm(TINFO, "touching mmaped memory");
 
 			for (i = 0; i < memsize; i++) {
@@ -156,8 +160,8 @@
 			}
 
 			/*
-			 * seems that if the map area was bad, we'd get SEGV, hence we can
-			 * indicate a PASS.
+			 * seems that if the map area was bad, we'd get SEGV,
+			 * hence we can indicate a PASS.
 			 */
 			tst_resm(TPASS,
 				 "we're still here, mmaped area must be good");
@@ -165,10 +169,11 @@
 			TEST(msync(array, memsize, MS_SYNC));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL, "msync() failed: errno: %d: %s",
-					 TEST_ERRNO, strerror(TEST_ERRNO));
+				tst_resm(TFAIL|TTERRNO,
+					"synchronizing mmapped page failed");
 			} else {
-				tst_resm(TPASS, "msync() was successful");
+				tst_resm(TPASS,
+					"synchronizing mmapped page passed");
 			}
 
 		}
@@ -176,15 +181,17 @@
 		TEST(munmap(array, memsize));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL, "munmap() failed: errno: %d: %s",
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TTERRNO,
+				"munmapping %s failed", filename);
 		} else {
-			tst_resm(TPASS, "munmap() was successful");
+			tst_resm(TPASS,
+				"munmapping %s successful", filename);
 		}
 
 		close(fd);
 		unlink(filename);
+
 	}
 	cleanup();
-	return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap01.c b/testcases/kernel/syscalls/mmap/mmap01.c
index 7b90b21..684928a 100644
--- a/testcases/kernel/syscalls/mmap/mmap01.c
+++ b/testcases/kernel/syscalls/mmap/mmap01.c
@@ -96,7 +96,7 @@
 size_t page_sz;			/* system page size */
 size_t file_sz;			/* mapped file size */
 int fildes;			/* file descriptor for tempfile */
-char Cmd_buffer[BUFSIZ];	/* command buffer to hold test command */
+char cmd_buffer[BUFSIZ];	/* command buffer to hold test command */
 
 void setup();			/* Main setup function of test */
 void cleanup();			/* cleanup function for the test */
@@ -107,11 +107,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -128,12 +125,10 @@
 		errno = 0;
 		addr = mmap(addr, page_sz, PROT_READ | PROT_WRITE,
 			    MAP_FILE | MAP_SHARED | MAP_FIXED, fildes, 0);
-		TEST_ERRNO = errno;
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
-				 TEMPFILE, errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 		/*
@@ -147,8 +142,9 @@
 			 * to file.
 			 */
 			if (memcmp(&addr[file_sz], dummy, page_sz - file_sz)) {
-				tst_brkm(TFAIL, cleanup, "mapped memory area "
-					 "contains invalid data");
+				tst_brkm(TFAIL, cleanup,
+					"mapped memory area contains invalid "
+					"data");
 			}
 
 			/*
@@ -163,9 +159,8 @@
 			 * with the file.
 			 */
 			if (msync(addr, page_sz, MS_SYNC) != 0) {
-				tst_brkm(TFAIL, cleanup, "msync() failed to "
-					 "synchronize mapped file, error:%d",
-					 errno);
+				tst_brkm(TFAIL|TERRNO, cleanup,
+					"failed to synchronize mapped file");
 			}
 
 			/*
@@ -173,12 +168,12 @@
 			 * temporary file.  The pattern should not be
 			 * found and the return value should be 1.
 			 */
-			if (system(Cmd_buffer) != 0) {
+			if (system(cmd_buffer) != 0) {
 				tst_resm(TPASS,
-					 "Functionality of mmap() successful");
+					"Functionality of mmap() successful");
 			} else {
 				tst_resm(TFAIL,
-					 "Specified pattern found in file");
+					"Specified pattern found in file");
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -187,15 +182,12 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
-				 "memory, errno=%d", errno);
+			tst_brkm(TFAIL|TERRNO, NULL, "munmap failed");
 		}
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -225,43 +217,36 @@
 
 	/* Get the path of temporary file to be created */
 	if (getcwd(Path_name, sizeof(Path_name)) == NULL) {
-		tst_brkm(TFAIL, cleanup,
-			 "getcwd fails to get current working directory");
+		tst_brkm(TFAIL|TERRNO, cleanup,
+			 "getcwd failed to get current working directory");
 	}
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, cleanup,
-			 "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write some data into temporary file */
 	if (write(fildes, write_buf, strlen(write_buf)) != strlen(write_buf)) {
-		tst_brkm(TFAIL, cleanup,
-			 "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL, cleanup, "writing to %s", TEMPFILE);
 	}
 
 	/* Get the size of temporary file */
 	if (stat(TEMPFILE, &stat_buf) < 0) {
-		tst_brkm(TFAIL, cleanup,
-			 "stat() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL|TERRNO, cleanup, "stat of %s failed",
+			TEMPFILE);
 	}
 	file_sz = stat_buf.st_size;
 
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, cleanup,
-			 "getpagesize() fails to get system page size");
-		tst_exit();
+			"getpagesize() fails to get system page size");
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
 	if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, cleanup, "calloc() failed to allocate space");
-		tst_exit();
+		tst_brkm(TFAIL, cleanup, "calloc failed (dummy)");
 	}
 
 	/*
@@ -274,14 +259,15 @@
 	 * page size.
 	 */
 	if ((intptr_t) sbrk(SHMLBA + page_sz) == -1) {
-		tst_brkm(TFAIL, cleanup, "sbrk(SHMLBA + page_sz) failed");
+		tst_brkm(TFAIL|TERRNO, cleanup,
+			"sbrk(SHMLBA + page_sz) failed");
 	}
 
 	/* Initialize one page region from addr with 'A' */
 	memset(addr, 'A', page_sz);
 
 	/* Create the command which will be executed in the test */
-	sprintf(Cmd_buffer, "grep XYZ %s/%s > /dev/null", Path_name, TEMPFILE);
+	sprintf(cmd_buffer, "grep XYZ %s/%s > /dev/null", Path_name, TEMPFILE);
 }
 
 /*
@@ -306,7 +292,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap02.c b/testcases/kernel/syscalls/mmap/mmap02.c
index e621e94..1fa597c 100644
--- a/testcases/kernel/syscalls/mmap/mmap02.c
+++ b/testcases/kernel/syscalls/mmap/mmap02.c
@@ -102,11 +102,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -126,8 +123,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
-				 TEMPFILE, errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 		/*
@@ -140,8 +136,8 @@
 			 * string.
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
-				tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
-					 "error:%d", TEMPFILE, errno);
+				tst_brkm(TFAIL|TERRNO, cleanup,
+					"reading %s failed", TEMPFILE);
 			}
 
 			/*
@@ -162,16 +158,13 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
-				 "memory, errno=%d", errno);
+			tst_brkm(TFAIL|TERRNO, cleanup, "munmapping failed");
 		}
 
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -199,14 +192,11 @@
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
-		tst_exit();
 	}
 
 	/* Allocate space for the test buffer */
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "calloc failed (tst_buff)");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -217,45 +207,41 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
+		tst_brkm(TFAIL|TERRNO, cleanup,
+			"writing to %s failed", TEMPFILE);
 		cleanup();
 	}
 
 	/* Free the memory allocated for test buffer */
 	free(tst_buff);
 
-	/* Close the temporary file */
-	if (close(fildes) < 0) {
-		tst_brkm(TFAIL, cleanup, "close() Failed on %s, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+	/* Change Mode permissions on Temporary file */
+	if (fchmod(fildes, 0444) < 0) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "fchmod(%s, 0444) failed",
+			TEMPFILE);
 	}
 
-	/* Change Mode permissions on Temporary file */
-	if (chmod(TEMPFILE, 0444) < 0) {
-		tst_brkm(TFAIL, cleanup, "chmod(%s, 0444) Failed, errno=%d : "
-			 "%s", TEMPFILE, errno, strerror(errno));
+	/* Close the temporary file */
+	if (close(fildes) < 0) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed", TEMPFILE);
 	}
 
 	/* Open the temporary file again, - Readonly mode */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL, cleanup, "open(%s, O_RDONLY) Failed, errno=%d "
-			 ": %s", TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL, cleanup, "reopening %s readonly failed",
+			TEMPFILE);
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
 	if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL, "calloc() failed to allocate space");
-		tst_exit();
+		tst_brkm(TFAIL, cleanup, "calloc failed (dummy)");
 	}
 
 }
@@ -282,7 +268,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap03.c b/testcases/kernel/syscalls/mmap/mmap03.c
index bfa68d0..1142459 100644
--- a/testcases/kernel/syscalls/mmap/mmap03.c
+++ b/testcases/kernel/syscalls/mmap/mmap03.c
@@ -112,11 +112,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -136,8 +133,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
-				 TEMPFILE, errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO, "mmap() failed on %s", TEMPFILE);
 			continue;
 		}
 		/*
@@ -150,8 +146,9 @@
 			 * variable.
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
-				tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
-					 "error:%d", TEMPFILE, errno);
+				tst_brkm(TFAIL|TERRNO, cleanup,
+					"reading %s failed",
+					TEMPFILE);
 			}
 
 			/*
@@ -166,11 +163,12 @@
 			if (sigsetjmp(env, 1) == 0) {
 				if (memcmp(dummy, addr, page_sz)) {
 					tst_resm(TFAIL,
-						 "mapped memory region contains "
-						 "invalid data");
+						 "mapped memory region "
+						 "contains invalid data");
 				} else {
 					tst_resm(TPASS,
-						 "Functionality of mmap() successful");
+						 "mmap() functionality is "
+						 "correct");
 				}
 			}
 #if defined(__ia64__) || defined(__hppa__)
@@ -189,8 +187,8 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
-				 "memory, errno=%d", errno);
+			tst_brkm(TFAIL|TERRNO, cleanup,
+				"failed to unmap the mmapped pages");
 		}
 		pass = 0;
 
@@ -198,8 +196,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -224,14 +221,11 @@
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
-		tst_exit();
 	}
 
 	/* Allocate space for the test buffer */
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "calloc failed (tst_buff)");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -242,45 +236,39 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL|TERRNO, cleanup, "writing to %s failed",
+			TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
 	free(tst_buff);
 
 	/* Make sure proper permissions set on file */
-	if (chmod(TEMPFILE, 0555) < 0) {
-		tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+	if (fchmod(fildes, 0555) < 0) {
+		tst_brkm(TFAIL, cleanup, "fchmod of %s failed", TEMPFILE);
 	}
 
 	/* Close the temporary file opened for write */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed", TEMPFILE);
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
 	if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, cleanup,
-			 "calloc() failed to allocate memory for dummy");
+		tst_brkm(TFAIL, cleanup, "calloc failed (dummy)");
 	}
 
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
-			 "errno:%d", TEMPFILE, errno);
+		tst_brkm(TFAIL|TERRNO, cleanup,
+			"opening %s read-only failed", TEMPFILE);
 	}
 }
 
@@ -323,7 +311,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap04.c b/testcases/kernel/syscalls/mmap/mmap04.c
index 6d4f0e2..90a22f2 100644
--- a/testcases/kernel/syscalls/mmap/mmap04.c
+++ b/testcases/kernel/syscalls/mmap/mmap04.c
@@ -105,11 +105,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -129,8 +126,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
-				 TEMPFILE, errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 
@@ -144,8 +140,8 @@
 			 * variable.
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
-				tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
-					 "error:%d", TEMPFILE, errno);
+				tst_brkm(TFAIL, cleanup, "reading %s failed",
+					TEMPFILE);
 			}
 
 			/*
@@ -153,11 +149,12 @@
 			 * has the file contents.
 			 */
 			if (memcmp(dummy, addr, page_sz)) {
-				tst_resm(TFAIL, "mapped memory region contains "
-					 "invalid data");
+				tst_resm(TFAIL,
+					"mapped memory region contains invalid "
+					"data");
 			} else {
 				tst_resm(TPASS,
-					 "Functionality of mmap() successful");
+					"Functionality of mmap() successful");
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -165,16 +162,12 @@
 		/* Clean up things in case we are looping. */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
-				 "memory, errno=%d", errno);
+			tst_brkm(TFAIL, cleanup, "munmapping failed");
 		}
 
 	}			/* End for TEST_LOOPING */
-
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -199,13 +192,10 @@
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
-		tst_exit();
 	}
 
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "calloc failed (tst_buff)");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -216,45 +206,38 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "writing to %s failed", TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
 	free(tst_buff);
 
 	/* Make sure proper permissions set on file */
-	if (chmod(TEMPFILE, 0555) < 0) {
-		tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+	if (fchmod(fildes, 0555) < 0) {
+		tst_brkm(TFAIL, cleanup, "fchmod of %s failed", TEMPFILE);
 	}
 
 	/* Close the temporary file opened for write */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL, cleanup, "closing %s failed", TEMPFILE);
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
 	if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, cleanup,
-			 "calloc() failed to allocate memory for dummy");
+		tst_brkm(TFAIL, cleanup, "calloc failed (dummy)");
 	}
 
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
-			 "errno:%d", TEMPFILE, errno);
+		tst_brkm(TFAIL, cleanup,
+			"opening %s read-only failed", TEMPFILE);
 	}
 }
 
@@ -281,7 +264,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap05.c b/testcases/kernel/syscalls/mmap/mmap05.c
index bcb5eb3..b9239dc 100644
--- a/testcases/kernel/syscalls/mmap/mmap05.c
+++ b/testcases/kernel/syscalls/mmap/mmap05.c
@@ -95,7 +95,7 @@
 size_t page_sz;			/* system page size */
 volatile char *addr;		/* addr of memory mapped region */
 int fildes;			/* file descriptor for temporary file */
-volatile int pass = 0;		/* pass flag perhaps set to 1 in sig_handler */
+volatile int pass = 0;
 sigjmp_buf env;			/* environment for sigsetjmp/siglongjmp */
 
 void setup();			/* Main setup function of test */
@@ -108,12 +108,8 @@
 	char *msg;		/* message returned from parse_opts */
 	char file_content;	/* tempfile content */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -134,8 +130,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
-				 TEMPFILE, errno, strerror(errno));
+			tst_resm(TFAIL|TERRNO, "mmap() failed on %s", TEMPFILE);
 			continue;
 		}
 
@@ -170,16 +165,13 @@
 
 		/* Unmap mapped memory and reset pass in case we are looping */
 		if (munmap((void *)addr, page_sz) != 0) {
-			tst_brkm(TFAIL, cleanup, "munmap() fails to unmap the "
-				 "memory, errno=%d", errno);
+			tst_brkm(TFAIL|TERRNO, cleanup, "munmap failed");
 		}
 		pass = 0;
 
 	}			/* End for TEST_LOOPING */
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -190,7 +182,7 @@
  *	     Change the mode permissions on file to 0444
  *	     Re-open the file for reading.
  */
-void setup()
+void setup(void)
 {
 	char *tst_buff;		/* test buffer to hold known data */
 
@@ -204,14 +196,11 @@
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
-		tst_exit();
 	}
 
 	/* Allocate space for the test buffer */
-	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+	if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) {
+		tst_brkm(TFAIL, NULL, "calloc failed (tst_buff)");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -222,44 +211,41 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) != page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "writing to %s failed",
+			 TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
 	free(tst_buff);
 
-	/* Close the temporary file opened for write */
-	if (close(fildes) < 0) {
-		tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+	/* Make sure proper permissions set on file */
+	if (fchmod(fildes, 0444) < 0) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "fchmod of %s failed",
+			 TEMPFILE);
 	}
 
-	/* Make sure proper permissions set on file */
-	if (chmod(TEMPFILE, 0444) < 0) {
-		tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+	/* Close the temporary file opened for write */
+	if (close(fildes) < 0) {
+		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed",
+			 TEMPFILE);
 	}
 
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
-			 "errno:%d", TEMPFILE, errno);
+		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s readonly failed",
+			TEMPFILE);
 	}
 }
 
 /*
- * sig_handler() - Signal Cathing function.
+ * sig_handler() - Signal Catching function.
  *   This function gets executed when the test process receives
  *   the signal SIGSEGV while trying to access the contents of memory which
  *   is not accessible.
@@ -271,7 +257,8 @@
 		pass = 1;
 		siglongjmp(env, 1);
 	} else {
-		tst_brkm(TBROK, cleanup, "received an unexpected signal");
+		tst_brkm(TBROK, cleanup, "received an unexpected signal: %d",
+			sig);
 	}
 }
 
@@ -280,7 +267,7 @@
  *             completion or premature exit.
  *	       Remove the temporary directory created.
  */
-void cleanup()
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
@@ -292,7 +279,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap06.c b/testcases/kernel/syscalls/mmap/mmap06.c
index 6e39801..4a147df 100644
--- a/testcases/kernel/syscalls/mmap/mmap06.c
+++ b/testcases/kernel/syscalls/mmap/mmap06.c
@@ -102,11 +102,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -130,28 +127,26 @@
 
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() returned invalid value, "
-				 "expected: -1");
+			tst_resm(TFAIL|TERRNO,
+				"mmap() returned invalid value, expected: %p",
+				MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
-				tst_brkm(TBROK, cleanup, "munmap() failed");
+				tst_resm(TBROK, "munmap() failed");
+				cleanup();
 			}
 			continue;
 		}
 		TEST_ERROR_LOG(TEST_ERRNO);
 		if (TEST_ERRNO == EACCES) {
-			tst_resm(TPASS, "mmap() fails, 'fd' doesn't allow "
-				 "desired access, errno:%d", errno);
+			tst_resm(TPASS, "mmap failed with EACCES");
 		} else {
-			tst_resm(TFAIL, "mmap() fails, 'fd' doesn't allow "
-				 "desired access, invalid errno:%d", errno);
+			tst_resm(TFAIL|TERRNO,
+				"mmap failed with unexpected errno");
 		}
 	}			/* End for TEST_LOOPING */
-
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -173,15 +168,12 @@
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
-			 "getpagesize() fails to get system page size");
-		tst_exit();
+			"getpagesize() fails to get system page size");
 	}
 
 	/* Allocate space for the test buffer */
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
-		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+		tst_brkm(TFAIL, NULL, "calloc() failed (tst_buff)");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -192,20 +184,14 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL,
-			 "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
-		tst_brkm(TFAIL, NULL,
-			 "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "writing to %s failed", TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
@@ -229,7 +215,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap07.c b/testcases/kernel/syscalls/mmap/mmap07.c
index ebae5f7..06ad660 100644
--- a/testcases/kernel/syscalls/mmap/mmap07.c
+++ b/testcases/kernel/syscalls/mmap/mmap07.c
@@ -103,11 +103,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -131,28 +128,27 @@
 
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() returned invalid value, "
-				 "expected: -1");
+			tst_resm(TFAIL|TERRNO,
+				"mmap() returned invalid value, expected: %p",
+				MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
-				tst_brkm(TBROK, cleanup, "munmap() failed");
+				tst_resm(TBROK, "munmap() failed");
+				cleanup();
 			}
 			continue;
 		}
 		TEST_ERROR_LOG(TEST_ERRNO);
 		if (TEST_ERRNO == EACCES) {
-			tst_resm(TPASS, "mmap() fails, 'fd' doesn't allow "
-				 "desired access, errno:%d", errno);
+			tst_resm(TPASS, "mmap failed with EACCES");
 		} else {
-			tst_resm(TFAIL, "mmap() fails, 'fd' doesn't allow "
-				 "desired access, invalid errno:%d", errno);
+			tst_resm(TFAIL|TERRNO,
+				"mmap failed with unexpected errno");
 		}
 
 	}			/* End for TEST_LOOPING */
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -175,14 +171,12 @@
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
-		tst_exit();
 	}
 
 	/* Allocate space for the test buffer */
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
 		tst_brkm(TFAIL, NULL,
 			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
 	}
 
 	/* Fill the test buffer with the known data */
@@ -193,18 +187,16 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "open() on %s failed",
+			 TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "writing to %s failed",
+			 TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
@@ -227,7 +219,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap08.c b/testcases/kernel/syscalls/mmap/mmap08.c
index 0f660bc..c52f15f 100644
--- a/testcases/kernel/syscalls/mmap/mmap08.c
+++ b/testcases/kernel/syscalls/mmap/mmap08.c
@@ -98,11 +98,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -126,8 +123,8 @@
 
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
-			tst_resm(TFAIL, "mmap() returned invalid value, "
-				 "expected: -1");
+			tst_resm(TFAIL, "mmap() didn't fail (%p != %p)",
+				addr, MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
 				tst_brkm(TBROK, cleanup, "munmap() failed");
@@ -136,18 +133,16 @@
 		}
 		TEST_ERROR_LOG(TEST_ERRNO);
 		if (TEST_ERRNO == EBADF) {
-			tst_resm(TPASS, "mmap() fails, 'fd' is not valid, "
-				 "errno:%d", errno);
+			tst_resm(TPASS,
+				"mmap failed with EBADF");
 		} else {
-			tst_resm(TFAIL, "mmap() fails, 'fd' is not valid, "
-				 "invalid errno:%d", errno);
+			tst_resm(TFAIL|TERRNO,
+				"mmap failed with an invalid errno");
 		}
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -169,14 +164,12 @@
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
-			 "getpagesize() fails to get system page size");
-		tst_exit();
+			"getpagesize() fails to get system page size");
 	}
 
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
 		tst_brkm(TFAIL, NULL,
-			 "calloc() failed to allocate space for tst_buff");
-		tst_exit();
+			"calloc() failed to allocate space for tst_buff");
 	}
 
 	/* Fill the test buffer with the known data */
@@ -187,18 +180,14 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
-		tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "opening %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) != page_sz) {
-		tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
 		free(tst_buff);
-		cleanup();
+		tst_brkm(TFAIL, cleanup, "writing to %s failed", TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
@@ -206,8 +195,7 @@
 
 	/* Close the temporary file opened for writing */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
-			 TEMPFILE, errno, strerror(errno));
+		tst_brkm(TFAIL, cleanup, "closing %s failed", TEMPFILE);
 	}
 }
 
@@ -226,7 +214,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap09.c b/testcases/kernel/syscalls/mmap/mmap09.c
index 56d8714..6840693 100644
--- a/testcases/kernel/syscalls/mmap/mmap09.c
+++ b/testcases/kernel/syscalls/mmap/mmap09.c
@@ -88,11 +88,8 @@
 	int i;
 	char *msg;		/* for parse_opts */
 
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	setup();
 
@@ -112,14 +109,11 @@
 	}
 
 	cleanup();
-
-	return 0;
+	tst_exit();
 }
 
 void setup()
 {
-	int i;
-
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Pause if option was specified */
@@ -128,19 +122,19 @@
 	tst_tmpdir();
 
 	if ((fd = open("mmaptest", O_RDWR | O_CREAT, 0666)) < 0)
-		tst_brkm(TFAIL|TERRNO, cleanup, "open(mmaptest) file failed");
+		tst_brkm(TFAIL|TERRNO, cleanup, "opening mmaptest failed");
 
 	/* ftruncate the file to 16k */
 	if (ftruncate(fd, mapsize) < 0)
-		tst_brkm(TFAIL|TERRNO, cleanup, "ftruncate() file failed");
+		tst_brkm(TFAIL|TERRNO, cleanup, "ftruncate file failed");
 
 	maddr = mmap(0, (size_t) mapsize, PROT_READ | PROT_WRITE,
-		     MAP_FILE | MAP_SHARED, fd, (off_t) 0);
+		    MAP_FILE | MAP_SHARED, fd, (off_t) 0);
 	if (maddr == MAP_FAILED)
-		tst_brkm(TFAIL|TERRNO, cleanup, "mmap() file failed");
+		tst_brkm(TFAIL|TERRNO, cleanup, "mmapping mmaptest failed");
+
 	/* fill up the file with A's */
-	for (i = 0; i < mapsize; i++)
-		maddr[i] = 'A';
+	memset(maddr, 'A', mapsize);
 
 }
 
@@ -150,5 +144,4 @@
 	munmap(maddr, (size_t) mapsize);
 	close(fd);
 	tst_rmdir();
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/mmap/mmap10.c b/testcases/kernel/syscalls/mmap/mmap10.c
index fe9d622..8924f8f 100644
--- a/testcases/kernel/syscalls/mmap/mmap10.c
+++ b/testcases/kernel/syscalls/mmap/mmap10.c
@@ -87,7 +87,7 @@
 
 	msg = parse_opts(argc, argv, options, help);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
diff --git a/testcases/kernel/syscalls/mmap/mmap11.c b/testcases/kernel/syscalls/mmap/mmap11.c
index 0cd32d4..c17b77e 100644
--- a/testcases/kernel/syscalls/mmap/mmap11.c
+++ b/testcases/kernel/syscalls/mmap/mmap11.c
@@ -73,7 +73,7 @@
 
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	check();
 	cleanup();
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
index 76a0be8..741d923 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
@@ -106,8 +106,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -184,7 +188,7 @@
 		 */
 		if (create_segment(seg, sizeof(seg)) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Check for EFAULT
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
index 9850212..857e5ff 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
@@ -102,8 +102,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -120,7 +124,7 @@
 		seg[0] = 12345;
 		if (create_segment(seg, sizeof(seg)) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 /*NOTREACHED*/}
+		 }
 
 		val = read_segment(0);
 
@@ -144,7 +148,7 @@
 
 		if (create_segment(0, 10) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 /*NOTREACHED*/}
+		 }
 
 		tst_flush();
 		if ((pid = FORK_OR_VFORK()) == 0) {
diff --git a/testcases/kernel/syscalls/mount/mount02.c b/testcases/kernel/syscalls/mount/mount02.c
index 8098bfd..1e72ba5 100644
--- a/testcases/kernel/syscalls/mount/mount02.c
+++ b/testcases/kernel/syscalls/mount/mount02.c
@@ -141,7 +141,6 @@
 	int lc, i;		/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-	/* parse standard options */
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
@@ -150,10 +149,9 @@
 		tst_brkm(TBROK, NULL, "You must specifiy the device used for "
 			 " mounting with -D option.");
 
-	Type = (char *)malloc(FSTYPE_LEN);
+	Type = malloc(FSTYPE_LEN);
 	if (Type == NULL) {
-		tst_brkm(TBROK, NULL, "malloc - alloc of %d failed",
-			 FSTYPE_LEN);
+		tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
 	}
 
 	if (Tflag == 1) {
@@ -196,11 +194,11 @@
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == exp_enos[i]) {
 				tst_resm(TPASS|TERRNO,
-				    "mount(2) got expected failure");
+				    "mount got expected failure");
 			} else {
 				if (umount(mntpoint) == -1) {
 					tst_brkm(TBROK|TERRNO, cleanup,
-					    "umount failed: %s", Mntpoint);
+					    "umount of %s failed", Mntpoint);
 				}
 				tst_resm(TFAIL|TERRNO,
 				    "mount(2) failed to produce expected "
@@ -390,11 +388,7 @@
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	/* Check whether we are root */
-	if (geteuid() != 0) {
-		free(Type);
-		tst_brkm(TBROK, NULL, "Test must be run as root");
-	}
+	tst_require_root(NULL);
 
 	/* make a temp directory */
 	tst_tmpdir();
diff --git a/testcases/kernel/syscalls/mount/mount03.c b/testcases/kernel/syscalls/mount/mount03.c
index 9e743a0..94cd766 100644
--- a/testcases/kernel/syscalls/mount/mount03.c
+++ b/testcases/kernel/syscalls/mount/mount03.c
@@ -162,19 +162,17 @@
 	if (Tflag) {
 		Fstype = (char *)malloc(strlen(fstype)+1);
 		if (Fstype == NULL) {
-			tst_brkm(TBROK, NULL, "malloc failed to alloc %d errno "
-				 " %d ", strlen(fstype)+1, errno);
+			tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
 		}
-		memset(Fstype, 0, strlen(fstype)+1);
+		Fstype[strlen(fstype)] = '\0';
 		strncpy(Fstype, fstype, strlen(fstype));
 	} else {
 		Fstype = (char *)malloc(strlen(DEFAULT_FSTYPE)+1);
 		if (Fstype == NULL) {
-			tst_brkm(TBROK, NULL, "malloc failed to alloc %d errno "
-				 " %d ", strlen(fstype)+1, errno);
+			tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
 		}
-		memset(Fstype, 0, strlen(DEFAULT_FSTYPE)+1);
 		strncpy(Fstype, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE));
+		Fstype[strlen(DEFAULT_FSTYPE)] = '\0';
 	}
 
 	if (STD_COPIES != 1) {
@@ -247,8 +245,7 @@
 				return 0;
 			} else {
 				tst_resm(TWARN|TERRNO,
-				    "open(%s) didn't fail with errno = %d",
-				    file, EROFS);
+				    "open(%s) didn't fail with EROFS", file);
 				return 1;
 			}
 		}
@@ -265,8 +262,7 @@
 					return 0;
 				} else {
 					tst_resm(TWARN|TERRNO,
-					    "open(%s) didn't fail with errno "
-					    "= %d", file, EACCES);
+					    "open(%s) didn't fail with EACCES");
 					return 1;
 				}
 			}
@@ -449,7 +445,7 @@
 	/* Check whether we are root */
 	if (geteuid() != 0) {
 		free(Fstype);
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Test home directory */
diff --git a/testcases/kernel/syscalls/mount/mount04.c b/testcases/kernel/syscalls/mount/mount04.c
index 0543e4f..de51a1f 100644
--- a/testcases/kernel/syscalls/mount/mount04.c
+++ b/testcases/kernel/syscalls/mount/mount04.c
@@ -199,7 +199,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -215,7 +215,7 @@
 	/* Check whether we are root */
 	if (geteuid() != 0) {
 		free(Type);
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/move_pages/move_pages01.c b/testcases/kernel/syscalls/move_pages/move_pages01.c
index cd4fc2f..5aa3be3 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages01.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages01.c
@@ -72,11 +72,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -149,4 +149,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages02.c b/testcases/kernel/syscalls/move_pages/move_pages02.c
index 152174f..a9a6212 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages02.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages02.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -161,4 +161,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages03.c b/testcases/kernel/syscalls/move_pages/move_pages03.c
index e01ba51..ad13e5c 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages03.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages03.c
@@ -111,11 +111,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -227,4 +227,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages04.c b/testcases/kernel/syscalls/move_pages/move_pages04.c
index 2d3aeb0..5a4459d 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages04.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages04.c
@@ -79,11 +79,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -180,4 +180,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages05.c b/testcases/kernel/syscalls/move_pages/move_pages05.c
index fbbf857..3e94ed3 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages05.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages05.c
@@ -112,11 +112,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -241,4 +241,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages06.c b/testcases/kernel/syscalls/move_pages/move_pages06.c
index 0cb31e4..8c8782d 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages06.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages06.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -157,4 +157,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages07.c b/testcases/kernel/syscalls/move_pages/move_pages07.c
index 53a684d..7bb7ee2 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages07.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages07.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -168,4 +168,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages08.c b/testcases/kernel/syscalls/move_pages/move_pages08.c
index b0ffe15..e155004 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages08.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages08.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -156,4 +156,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages09.c b/testcases/kernel/syscalls/move_pages/move_pages09.c
index d8c6573..8a0909a 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages09.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages09.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -155,4 +155,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages10.c b/testcases/kernel/syscalls/move_pages/move_pages10.c
index fddb61e6..c800b8a 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages10.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages10.c
@@ -73,11 +73,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -156,4 +156,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/move_pages/move_pages11.c b/testcases/kernel/syscalls/move_pages/move_pages11.c
index f847cda..ea2d665 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages11.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages11.c
@@ -111,11 +111,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-		/* NOTREACHED */
+		
 	}
 
 	setup();
@@ -246,4 +246,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/mprotect/mprotect01.c b/testcases/kernel/syscalls/mprotect/mprotect01.c
index d9ca291..3f881ec 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect01.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect01.c
@@ -121,7 +121,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -166,7 +170,7 @@
 	}
 	cleanup();
 	return 0;
- /*NOTREACHED*/}
+ }
 
 #else
 
@@ -195,7 +199,7 @@
 	addr2 = (char *)malloc(PAGESIZE);
 	if (addr2 == NULL) {
 		tst_brkm(TINFO, cleanup, "malloc failed");
-	 /*NOTREACHED*/}
+	 }
 	addr2++;		/* Ensure addr2 is not page aligned */
 }
 
@@ -207,7 +211,7 @@
 	fd = open("/etc/passwd", O_RDONLY);
 	if (fd < 0) {
 		tst_brkm(TBROK, cleanup, "open failed");
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * mmap the PAGESIZE bytes as read only.
@@ -215,7 +219,7 @@
 	addr3 = mmap(0, PAGESIZE, PROT_READ, MAP_SHARED, fd, 0);
 	if (addr3 < 0) {
 		tst_brkm(TBROK, cleanup, "mmap failed");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mprotect/mprotect02.c b/testcases/kernel/syscalls/mprotect/mprotect02.c
index b8dbdea..2cecbb4 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect02.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect02.c
@@ -87,7 +87,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -100,7 +104,7 @@
 
 		if ((fd = open(file1, O_RDWR | O_CREAT, 0777)) < 0) {	//mode must be specified when O_CREATE is in the flag
 			tst_brkm(TBROK, cleanup, "open failed");
-		 /*NOTREACHED*/}
+		 }
 		(void)write(fd, buf, strlen(buf));
 
 		/*
@@ -109,7 +113,7 @@
 		addr = mmap(0, strlen(buf), PROT_READ, MAP_SHARED, fd, 0);
 		if (addr < 0) {
 			tst_brkm(TBROK, cleanup, "mmap failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #1 failed");
@@ -119,17 +123,17 @@
 			(void)memcpy((void *)addr, (void *)buf, strlen(buf));
 			tst_resm(TINFO, "memcpy() did not generate SIGSEGV");
 			exit(1);
-		 /*NOTREACHED*/}
+		 }
 
 		/* parent */
 		(void)waitpid(pid, &status, 0);
 		if (WIFEXITED(status) == 0) {
 			tst_brkm(TBROK, cleanup, "chiled exited abnormally");
-		 /*NOTREACHED*/}
+		 }
 		/* exit status should be 1 */
 		if (WEXITSTATUS(status) != 1) {
 			tst_brkm(TBROK, cleanup, "child failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Change the protection to WRITE.
@@ -154,7 +158,7 @@
 				if (WIFEXITED(status) == 0) {
 					tst_brkm(TBROK, cleanup, "child exited "
 						 "abnormally");
-				 /*NOTREACHED*/}
+				 }
 				/*
 				 * if we get a SIGSEGV, the exit status
 				 * will be 1.
@@ -187,7 +191,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 #else
diff --git a/testcases/kernel/syscalls/mprotect/mprotect03.c b/testcases/kernel/syscalls/mprotect/mprotect03.c
index 4b10e02..c7f0304 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect03.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect03.c
@@ -88,7 +88,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -101,7 +105,7 @@
 
 		if ((fd = open(file1, O_RDWR | O_CREAT, 0777)) < 0) {	//mode must be specified when O_CREAT is in the flag
 			tst_brkm(TBROK, cleanup, "open failed");
-		 /*NOTREACHED*/}
+		 }
 
 		(void)write(fd, buf, strlen(buf));
 
@@ -112,7 +116,7 @@
 			    fd, 0);
 		if (addr < 0) {
 			tst_brkm(TBROK, cleanup, "mmap failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Try to change the protection to WRITE.
@@ -131,7 +135,7 @@
 					tst_resm(TINFO, "memcpy() did "
 						 "not generate SIGSEGV");
 					exit(1);
-				 /*NOTREACHED*/}
+				 }
 
 				/* parent */
 				(void)waitpid(pid, &status, 0);
@@ -148,7 +152,7 @@
 		} else {
 			tst_resm(TFAIL, "mprotect failed "
 				 "unexpectedly, errno: %d", errno);
-		 /*NOTREACHED*/}
+		 }
 
 		/* clean up things in case we are looping */
 		if (munmap(addr, strlen(buf)) == -1) {
diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify01.c b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
index f595cea..3f65e1d 100644
--- a/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+++ b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
@@ -1,49 +1,44 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd		*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
 /*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
 /*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        mq_notify01.c                                                 */
-/*                                                                            */
-/* Description: This tests the mq_notify() syscall                            */
-/*									      */
-/* 									      */
-/*									      */
-/*									      */
-/*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* mq_notify01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                           */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   mq_notify01                                                   */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* File:	mq_notify01.c						 */
+/*									    */
+/* Description: This tests the mq_notify() syscall			    */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* mq_notify01 [-c n] [-e][-i n] [-I x] [-p x] [-t]			   */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   mq_notify01						   */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 #define _XOPEN_SOURCE 600
 #include <sys/syscall.h>
@@ -51,14 +46,15 @@
 #include <sys/stat.h>
 #include <sys/uio.h>
 #include <getopt.h>
-#include <stdlib.h>
+#include <libgen.h>
+#include <limits.h>
 #include <errno.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <mqueue.h>
 #include <signal.h>
-#include <limits.h>
+#include <stdlib.h>
 
 #include "../utils/include_j_h.h"
 
@@ -68,64 +64,64 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "mq_notify01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Exit with appropriate return code. */
+	tst_exit();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -145,11 +141,11 @@
 
 
 enum test_type {
-		NORMAL,
-		FD_NONE,
-	        FD_NOT_EXIST,
-        	FD_FILE,
-	        ALREADY_REGISTERED,
+	NORMAL,
+	FD_NONE,
+	FD_NOT_EXIST,
+	FD_FILE,
+	ALREADY_REGISTERED,
 };
 
 
@@ -157,14 +153,14 @@
  * Data Structure
  */
 struct test_case {
-        int notify;
+	int notify;
 	int ttype;
-        int ret;
-        int err;
+	int ret;
+	int err;
 };
 
 #define MAX_MSGSIZE     8192
-#define MSG_SIZE        16
+#define MSG_SIZE	16
 #define USER_DATA       0x12345678
 
 
@@ -172,78 +168,78 @@
  *
  *   test status of errors on man page
  *
- *   EBADF              v (not a valid descriptor)
- *   EBUSY              v (process is already registered for notification)
+ *   EBADF	      v (not a valid descriptor)
+ *   EBUSY	      v (process is already registered for notification)
 */
 
 
 static struct test_case tcase[] = {
 	{ // case00
-                .ttype          = NORMAL,
-                .notify         = SIGEV_NONE,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .ttype          = NORMAL,
-                .notify         = SIGEV_SIGNAL,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                .notify         = SIGEV_THREAD,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case03
-                .ttype          = FD_NONE,
-                .notify         = SIGEV_NONE,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case04
-                .ttype          = FD_NOT_EXIST,
-                .notify         = SIGEV_NONE,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case05
-                .ttype          = FD_FILE,
-                .notify         = SIGEV_NONE,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case06
-                .ttype          = ALREADY_REGISTERED,
-                .notify         = SIGEV_NONE,
-                .ret            = -1,
-                .err            = EBUSY,
-        },
+		.ttype	  = NORMAL,
+		.notify	 = SIGEV_NONE,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.ttype	  = NORMAL,
+		.notify	 = SIGEV_SIGNAL,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+		.notify	 = SIGEV_THREAD,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case03
+		.ttype	  = FD_NONE,
+		.notify	 = SIGEV_NONE,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case04
+		.ttype	  = FD_NOT_EXIST,
+		.notify	 = SIGEV_NONE,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case05
+		.ttype	  = FD_FILE,
+		.notify	 = SIGEV_NONE,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case06
+		.ttype	  = ALREADY_REGISTERED,
+		.notify	 = SIGEV_NONE,
+		.ret	    = -1,
+		.err	    = EBUSY,
+	},
 };
 
 
 static void sigfunc(int signo, siginfo_t *info, void *data)
 {
-        if (opt_debug) {
-                tst_resm(TINFO,"si_code  E:%d,\tR:%d", info->si_code, SI_MESGQ);
-                tst_resm(TINFO,"si_signo E:%d,\tR:%d", info->si_signo, SIGUSR1);
-                tst_resm(TINFO,"si_value E:0x%x,\tR:0x%x", info->si_value.sival_int,USER_DATA);
-                tst_resm(TINFO,"si_pid   E:%d,\tR:%d", info->si_pid, getpid());
-                tst_resm(TINFO,"si_uid   E:%d,\tR:%d", info->si_uid, getuid());
-        }
-        cmp_ok = info->si_code == SI_MESGQ &&
-                 info->si_signo == SIGUSR1 &&
-                 info->si_value.sival_int == USER_DATA &&
-                 info->si_pid == getpid() &&
-                 info->si_uid == getuid();
-        notified = 1;
+	if (opt_debug) {
+		tst_resm(TINFO,"si_code  E:%d,\tR:%d", info->si_code, SI_MESGQ);
+		tst_resm(TINFO,"si_signo E:%d,\tR:%d", info->si_signo, SIGUSR1);
+		tst_resm(TINFO,"si_value E:0x%x,\tR:0x%x", info->si_value.sival_int,USER_DATA);
+		tst_resm(TINFO,"si_pid   E:%d,\tR:%d", info->si_pid, getpid());
+		tst_resm(TINFO,"si_uid   E:%d,\tR:%d", info->si_uid, getuid());
+	}
+	cmp_ok = info->si_code == SI_MESGQ &&
+		 info->si_signo == SIGUSR1 &&
+		 info->si_value.sival_int == USER_DATA &&
+		 info->si_pid == getpid() &&
+		 info->si_uid == getuid();
+	notified = 1;
 }
 
 static void tfunc(union sigval sv)
 {
-        cmp_ok = sv.sival_int == USER_DATA;
-        notified = 1;
+	cmp_ok = sv.sival_int == USER_DATA;
+	notified = 1;
 }
 
 /*
@@ -256,125 +252,125 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
-        int rc, i, fd = -1;
-        struct sigevent ev;
-        struct sigaction sigact;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
+	int rc, i, fd = -1;
+	struct sigevent ev;
+	struct sigaction sigact;
 	struct timespec abs_timeout;
-        char smsg[MAX_MSGSIZE];
+	char smsg[MAX_MSGSIZE];
 
-        notified = cmp_ok = 1;
+	notified = cmp_ok = 1;
 
 	/* Don't timeout. */
 	abs_timeout.tv_sec = 0;
 	abs_timeout.tv_nsec = 0;
 
-        /*
-         * When test ended with SIGTERM etc, mq discriptor is left remains.
-         * So we delete it first.
-         */
-        mq_unlink(QUEUE_NAME);
+	/*
+	 * When test ended with SIGTERM etc, mq discriptor is left remains.
+	 * So we delete it first.
+	 */
+	mq_unlink(QUEUE_NAME);
 
-        switch (tc->ttype) {
-        case FD_NOT_EXIST:
-                fd = INT_MAX - 1;
-                /* fallthrough */
+	switch (tc->ttype) {
+	case FD_NOT_EXIST:
+		fd = INT_MAX - 1;
+		/* fallthrough */
 	case FD_NONE:
-                break;
-        case FD_FILE:
-                TEST(fd = open("/", O_RDONLY));
-                if (TEST_RETURN < 0) {
-                        tst_resm(TFAIL,"can't open \"/\".");
-                        result = 1;
-                        goto EXIT;
-                }
-                break;
-        default:
-                /*
-                 * Open message queue
-                 */
-                TEST(fd = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
-                if (TEST_RETURN < 0) {
-                        tst_resm(TFAIL,"mq_open failed errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+		break;
+	case FD_FILE:
+		TEST(fd = open("/", O_RDONLY));
+		if (TEST_RETURN < 0) {
+			tst_resm(TFAIL,"can't open \"/\".");
+			result = 1;
+			goto EXIT;
+		}
+		break;
+	default:
+		/*
+		 * Open message queue
+		 */
+		TEST(fd = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
+		if (TEST_RETURN < 0) {
+			tst_resm(TFAIL|TTERRNO,"mq_open failed");
+			result = 1;
+			goto EXIT;
+		}
+	}
 
 	/*
-         * Set up struct sigevent
-         */
-        ev.sigev_notify = tc->notify;
-        switch (tc->notify) {
-        case SIGEV_SIGNAL:
-                notified = cmp_ok = 0;
-                ev.sigev_signo = SIGUSR1;
-                ev.sigev_value.sival_int = USER_DATA;
+	 * Set up struct sigevent
+	 */
+	ev.sigev_notify = tc->notify;
 
-                // set up the signal handler
-                memset(&sigact, 0, sizeof(sigact));
-                sigact.sa_sigaction = sigfunc;
-                sigact.sa_flags = SA_SIGINFO;
-                TEST(rc = sigaction(SIGUSR1, &sigact, NULL));
-                break;
-        case SIGEV_THREAD:
-                notified = cmp_ok = 0;
-                ev.sigev_notify_function = tfunc;
-                ev.sigev_notify_attributes = NULL;
-                ev.sigev_value.sival_int = USER_DATA;
-                break;
-        }
+	switch (tc->notify) {
+	case SIGEV_SIGNAL:
+		notified = cmp_ok = 0;
+		ev.sigev_signo = SIGUSR1;
+		ev.sigev_value.sival_int = USER_DATA;
+
+		memset(&sigact, 0, sizeof(sigact));
+		sigact.sa_sigaction = sigfunc;
+		sigact.sa_flags = SA_SIGINFO;
+		TEST(rc = sigaction(SIGUSR1, &sigact, NULL));
+		break;
+	case SIGEV_THREAD:
+		notified = cmp_ok = 0;
+		ev.sigev_notify_function = tfunc;
+		ev.sigev_notify_attributes = NULL;
+		ev.sigev_value.sival_int = USER_DATA;
+		break;
+	}
 
 	if (tc->ttype == ALREADY_REGISTERED) {
-                TEST(rc = mq_notify(fd, &ev));
-                if (TEST_RETURN < 0) {
-                        tst_resm(TFAIL,"mq_notify failed errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+		TEST(rc = mq_notify(fd, &ev));
+		if (TEST_RETURN < 0) {
+			tst_resm(TFAIL|TTERRNO,"mq_notify failed");
+			result = 1;
+			goto EXIT;
+		}
+	}
 	
 	/*
-         * Execute system call
-         */
-        errno = 0;
-        sys_ret = mq_notify(fd, &ev);
+	 * Execute system call
+	 */
+	errno = 0;
+	sys_ret = mq_notify(fd, &ev);
 	sys_errno = errno;
-        if (sys_ret < 0)
-                goto TEST_END;
+	if (sys_ret < 0)
+		goto TEST_END;
 
-	 /*
-         * Prepare send message
-         */
-        for (i = 0; i < MSG_SIZE; i++)
-                smsg[i] = i;
-        TEST(rc = mq_timedsend(fd, smsg, MSG_SIZE, 0, &abs_timeout));
-        if (rc < 0) {
-                tst_resm(TFAIL,"mq_timedsend failed errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                result = 1;
-                goto EXIT;
-        }
+	/*
+	 * Prepare send message
+	 */
+	for (i = 0; i < MSG_SIZE; i++)
+		smsg[i] = i;
+	TEST(rc = mq_timedsend(fd, smsg, MSG_SIZE, 0, &abs_timeout));
+	if (rc < 0) {
+		tst_resm(TFAIL|TTERRNO, "mq_timedsend failed");
+		result = 1;
+		goto EXIT;
+	}
 
-        while (!notified)
-                usleep(10000);
+	while (!notified)
+		usleep(10000);
 
 TEST_END:
-        /*
-         * Check results
-         */
-        result |= (sys_ret != 0 && sys_errno != tc->err) || !cmp_ok;
-        PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
-                         cmp_ok);
+	/*
+	 * Check results
+	 */
+	result |= (sys_ret != 0 && sys_errno != tc->err) || !cmp_ok;
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
+			 cmp_ok);
 
 EXIT:
-        if (fd >= 0) {
-                close(fd);
-                mq_unlink(QUEUE_NAME);
-        }
+	if (fd >= 0) {
+		close(fd);
+		mq_unlink(QUEUE_NAME);
+	}
 
-        return result;
+	return result;
 }
 	
 
@@ -385,13 +381,11 @@
 
 static void usage(const char *progname)
 {
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG");
-        exit(1);
+	tst_resm(TINFO,"usage: %s [options]", progname);
+	tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
+	tst_resm(TINFO,"options:");
+	tst_resm(TINFO,"    -d --debug	   Show debug messages");
+	tst_resm(TINFO,"    -h --help	    Show this message");
 }
 
 
@@ -403,20 +397,24 @@
 
 int main(int ac, char **av) {
 	int result = RESULT_OK;
-        int c;
-        int i;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
+	int c;
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
 
 	struct option long_options[] = {
-                { "debug", no_argument, 0, 'd' },
-                { "help",  no_argument, 0, 'h' },
-                { NULL, 0, NULL, 0 }
-        };
+		{ "debug", no_argument, 0, 'd' },
+		{ "help",  no_argument, 0, 'h' },
+		{ NULL, 0, NULL, 0 }
+	};
 
-	progname = strchr(av[0], '/');
-        progname = progname ? progname + 1 : av[0];	
+	progname = basename(av[0]);
 	
+<<<<<<< HEAD
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
@@ -437,7 +435,7 @@
                 		        break;
 		                default:
                 		        usage(progname);
-                        		// NOTREACHED
+                        		
                 		}
 		        }
 
@@ -445,39 +443,55 @@
 		if (ac != optind) {
         	        tst_resm(TINFO,"Options are not match.");
                 	usage(progname);
-                	// NOTREACHED
+                	
 	        }
+>>>>>>> master
 
-		/*
-		* Execute test
-         	*/
-	        for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
-        	        int ret;
-	                tst_resm(TINFO,"(case%02d) START", i);
-	                ret = do_test(&tcase[i]);
-	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
-	                result |= ret;
-        	}
+	setup();
+
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+			 TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
+			 while (TEST_RETURN != -1) {
+				switch (c) {
+				case 'd':
+					opt_debug = 1;
+					break;
+				default:
+					usage(progname);
+				}
+			}
+
+
+			if (ac != optind) {
+				tst_resm(TINFO,"Options are not match.");
+				usage(progname);
+			}
+
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO,"(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO,"(case%02d) END => %s",
+					i, (ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
 		
-		/*
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "mq_notify call succeeded");
-		                break;
+			switch(result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "mq_notify call succeeded");
+				break;
 
-	        default:
-                 	   	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-        		        tst_resm(TINFO,"NG");
-				cleanup();
-				tst_exit();
-		                break;
-        	}
+			default:
+		 	   	tst_brkm(TFAIL, cleanup, "mq_notify failed");
+				break;
+			}
 
-                }
-        }	
-        cleanup();
+		}
+	}	
+	cleanup();
 	tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c
index 3f159ed..07e5e78 100644
--- a/testcases/kernel/syscalls/mq_open/mq_open01.c
+++ b/testcases/kernel/syscalls/mq_open/mq_open01.c
@@ -1,49 +1,49 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd		*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
 /*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
 /*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        mq_open01.c                                                   */
-/*                                                                            */
-/* Description: This tests the mq_open() syscall                              */
+/*									    */
+/* File:	mq_open01.c						   */
+/*									    */
+/* Description: This tests the mq_open() syscall			      */
 /*									      */
 /* 									      */
 /*									      */
 /*									      */
 /*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* mq_open01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                             */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   mq_open01                                                     */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* mq_open01 [-c n] [-e][-i n] [-I x] [-p x] [-t]			     */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   mq_open01						     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 #include <sys/syscall.h>
 #include <sys/types.h>
@@ -68,64 +68,61 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "mq_open01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
-extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
+void cleanup(void) {
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -134,16 +131,10 @@
  */
 #define SYSCALL_NAME    "mq_open"
 
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
-		NORMAL,
-		NO_FILE,
-	        NO_SPACE,
+	NORMAL,
+	NO_FILE,
+	NO_SPACE,
 };
 
 
@@ -152,13 +143,13 @@
  */
 struct test_case {
 	int ttype;
-        char *user;
-        char *qname;
-        int oflag;
-        long mq_maxmsg;         // Maximum numebr of messages.
-        long mq_msgsize;        // Maximum message size.
-        int ret;
-        int err;
+	char *user;
+	char *qname;
+	int oflag;
+	long mq_maxmsg;	 // Maximum numebr of messages.
+	long mq_msgsize;	// Maximum message size.
+	int ret;
+	int err;
 };
 
 #define ULIMIT_FNUM     0
@@ -168,114 +159,114 @@
  *
  *   test status of errors on man page
  *
- *   EACCES             v (permission is denied)
- *   EEXIST             v (named message queue already exists)
- *   EINTR              --- (interrupted by a signal)
- *   EINVAL             v (not supported for the given name, or invalid
- *                         arguments)
- *   EMFILE             v (process file table overflow)
+ *   EACCES	     v (permission is denied)
+ *   EEXIST	     v (named message queue already exists)
+ *   EINTR	      --- (interrupted by a signal)
+ *   EINVAL	     v (not supported for the given name, or invalid
+ *			 arguments)
+ *   EMFILE	     v (process file table overflow)
  *   ENAMETOOLONG       v (too long name length)
- *   ENFILE             can't check because it's difficult to create no-fd
- *   ENOENT             v (O_CREAT is not set and the named message queue
- *                         does not exist)
- *   ENOSPC             v (no space for the new message queue)
+ *   ENFILE	     can't check because it's difficult to create no-fd
+ *   ENOENT	     v (O_CREAT is not set and the named message queue
+ *			 does not exist)
+ *   ENOSPC	     v (no space for the new message queue)
  */
 
 
 static struct test_case tcase[] = {
 #if 1
-        { // case00
-                .ttype          = NORMAL,
-                .qname          = QUEUE_NAME,
-                .oflag          = O_CREAT,
-                .mq_maxmsg      = 20,
-                .mq_msgsize     = 16384,
-                .ret            = 0,
-                .err            = 0,
-        },
+	{ // case00
+		.ttype	  = NORMAL,
+		.qname	  = QUEUE_NAME,
+		.oflag	  = O_CREAT,
+		.mq_maxmsg      = 20,
+		.mq_msgsize     = 16384,
+		.ret	    = 0,
+		.err	    = 0,
+	},
 #else
-        { // case00
-                .ttype          = NORMAL,
-                .qname          = QUEUE_NAME,
-                .oflag          = O_CREAT,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .ttype          = NORMAL,
-                                //  0         1         2         3
-                                //  0123456789012345678901234567890123456789
-                .qname          = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaa",
-                .oflag          = O_CREAT,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                                //  0         1         2         3
-                                //  0123456789012345678901234567890123456789
-                .qname          = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaa",
-                .oflag          = O_CREAT,
-                .ret            = -1,
-                .err            = ENAMETOOLONG,
-        },
+	{ // case00
+		.ttype	  = NORMAL,
+		.qname	  = QUEUE_NAME,
+		.oflag	  = O_CREAT,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.ttype	  = NORMAL,
+				//  0	 1	 2	 3
+				//  0123456789012345678901234567890123456789
+		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaa",
+		.oflag	  = O_CREAT,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+				//  0	 1	 2	 3
+				//  0123456789012345678901234567890123456789
+		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaa",
+		.oflag	  = O_CREAT,
+		.ret	    = -1,
+		.err	    = ENAMETOOLONG,
+	},
 
 	{ // case03
-                .ttype          = NORMAL,
-                .qname          = "",
-                .oflag          = O_CREAT,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case04
-                .ttype          = NORMAL,
-                .user           = "nobody",
-                .qname          = QUEUE_NAME,
-                .ret            = -1,
-                .err            = EACCES,
-        },
-        { // case05
-                .ttype          = NORMAL,
-                .qname          = QUEUE_NAME,
-                .oflag          = O_CREAT|O_EXCL,
-                .ret            = -1,
-                .err            = EEXIST,
-        },
-        { // case06
-                .ttype          = NO_FILE,
-                .qname          = QUEUE_NAME,
-                .oflag          = O_CREAT,
-                .ret            = -1,
-                .err            = EMFILE,
-        },
-        { // case07
-                .ttype          = NORMAL,
-                .qname          = "/notexist",
-                .oflag          = 0,
-                .ret            = -1,
-                .err            = ENOENT,
-        },
+		.ttype	  = NORMAL,
+		.qname	  = "",
+		.oflag	  = O_CREAT,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case04
+		.ttype	  = NORMAL,
+		.user	   = "nobody",
+		.qname	  = QUEUE_NAME,
+		.ret	    = -1,
+		.err	    = EACCES,
+	},
+	{ // case05
+		.ttype	  = NORMAL,
+		.qname	  = QUEUE_NAME,
+		.oflag	  = O_CREAT|O_EXCL,
+		.ret	    = -1,
+		.err	    = EEXIST,
+	},
+	{ // case06
+		.ttype	  = NO_FILE,
+		.qname	  = QUEUE_NAME,
+		.oflag	  = O_CREAT,
+		.ret	    = -1,
+		.err	    = EMFILE,
+	},
+	{ // case07
+		.ttype	  = NORMAL,
+		.qname	  = "/notexist",
+		.oflag	  = 0,
+		.ret	    = -1,
+		.err	    = ENOENT,
+	},
 
 	{ // case08
-                .ttype          = NO_SPACE,
-                .user           = "nobody",
-                .qname          = QUEUE_NAME,
-                .oflag          = O_CREAT,
-                .ret            = -1,
-                .err            = ENOSPC,
-        },
+		.ttype	  = NO_SPACE,
+		.user	   = "nobody",
+		.qname	  = QUEUE_NAME,
+		.oflag	  = O_CREAT,
+		.ret	    = -1,
+		.err	    = ENOSPC,
+	},
 #endif
 };
 
@@ -290,226 +281,175 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
 	int rc, fd1 = -1, fd2 = -1, cmp_ok = 1;
-        uid_t old_uid = -1;
-        rlim_t oldlim = -1;
-        int oldval = -1;
-        struct mq_attr new, old, *p_attr;
+	uid_t old_uid = -1;
+	rlim_t oldlim = -1;
+	int oldval = -1;
+	struct mq_attr new, old, *p_attr;
 	
 	 /*
-         * When test ended with SIGTERM etc, mq discriptor is left remains.
-         * So we delete it first.
-         */
-        TEST(mq_unlink(QUEUE_NAME));
+	 * When test ended with SIGTERM etc, mq discriptor is left remains.
+	 * So we delete it first.
+	 */
+	TEST(mq_unlink(QUEUE_NAME));
 
 	
 	/*
-         * Execute system call
-         */
+	 * Execute system call
+	 */
 
 	if (tc->ttype != NO_SPACE && !(tc->oflag & O_CREAT)) {
-                errno = 0;
-                TEST(sys_ret = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
-                sys_errno = errno;
-                if (sys_ret < 0)
-                        goto TEST_END;
-                fd1 = sys_ret;
-        }
+		errno = 0;
+		TEST(sys_ret = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
+		sys_errno = errno;
+		if (sys_ret < 0)
+			goto TEST_END;
+		fd1 = sys_ret;
+	}
 	if (tc->ttype == NO_FILE) {
-                TEST(rc = setup_ulimit_fnum(ULIMIT_FNUM, &oldlim));
-                if (rc < 0) {
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+		TEST(rc = setup_ulimit_fnum(ULIMIT_FNUM, &oldlim));
+		if (rc < 0) {
+			result = 1;
+			goto EXIT;
+		}
+	}
 
 	/*
-         * Change /proc/sys/fs/mqueue/queues_max
-         */
-        if (tc->ttype == NO_SPACE) {
-                TEST(rc = setup_proc_fs(PROC_MAX_QUEUES, 0, &oldval));
-                if (rc < 0) {
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+	 * Change /proc/sys/fs/mqueue/queues_max
+	 */
+	if (tc->ttype == NO_SPACE) {
+		TEST(rc = setup_proc_fs(PROC_MAX_QUEUES, 0, &oldval));
+		if (rc < 0) {
+			result = 1;
+			goto EXIT;
+		}
+	}
 
 	/*
-         * Change effective user id
-         */
-        if (tc->user != NULL) {
-                TEST(rc = setup_euid(tc->user, &old_uid));
-                if (rc < 0) {
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+	 * Change effective user id
+	 */
+	if (tc->user != NULL) {
+		TEST(rc = setup_euid(tc->user, &old_uid));
+		if (rc < 0) {
+			result = 1;
+			goto EXIT;
+		}
+	}
 
 	 /*
-         * Execute system call
-         */
-        //tst_resm(TINFO,"PATH_MAX: %d\n", PATH_MAX);
-        //tst_resm(TINFO,"NAME_MAX: %d", NAME_MAX);
-        p_attr = NULL;
-        if (tc->mq_maxmsg || tc->mq_msgsize) {
-                new.mq_maxmsg = tc->mq_maxmsg;
-                new.mq_msgsize = tc->mq_msgsize;
-                p_attr = &new;
-        }
-        errno = 0;
+	 * Execute system call
+	 */
+	//tst_resm(TINFO,"PATH_MAX: %d\n", PATH_MAX);
+	//tst_resm(TINFO,"NAME_MAX: %d", NAME_MAX);
+	p_attr = NULL;
+	if (tc->mq_maxmsg || tc->mq_msgsize) {
+		new.mq_maxmsg = tc->mq_maxmsg;
+		new.mq_msgsize = tc->mq_msgsize;
+		p_attr = &new;
+	}
+	errno = 0;
 	if (tc->oflag & O_CREAT)
-                TEST(sys_ret = mq_open(tc->qname, tc->oflag, S_IRWXU, p_attr));
-        else
-                TEST(sys_ret = mq_open(tc->qname, tc->oflag));
-        sys_errno = errno;
-        if (sys_ret < 0)
-                goto TEST_END;
-        fd2 = sys_ret;
+		TEST(sys_ret = mq_open(tc->qname, tc->oflag, S_IRWXU, p_attr));
+	else
+		TEST(sys_ret = mq_open(tc->qname, tc->oflag));
+	sys_errno = errno;
+	if (sys_ret < 0)
+		goto TEST_END;
+	fd2 = sys_ret;
 
-        if (p_attr) {
-                TEST(rc = syscall(__NR_mq_getsetattr, fd2, NULL, &old));
-                if (TEST_RETURN < 0) {
-                 	tst_resm(TFAIL, "mq_getsetattr failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-		if (opt_debug) {
-                        tst_resm(TINFO,"mq_maxmsg E:%ld,\tR:%ld",new.mq_maxmsg, old.mq_maxmsg);
-                        tst_resm(TINFO,"mq_msgsize E:%ld,\tR:%ld",new.mq_msgsize, old.mq_msgsize);
-                }
-                cmp_ok = old.mq_maxmsg == new.mq_maxmsg &&
-                         old.mq_msgsize == new.mq_msgsize;
-        }
+	if (p_attr) {
+		TEST(rc = syscall(__NR_mq_getsetattr, fd2, NULL, &old));
+		if (TEST_RETURN < 0) {
+		 	tst_resm(TFAIL, "mq_getsetattr failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
+			result = 1;
+			goto EXIT;
+		}
+		tst_resm(TINFO,"mq_maxmsg E:%ld,\tR:%ld",new.mq_maxmsg, old.mq_maxmsg);
+		tst_resm(TINFO,"mq_msgsize E:%ld,\tR:%ld",new.mq_msgsize, old.mq_msgsize);
+		cmp_ok = old.mq_maxmsg == new.mq_maxmsg &&
+			 old.mq_msgsize == new.mq_msgsize;
+	}
 
 TEST_END:
-        /*
-         * Check results
-         */
-        result |= (sys_errno != tc->err) || !cmp_ok;
-        PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	/*
+	 * Check results
+	 */
+	result |= (sys_errno != tc->err) || !cmp_ok;
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
 
 EXIT:
-        if (tc->user != NULL && old_uid != -1)
-                TEST(cleanup_euid(old_uid));
+	if (tc->user != NULL && old_uid != -1)
+		TEST(cleanup_euid(old_uid));
 
-        if (tc->ttype == NO_SPACE && oldval != -1)
-                TEST(cleanup_proc_fs(PROC_MAX_QUEUES, oldval));
+	if (tc->ttype == NO_SPACE && oldval != -1)
+		TEST(cleanup_proc_fs(PROC_MAX_QUEUES, oldval));
 
-        if (tc->ttype == NO_FILE && oldlim != -1)
-                TEST(cleanup_ulimit_fnum(oldlim));
-	 if (fd1 >= 0)
-                TEST(close(fd1));
-        if (fd2 >= 0)
-                TEST(close(fd2));
-        if (fd1 >= 0)
-                TEST(mq_unlink(QUEUE_NAME));
-        if (fd2 >= 0 && strcmp(tc->qname, QUEUE_NAME) != 0)
-                TEST(mq_unlink(tc->qname));
+	if (tc->ttype == NO_FILE && oldlim != -1)
+		TEST(cleanup_ulimit_fnum(oldlim));
+	if (fd1 >= 0)
+		TEST(close(fd1));
+	if (fd2 >= 0)
+		TEST(close(fd2));
+	if (fd1 >= 0)
+		TEST(mq_unlink(QUEUE_NAME));
+	if (fd2 >= 0 && strcmp(tc->qname, QUEUE_NAME) != 0)
+		TEST(mq_unlink(tc->qname));
 
-        return result;
+	return result;
 }
 
-
-/*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG");
-        exit(1);
-}
-
-
 /*
  * main()
  */
 
 int main(int ac, char **av) {
 	int result = RESULT_OK;
-        int c;
-        int i;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
 
-	struct option long_options[] = {
-                { "debug", no_argument, 0, 'd' },
-                { "help",  no_argument, 0, 'h' },
-                { NULL, 0, NULL, 0 }
-        };
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	progname = strchr(av[0], '/');
-        progname = progname ? progname + 1 : av[0];	
-	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	setup();
 
-        setup();
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-        /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-			 TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
-			 while (TEST_RETURN != -1) {
-		                switch (c) {
-                		case 'd':
-		                        opt_debug = 1;
-                		        break;
-		                default:
-                		        usage(progname);
-                        		// NOTREACHED
-                		}
-		        }
+			/*
+			 * Execute test
+	 		 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO, "(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO, "(case%02d) END => %s", i,
+					(ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
 
+			/*
+			 * Check results
+	 		 */
+			switch(result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "mq_open call succeeded ");
+				break;
 
-		if (ac != optind) {
-        	        tst_resm(TINFO,"Options are not match.");
-                	usage(progname);
-                	// NOTREACHED
-	        }
+			default:
+			   	tst_brkm(TFAIL|TTERRNO, cleanup,
+					"mq_open failed");
+				break;
+			}
 
-		/*
-		* Execute test
-         	*/
-	        for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
-        	        int ret;
-	                tst_resm(TINFO,"(case%02d) START", i);
-	                ret = do_test(&tcase[i]);
-	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
-	                result |= ret;
-        	}
-		
-		/*
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "mq_open call succeeded ");
-		                break;
-
-	        default:
-                 	   	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-        		        tst_resm(TINFO,"NG");
-				cleanup();
-				tst_exit();
-		                break;
-        	}
-
-                }
-        }	
-        cleanup();
+		}
+	}	
+	cleanup();
 	tst_exit();
 }
-
diff --git a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
index a9a8f7d..a69a39a 100644
--- a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
+++ b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
@@ -1,49 +1,49 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd		*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
 /*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
 /*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        mq_timedreceive01.c                                           */
-/*                                                                            */
-/* Description: This tests the mq_timedreceive() syscall                      */
+/*									    */
+/* File:	mq_timedreceive01.c					   */
+/*									    */
+/* Description: This tests the mq_timedreceive() syscall		      */
 /*									      */
 /* 									      */
 /*									      */
 /*									      */
 /*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* mq_timedreceive01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                     */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   mq_timedreceive01                                             */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* mq_timedreceive01 [-c n] [-e][-i n] [-I x] [-p x] [-t]		     */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   mq_timedreceive01					     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 #define _XOPEN_SOURCE 600
 #include <sys/syscall.h>
@@ -51,6 +51,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <getopt.h>
+#include <libgen.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <stdio.h>
@@ -71,13 +72,13 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "mq_timedreceive01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -85,66 +86,64 @@
  */
 void sighandler(int sig)
 {
-        if (sig == SIGINT)
-                return;
-        // NOTREACHED
-        return;
+	if (sig == SIGINT)
+		return;
+	
+	return;
 }
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        /* Exit with appropriate return code. */
-        tst_exit();
 }
 
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-	    /* Capture signals if any */
-        act.sa_handler = sighandler;
-        sigfillset(&act.sa_mask);
-        sigaction(SIGINT, &act, NULL);
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	act.sa_handler = sighandler;
+	sigfillset(&act.sa_mask);
+	sigaction(SIGINT, &act, NULL);
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -153,21 +152,14 @@
  */
 #define SYSCALL_NAME    "mq_timedreceive"
 
-
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
 	NORMAL,
-        FD_NONE,
-        FD_NOT_EXIST,
-        FD_FILE,
-        INVALID_MSG_LEN,
-        EMPTY_QUEUE,
-        SEND_SIGINT,
+	FD_NONE,
+	FD_NOT_EXIST,
+	FD_FILE,
+	INVALID_MSG_LEN,
+	EMPTY_QUEUE,
+	SEND_SIGINT,
 };
 
 
@@ -176,133 +168,133 @@
  */
 struct test_case {
 	int ttype;
-        int non_block;
-        int len;
-        unsigned prio;
-        time_t sec;
-        long nsec;
-        int ret;
-        int err;
+	int non_block;
+	int len;
+	unsigned prio;
+	time_t sec;
+	long nsec;
+	int ret;
+	int err;
 };
 
-#define MAX_MSG         10
+#define MAX_MSG	 10
 #define MAX_MSGSIZE     8192
 
 /* Test cases
  *
  *   test status of errors on man page
  *
- *   EAGAIN             v (would block)
- *   EBADF              v (not a valid descriptor)
- *   EINTR              v (interrupted by a signal)
- *   EINVAL             v (invalid timeout value)
- *   ETIMEDOUT          v (not block and timeout occured)
- *   EMSGSIZE           v ('msg_len' is less than the message size of the queue)
- *   EBADMSG            can't check because this error never occur
+ *   EAGAIN	     v (would block)
+ *   EBADF	      v (not a valid descriptor)
+ *   EINTR	      v (interrupted by a signal)
+ *   EINVAL	     v (invalid timeout value)
+ *   ETIMEDOUT	  v (not block and timeout occured)
+ *   EMSGSIZE	   v ('msg_len' is less than the message size of the queue)
+ *   EBADMSG	    can't check because this error never occur
  */
 static struct test_case tcase[] = {
-        { // case00
-                .ttype          = NORMAL,
-                .len            = 0,    // also success when size equals zero
-                .ret            = 0,
-                .err            = 0,
-        },
+	{ // case00
+		.ttype	    = NORMAL,
+		.len	    = 0,    // also success when size equals zero
+		.ret	    = 0,
+		.err	    = 0,
+	},
 	{ // case01
-                .ttype          = NORMAL,
-                .len            = 1,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                .len            = MAX_MSGSIZE,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case03
-                .ttype          = NORMAL,
-                .len            = 1,
-                .prio           = 32767, // max priority
-                .ret            = 0,
-                .err            = 0,
-        },
+		.ttype	  = NORMAL,
+		.len	    = 1,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+		.len	    = MAX_MSGSIZE,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case03
+		.ttype	  = NORMAL,
+		.len	    = 1,
+		.prio	   = 32767, // max priority
+		.ret	    = 0,
+		.err	    = 0,
+	},
 	{ // case04
-                .ttype          = INVALID_MSG_LEN,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EMSGSIZE,
-        },
-        { // case05
-                .ttype          = FD_NONE,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case06
-                .ttype          = FD_NOT_EXIST,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case07
-                .ttype          = FD_FILE,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case08
-                .ttype          = EMPTY_QUEUE,
-                .non_block      = 1,
-                .len            = 16,
-                .ret            = -1,
-                .err            = EAGAIN,
-        },
-        { // case09
-                .ttype          = EMPTY_QUEUE,
-                .len            = 16,
-                .sec            = -1,
-                .nsec           = 0,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
+		.ttype	  = INVALID_MSG_LEN,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EMSGSIZE,
+	},
+	{ // case05
+		.ttype	  = FD_NONE,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case06
+		.ttype	  = FD_NOT_EXIST,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case07
+		.ttype	  = FD_FILE,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case08
+		.ttype	  = EMPTY_QUEUE,
+		.non_block      = 1,
+		.len	    = 16,
+		.ret	    = -1,
+		.err	    = EAGAIN,
+	},
+	{ // case09
+		.ttype	  = EMPTY_QUEUE,
+		.len	    = 16,
+		.sec	    = -1,
+		.nsec	   = 0,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
 	{ // case10
-                .ttype          = EMPTY_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = -1,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case11
-                .ttype          = EMPTY_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = 1000000000,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case12
-                .ttype          = EMPTY_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = 999999999,
-                .ret            = -1,
-                .err            = ETIMEDOUT,
-        },
-        { // case13
-                .ttype          = SEND_SIGINT,
-                .len            = 16,
-                .sec            = 3,
-                .nsec           = 0,
-                .ret            = -1,
-                .err            = EINTR,
-        },
+		.ttype	  = EMPTY_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = -1,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case11
+		.ttype	  = EMPTY_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = 1000000000,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case12
+		.ttype	  = EMPTY_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = 999999999,
+		.ret	    = -1,
+		.err	    = ETIMEDOUT,
+	},
+	{ // case13
+		.ttype	  = SEND_SIGINT,
+		.len	    = 16,
+		.sec	    = 3,
+		.nsec	   = 0,
+		.ret	    = -1,
+		.err	    = EINTR,
+	},
 };
 
 
 
 
-#define MEM_LENGTH              (4 * 1024 * 1024)
+#define MEM_LENGTH	      (4 * 1024 * 1024)
 /*
  * do_test()
  *
@@ -313,160 +305,142 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
-        int oflag;
-        int i, rc, cmp_ok = 1, fd = -1;
-        char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
-        struct timespec ts = {0,0};
-        pid_t pid = 0;
-        unsigned prio;
-        size_t msg_len;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
+	int oflag;
+	int i, rc, cmp_ok = 1, fd = -1;
+	char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
+	struct timespec ts = {0,0};
+	pid_t pid = 0;
+	unsigned prio;
+	size_t msg_len;
 
 	/*
-         * When test ended with SIGTERM etc, mq discriptor is left remains.
-         * So we delete it first.
-         */
-        TEST(mq_unlink(QUEUE_NAME));
+	 * When test ended with SIGTERM etc, mq discriptor is left remains.
+	 * So we delete it first.
+	 */
+	TEST(mq_unlink(QUEUE_NAME));
 
-switch (tc->ttype) {
-        case FD_NOT_EXIST:
-                fd = INT_MAX - 1;
-                /* fallthrough */
-        case FD_NONE:
-                break;
-        case FD_FILE:
-                TEST(fd = open("/", O_RDONLY));
-                if (TEST_RETURN < 0) {
-                 	tst_resm(TFAIL, "can't open \"/\". - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-                break;
-        default:
-                /*
-                 * Open message queue
-                 */
-                oflag = O_CREAT|O_EXCL|O_RDWR;
-                if (tc->non_block)
-                        oflag |= O_NONBLOCK;
+	switch (tc->ttype) {
+	case FD_NOT_EXIST:
+		fd = INT_MAX - 1;
+		/* fallthrough */
+	case FD_NONE:
+		break;
+	case FD_FILE:
+		TEST(fd = open("/", O_RDONLY));
+		if (TEST_RETURN < 0) {
+		 	tst_resm(TFAIL|TTERRNO, "can't open \"/\".");
+			result = 1;
+			goto EXIT;
+		}
+		break;
+	default:
+		/*
+		 * Open message queue
+		 */
+		oflag = O_CREAT|O_EXCL|O_RDWR;
+		if (tc->non_block)
+			oflag |= O_NONBLOCK;
 
-                TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
-                if (TEST_RETURN < 0) {
-                 	tst_resm(TFAIL, "mq_open failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
+		TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
+		if (TEST_RETURN < 0) {
+		 	tst_resm(TFAIL|TTERRNO, "mq_open failed");
+			result = 1;
+			goto EXIT;
+		}
 
-		 if (tc->ttype == SEND_SIGINT) {
-                        pid = create_sig_proc(200000, SIGINT, UINT_MAX);
-                        if (pid < 0) {
-                                result = 1;
-                                goto EXIT;
-                        }
-                }
-                break;
-           }
+		if (tc->ttype == SEND_SIGINT) {
+			pid = create_sig_proc(200000, SIGINT, UINT_MAX);
+			if (pid < 0) {
+				result = 1;
+				goto EXIT;
+			}
+		}
+		break;
+	}
 
 	/*
-         * Prepare send message
-         */
-        for (i = 0; i < tc->len; i++)
-                smsg[i] = i;
-
-        /*
-         * Send message
-         */
-        switch (tc->ttype) {
-        case EMPTY_QUEUE:
-        case SEND_SIGINT:
-        case FD_NONE:
-        case FD_NOT_EXIST:
-        case FD_FILE:
-                break;
-        default:
-                TEST(rc = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
-                if (TEST_RETURN < 0) {
-                 	tst_resm(TFAIL, "mq_timedsend failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-                break;
-        }
-
-        /*
-         * Set the message length and timeout value
-         */
-        msg_len = MAX_MSGSIZE;
-        if (tc->ttype == INVALID_MSG_LEN)
-                msg_len -= 1;
-        ts.tv_sec = tc->sec;
-        ts.tv_nsec = tc->nsec;
-        if (tc->sec >= 0 || tc->nsec != 0)
-                ts.tv_sec += time(NULL);
+	 * Prepare send message
+	 */
+	for (i = 0; i < tc->len; i++)
+		smsg[i] = i;
 
 	/*
-         * Execute system call
-         */
-        errno = 0;
-        TEST(sys_ret = mq_timedreceive(fd, rmsg, msg_len, &prio, &ts));
-        sys_errno = errno;
-        if (sys_ret < 0)
-                goto TEST_END;
+	 * Send message
+	 */
+	switch (tc->ttype) {
+	case EMPTY_QUEUE:
+	case SEND_SIGINT:
+	case FD_NONE:
+	case FD_NOT_EXIST:
+	case FD_FILE:
+		break;
+	default:
+		TEST(rc = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
+		if (TEST_RETURN < 0) {
+		 	tst_resm(TFAIL|TTERRNO, "mq_timedsend failed");
+			result = 1;
+			goto EXIT;
+		}
+		break;
+	}
+
+	/*
+	 * Set the message length and timeout value
+	 */
+	msg_len = MAX_MSGSIZE;
+	if (tc->ttype == INVALID_MSG_LEN)
+		msg_len -= 1;
+	ts.tv_sec = tc->sec;
+	ts.tv_nsec = tc->nsec;
+	if (tc->sec >= 0 || tc->nsec != 0)
+		ts.tv_sec += time(NULL);
+
+	/*
+	 * Execute system call
+	 */
+	errno = 0;
+	TEST(sys_ret = mq_timedreceive(fd, rmsg, msg_len, &prio, &ts));
+	sys_errno = errno;
+	if (sys_ret < 0)
+		goto TEST_END;
 
 	 /*
-         * Compare received message
-         */
-        if (sys_ret != tc->len || tc->prio != prio)
-                cmp_ok = 0;
-        else {
-                for (i = 0; i < tc->len; i++)
-                        if (rmsg[i] != smsg[i]) {
-                                cmp_ok = 0;
-                                break;
-                        }
-        }
+	 * Compare received message
+	 */
+	if (sys_ret != tc->len || tc->prio != prio)
+		cmp_ok = 0;
+	else {
+		for (i = 0; i < tc->len; i++)
+			if (rmsg[i] != smsg[i]) {
+				cmp_ok = 0;
+				break;
+			}
+	}
 
 
 	TEST_END:
-        /*
-         * Check results
-         */
-        result |= (sys_errno != tc->err) || !cmp_ok;
-        PRINT_RESULT_CMP(0, tc->ret == 0 ? tc->len : tc->ret, tc->err,sys_ret, sys_errno, cmp_ok);
+	/*
+	 * Check results
+	 */
+	result |= (sys_errno != tc->err) || !cmp_ok;
+	PRINT_RESULT_CMP(0, tc->ret == 0 ? tc->len : tc->ret, tc->err,sys_ret, sys_errno, cmp_ok);
 
 EXIT:
-        if (fd >= 0) {
-                TEST(close(fd));
-                TEST(mq_unlink(QUEUE_NAME));
-        }
-        if (pid > 0) {
-                int st;
-                TEST(kill(pid, SIGTERM));
-                TEST(wait(&st));
-        }
-        return result;
+	if (fd >= 0) {
+		TEST(close(fd));
+		TEST(mq_unlink(QUEUE_NAME));
+	}
+	if (pid > 0) {
+		int st;
+		TEST(kill(pid, SIGTERM));
+		TEST(wait(&st));
+	}
+	return result;
 }
 
-
-
-/*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG");
-        exit(1);
-}
-
-
 /*
  * main()
  */
@@ -475,6 +449,49 @@
 
 int main(int ac, char **av) {
 	int result = RESULT_OK;
+<<<<<<< HEAD
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
+
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+	setup();
+
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+
+			/*
+			 * Execute test
+		 	 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO,"(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO,"(case%02d) END => %s",
+					i, (ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
+
+			/*
+			 * Check results
+	 		 */
+			switch(result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "mq_timedreceive call succeeded");
+			break;
+
+			default:
+				tst_brkm(TFAIL|TTERRNO, cleanup, "mq_timedreceive failed");
+			}
+		}
+	}
+	cleanup();
+=======
         int c;
         int i;
         int lc;                 /* loop counter */
@@ -509,7 +526,7 @@
                 		        break;
 		                default:
                 		        usage(progname);
-                        		// NOTREACHED
+                        		
                 		}
 		        }
 
@@ -517,7 +534,7 @@
 		if (ac != optind) {
         	        tst_resm(TINFO,"Options are not match.");
                 	usage(progname);
-                	// NOTREACHED
+                	
 	        }
 
 		/*
@@ -550,6 +567,6 @@
                 }
         }
         cleanup();
+>>>>>>> master
 	tst_exit();
 }
-
diff --git a/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c b/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
index c2994da..c55f7f9 100644
--- a/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
+++ b/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
@@ -1,50 +1,50 @@
-/******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
-/*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
-/*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
-/* This program is free software;  you can redistribute it and/or modify      */
-/* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
-/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
-/******************************************************************************/
-/******************************************************************************/
-/*                                                                            */
-/* File:        mq_timedsend01.c                                              */
-/*                                                                            */
-/* Description: This tests the mq_timedsend() syscall                         */
-/*									      */
-/* 									      */
-/*									      */
-/*									      */
-/*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* mq_timedsend01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                        */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   mq_timedsend01                                                */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
-/******************************************************************************/
+/********************************************************************************/
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd			*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,		*/
+/*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>,		*/
+/*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>		*/
+/*										*/
+/* This program is free software;  you can redistribute it and/or modify	*/
+/* it under the terms of the GNU General Public License as published by		*/
+/* the Free Software Foundation; either version 2 of the License, or		*/
+/* (at your option) any later version.						*/
+/*										*/
+/* This program is distributed in the hope that it will be useful,		*/
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of		*/
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See			*/
+/* the GNU General Public License for more details.				*/
+/*										*/
+/* You should have received a copy of the GNU General Public License		*/
+/* along with this program;  if not, write to the Free Software			*/
+/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA	*/
+/* USA										*/
+/********************************************************************************/
+/************************************************************************/
+/*									*/
+/* File:	mq_timedsend01.c					*/
+/*									*/
+/* Description: This tests the mq_timedsend() syscall			*/
+/*									*/
+/* 									*/
+/*									*/
+/*									*/
+/*									*/
+/*									*/
+/* Usage:  <for command-line>						*/
+/* mq_timedsend01 [-c n] [-e][-i n] [-I x] [-p x] [-t]			*/
+/*      where,  -c n : Run n copies concurrently.			*/
+/*	      -e   : Turn on errno logging.				*/
+/*	      -i n : Execute test n times.				*/
+/*	      -I x : Execute test for x seconds.			*/
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									*/
+/* Total Tests: 1							*/
+/*									*/
+/* Test Name:   mq_timedsend01						*/
+/* History:     Porting from Crackerjack to LTP is done by		*/
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
+/************************************************************************/
 #include <sys/syscall.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -70,13 +70,13 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "mq_timedsend01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -84,67 +84,63 @@
  */
 void sighandler(int sig)
 {
-        if (sig == SIGINT)
-                return;
-        // NOTREACHED
-        return;
+	if (sig == SIGINT)
+		return;
+	return;
 }
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
 	
-        /* Capture signals if any */
+	/* Capture signals if any */
 	act.sa_handler = sighandler;
 	sigfillset(&act.sa_mask);
 
 	sigaction(SIGINT, &act, NULL);
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -153,20 +149,13 @@
  */
 #define SYSCALL_NAME    "mq_timedsend"
 
-
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
 		NORMAL,
 		FD_NONE,
-	        FD_NOT_EXIST,
-        	FD_FILE,
-	        FULL_QUEUE,
-        	SEND_SIGINT,
+		FD_NOT_EXIST,
+		FD_FILE,
+		FULL_QUEUE,
+		SEND_SIGINT,
 };
 
 /*
@@ -174,135 +163,135 @@
  */
 struct test_case {
 	int ttype;
-        int non_block;
-        int len;
-        unsigned prio;
-        time_t sec;
-        long nsec;
-        int ret;
-        int err;
+	int non_block;
+	int len;
+	unsigned prio;
+	time_t sec;
+	long nsec;
+	int ret;
+	int err;
 };
 
-#define MAX_MSG         10
+#define MAX_MSG	 10
 #define MAX_MSGSIZE     8192
 
 /* Test cases
 *
 *   test status of errors on man page
 *
-*   EAGAIN             v (would block)
-*   EBADF              v (not a valid descriptor)
-*   EINTR              v (interrupted by a signal)
-*   EINVAL             v (1. invalid 'msg_prio' or
-*                         2. would block but timeout exists)
-*   EMSGSIZE           v ('msg_len' exceeds the message size of the queue)
-*   ETIMEDOUT          v (not block and timeout occured)
+*   EAGAIN	     v (would block)
+*   EBADF	      v (not a valid descriptor)
+*   EINTR	      v (interrupted by a signal)
+*   EINVAL	     v (1. invalid 'msg_prio' or
+*			 2. would block but timeout exists)
+*   EMSGSIZE	   v ('msg_len' exceeds the message size of the queue)
+*   ETIMEDOUT	  v (not block and timeout occured)
 */
 
 static struct test_case tcase[] = {
 	{ // case00
-                .ttype          = NORMAL,
-                .len            = 0,    // also success when size equals zero
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .ttype          = NORMAL,
-                .len            = 1,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                .len            = MAX_MSGSIZE,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case03
-                .ttype          = NORMAL,
-                .len            = 1,
-                .prio           = 32767, // max priority
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case04
-                .ttype          = NORMAL,
-                .len            = MAX_MSGSIZE + 1,
-                .ret            = -1,
-                .err            = EMSGSIZE,
-        },
+		.ttype	  = NORMAL,
+		.len	    = 0,    // also success when size equals zero
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.ttype	  = NORMAL,
+		.len	    = 1,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+		.len	    = MAX_MSGSIZE,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case03
+		.ttype	  = NORMAL,
+		.len	    = 1,
+		.prio	   = 32767, // max priority
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case04
+		.ttype	  = NORMAL,
+		.len	    = MAX_MSGSIZE + 1,
+		.ret	    = -1,
+		.err	    = EMSGSIZE,
+	},
 	{ // case05
-                .ttype          = FD_NONE,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case06
-                .ttype          = FD_NOT_EXIST,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case07
-                .ttype          = FD_FILE,
-                .len            = 0,
-                .ret            = -1,
-                .err            = EBADF,
-        },
-        { // case08
-                .ttype          = FULL_QUEUE,
-                .non_block      = 1,
-                .len            = 16,
-                .ret            = -1,
-                .err            = EAGAIN,
-        },
+		.ttype	  = FD_NONE,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case06
+		.ttype	  = FD_NOT_EXIST,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case07
+		.ttype	  = FD_FILE,
+		.len	    = 0,
+		.ret	    = -1,
+		.err	    = EBADF,
+	},
+	{ // case08
+		.ttype	  = FULL_QUEUE,
+		.non_block      = 1,
+		.len	    = 16,
+		.ret	    = -1,
+		.err	    = EAGAIN,
+	},
 	{ // case09
-                .ttype          = NORMAL,
-                .len            = 1,
-                .prio           = 32768, // max priority + 1
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case10
-                .ttype          = FULL_QUEUE,
-                .len            = 16,
-                .sec            = -1,
-                .nsec           = 0,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case11
-                .ttype          = FULL_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = -1,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
-        { // case12
-                .ttype          = FULL_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = 1000000000,
-                .ret            = -1,
-                .err            = EINVAL,
-        },
+		.ttype	  = NORMAL,
+		.len	    = 1,
+		.prio	   = 32768, // max priority + 1
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case10
+		.ttype	  = FULL_QUEUE,
+		.len	    = 16,
+		.sec	    = -1,
+		.nsec	   = 0,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case11
+		.ttype	  = FULL_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = -1,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
+	{ // case12
+		.ttype	  = FULL_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = 1000000000,
+		.ret	    = -1,
+		.err	    = EINVAL,
+	},
 	{ // case13
-                .ttype          = FULL_QUEUE,
-                .len            = 16,
-                .sec            = 0,
-                .nsec           = 999999999,
-                .ret            = -1,
-                .err            = ETIMEDOUT,
-        },
-        { // case14
-                .ttype          = SEND_SIGINT,
-                .len            = 16,
-                .ret            = -1,
-                .sec            = 3,
-                .nsec           = 0,
-                .err            = EINTR,
-        },
+		.ttype	  = FULL_QUEUE,
+		.len	    = 16,
+		.sec	    = 0,
+		.nsec	   = 999999999,
+		.ret	    = -1,
+		.err	    = ETIMEDOUT,
+	},
+	{ // case14
+		.ttype	  = SEND_SIGINT,
+		.len	    = 16,
+		.ret	    = -1,
+		.sec	    = 3,
+		.nsec	   = 0,
+		.err	    = EINTR,
+	},
 };
 
 
@@ -316,232 +305,184 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
 	int oflag;
-        int i, rc, cmp_ok = 1, fd = -1;
-        char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
-        struct timespec ts = {0,0};
-        pid_t pid = 0;
-        unsigned prio;
+	int i, rc, cmp_ok = 1, fd = -1;
+	char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
+	struct timespec ts = {0,0};
+	pid_t pid = 0;
+	unsigned prio;
 
-        /*
-         * When test ended with SIGTERM etc, mq discriptor is left remains.
-         * So we delete it first.
-         */
-        TEST(mq_unlink(QUEUE_NAME));
+	/*
+	 * When test ended with SIGTERM etc, mq discriptor is left remains.
+	 * So we delete it first.
+	 */
+	TEST(mq_unlink(QUEUE_NAME));
 
-        switch (tc->ttype) {
-        case FD_NOT_EXIST:
-                fd = INT_MAX - 1;
-                /* fallthrough */
-        case FD_NONE:
-                break;
+	switch (tc->ttype) {
+	case FD_NOT_EXIST:
+		fd = INT_MAX - 1;
+		/* fallthrough */
+	case FD_NONE:
+		break;
 	case FD_FILE:
-                TEST(fd = open("/", O_RDONLY));
-                if (fd < 0) {
-                 	tst_resm(TFAIL, "can't open \"/\".- errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-                break;
-        default:
-                /*
-                 * Open message queue
-                 */
-                oflag = O_CREAT|O_EXCL|O_RDWR;
-                if (tc->non_block)
-                        oflag |= O_NONBLOCK;
+		TEST(fd = open("/", O_RDONLY));
+		if (fd < 0) {
+		 	tst_resm(TFAIL, "can't open \"/\".- errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
+			result = 1;
+			goto EXIT;
+		}
+		break;
+	default:
+		/*
+		 * Open message queue
+		 */
+		oflag = O_CREAT|O_EXCL|O_RDWR;
+		if (tc->non_block)
+			oflag |= O_NONBLOCK;
 
-                TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
-                if (TEST_RETURN < 0) {
-                 	tst_resm(TFAIL, "mq_open failed - errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
-                        result = 1;
-                        goto EXIT;
-                }
-                if (tc->ttype == FULL_QUEUE || tc->ttype == SEND_SIGINT) {
-                        for (i = 0; i < MAX_MSG; i++) {
-                                TEST(rc = mq_timedsend(fd, smsg, tc->len, 0, &ts));
-                                if (rc < 0) {
-                 	   		tst_resm(TFAIL, "mq_timedsend failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
-                                        result = 1;
-                                        goto EXIT;
-                                }
-                        }
+		TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
+		if (TEST_RETURN < 0) {
+		 	tst_resm(TFAIL, "mq_open failed - errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
+			result = 1;
+			goto EXIT;
+		}
+		if (tc->ttype == FULL_QUEUE || tc->ttype == SEND_SIGINT) {
+			for (i = 0; i < MAX_MSG; i++) {
+				TEST(rc = mq_timedsend(fd, smsg, tc->len, 0, &ts));
+				if (rc < 0) {
+		 	   		tst_resm(TFAIL, "mq_timedsend failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
+					result = 1;
+					goto EXIT;
+				}
+			}
 			if (tc->ttype == SEND_SIGINT) {
-                                pid = create_sig_proc(200000, SIGINT, UINT_MAX);
-                                if (pid < 0) {
-                                        result = 1;
-                                        goto EXIT;
-                                }
-                        }
-                }
-                break;
-        }
+				pid = create_sig_proc(200000, SIGINT, UINT_MAX);
+				if (pid < 0) {
+					result = 1;
+					goto EXIT;
+				}
+			}
+		}
+		break;
+	}
 
-        /*
-         * Prepare send message
-         */
-        for (i = 0; i < tc->len; i++)
-                smsg[i] = i;
+	/*
+	 * Prepare send message
+	 */
+	for (i = 0; i < tc->len; i++)
+		smsg[i] = i;
 
-        /*
-         * Set the timeout value
-         */
-        ts.tv_sec = tc->sec;
-        ts.tv_nsec = tc->nsec;
+	/*
+	 * Set the timeout value
+	 */
+	ts.tv_sec = tc->sec;
+	ts.tv_nsec = tc->nsec;
 	if (tc->sec >= 0 || tc->nsec != 0)
 		ts.tv_sec += time(NULL);
 
-        /*
-        * Execut test system call
-         */
-        errno = 0;
-        TEST(sys_ret = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
-        sys_errno = errno;
-        if (sys_ret < 0)
-                goto TEST_END;
+	/*
+	* Execut test system call
+	 */
+	errno = 0;
+	TEST(sys_ret = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
+	sys_errno = errno;
+	if (sys_ret < 0)
+		goto TEST_END;
 
-        /*
-         * Receive echoed message and compare
-         */
+	/*
+	 * Receive echoed message and compare
+	 */
 	ts.tv_sec = 0;
 	ts.tv_nsec = 0;
-        TEST(rc = mq_timedreceive(fd, rmsg, MAX_MSGSIZE, &prio, &ts));
-        if (rc < 0) {
-                tst_resm(TFAIL, "mq_timedreceive failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
-                result = 1;
-                goto EXIT;
-        }
-        if (rc != tc->len || tc->prio != prio)
-                cmp_ok = 0;
-        else {
-                for (i = 0; i < tc->len; i++)
-                        if (rmsg[i] != smsg[i]) {
-                                cmp_ok = 0;
-                                break;
-                        }
-        }
+	TEST(rc = mq_timedreceive(fd, rmsg, MAX_MSGSIZE, &prio, &ts));
+	if (rc < 0) {
+		tst_resm(TFAIL, "mq_timedreceive failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
+		result = 1;
+		goto EXIT;
+	}
+	if (rc != tc->len || tc->prio != prio)
+		cmp_ok = 0;
+	else {
+		for (i = 0; i < tc->len; i++)
+			if (rmsg[i] != smsg[i]) {
+				cmp_ok = 0;
+				break;
+			}
+	}
 TEST_END:
-        /*
-         * Check results
-         */
-        result |= (sys_errno != tc->err) || !cmp_ok;
-        PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	/*
+	 * Check results
+	 */
+	result |= (sys_errno != tc->err) || !cmp_ok;
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
 
 EXIT:
-        if (fd >= 0) {
-                TEST(close(fd));
-                TEST(mq_unlink(QUEUE_NAME));
-        }
-        if (pid > 0) {
-                int st;
-                kill(pid, SIGTERM);
-                wait(&st);
-        }
-        return result;
+	if (fd >= 0) {
+		TEST(close(fd));
+		TEST(mq_unlink(QUEUE_NAME));
+	}
+	if (pid > 0) {
+		int st;
+		kill(pid, SIGTERM);
+		wait(&st);
+	}
+	return result;
 }
 
 
 
 /*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]\n", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.\n",SYSCALL_NAME);
-        tst_resm(TINFO,"options:\n");
-        tst_resm(TINFO,"    -d --debug           Show debug messages\n");
-        tst_resm(TINFO,"    -h --help            Show this message\n");
-        tst_resm(TINFO,"NG\n");
-        exit(1);
-}
-
-
-/*
  * main()
  */
 
-
-
 int main(int ac, char **av) {
 	int result = RESULT_OK;
-        int c;
-        int i;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
+	int c;
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
 
-	struct option long_options[] = {
-                { "debug", no_argument, 0, 'd' },
-                { "help",  no_argument, 0, 'h' },
-                { NULL, 0, NULL, 0 }
-        };
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	progname = strchr(av[0], '/');
-        progname = progname ? progname + 1 : av[0];	
-	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	setup();
 
-        setup();
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-        /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-			 TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
-			 while (TEST_RETURN != -1) {
-		                switch (c) {
-                		case 'd':
-		                        opt_debug = 1;
-                		        break;
-		                default:
-                		        usage(progname);
-                        		// NOTREACHED
-                		}
-		        }
+			/*
+			 * Execute test
+			 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO, "(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO, "(case%02d) END => %s", i,
+					(ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
+			/*	
+			 * Check results
+		 	 */
+			switch(result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "mq_timedsend call succeeded");
+				break;
 
+			default:
+				tst_brkm(TFAIL|TTERRNO, cleanup,
+					"mq_timedsend failed");
+			}
 
-		if (ac != optind) {
-        	        tst_resm(TINFO,"Options are not match.");
-                	usage(progname);
-                	// NOTREACHED
-	        }
-		/*
-        	 * Execute test
-        	 */
-
-	        for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
-        	        int ret;
-	                tst_resm(TINFO,"(case%02d) START", i);
-	                ret = do_test(&tcase[i]);
-	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
-	                result |= ret;
-        	}
-		/*	
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "mq_timedsend call succeeded");
-		                break;
-
-	        default:
-                 	   	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-        		        RPRINTF("NG\n");
-				cleanup();
-				tst_exit();
-        	}
-
-                }
-        }	
-        cleanup();
+		}
+	}	
+	cleanup();
 	tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c b/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
index 3ba704a..4f3d861 100644
--- a/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
+++ b/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
@@ -1,49 +1,49 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd                */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/* Copyright (c) Crackerjack Project., 2007-2008 ,Hitachi, Ltd		*/
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
 /*		       Yumiko Sugita <yumiko.sugita.yf@hitachi.com>, 	      */
 /*		       Satoshi Fujiwara <sa-fuji@sdl.hitachi.co.jp>	      */
-/*                                                                  	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        mq_ulink01.c                                                  */
-/*                                                                            */
-/* Description: This tests the mq_ulink() syscall                             */
+/*									    */
+/* File:	mq_ulink01.c						  */
+/*									    */
+/* Description: This tests the mq_ulink() syscall			     */
 /*									      */
 /* 									      */
 /*									      */
 /*									      */
 /*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* mq_ulink01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                            */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   mq_ulink01                                             */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* mq_ulink01 [-c n] [-e][-i n] [-I x] [-p x] [-t]			    */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   mq_ulink01					     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 
 #include <sys/syscall.h>
@@ -69,65 +69,62 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "mq_ulink01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        tst_require_root(tst_exit);
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	tst_require_root(tst_exit);
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -136,15 +133,8 @@
  */
 #define SYSCALL_NAME    "mq_ulink"
 
-
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
-		NORMAL,
+	NORMAL,
 };
 
 
@@ -153,10 +143,10 @@
  */
 struct test_case {
 	char *user;
-        char *qname;
-        int ttype;
-        int ret;
-        int err;
+	char *qname;
+	int ttype;
+	int ret;
+	int err;
 };
 
 
@@ -164,53 +154,53 @@
 *
 *   test status of errors on man page
 *
-*   EACCES             v (permission is denied)
+*   EACCES	     v (permission is denied)
 *   ENAMETOOLONG       v (too long name length)
-*   ENOENT             v (named message queue does not exist)
+*   ENOENT	     v (named message queue does not exist)
 */
 
 static struct test_case tcase[] = {
 	{ // case00
-                .ttype          = NORMAL,
-                .qname          = QUEUE_NAME,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .ttype          = NORMAL,
-                .user           = "nobody",
-                .qname          = QUEUE_NAME,
-                .ret            = -1,
-                .err            = EACCES,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                                //  0         1         2         3
-                                //  0123456789012345678901234567890123456789
-                .qname          = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaa",
-                .ret            = -1,
-                .err            = ENOENT,
-        },
+		.ttype	  = NORMAL,
+		.qname	  = QUEUE_NAME,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.ttype	  = NORMAL,
+		.user	   = "nobody",
+		.qname	  = QUEUE_NAME,
+		.ret	    = -1,
+		.err	    = EACCES,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+				//  0	 1	 2	 3
+				//  0123456789012345678901234567890123456789
+		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaa",
+		.ret	    = -1,
+		.err	    = ENOENT,
+	},
 	{ // case03
-                .ttype          = NORMAL,
-                                //  0         1         2         3
-                                //  0123456789012345678901234567890123456789
-                .qname          = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-                                   "aaaaaaaaaaaaaaaa",
-                .ret            = -1,
-                .err            = ENAMETOOLONG,
-        },
+		.ttype	  = NORMAL,
+				//  0	 1	 2	 3
+				//  0123456789012345678901234567890123456789
+		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
+				   "aaaaaaaaaaaaaaaa",
+		.ret	    = -1,
+		.err	    = ENAMETOOLONG,
+	},
 };
 
 /*
@@ -223,85 +213,64 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
 	int rc, fd1 = -1, fd2 = -1;
-        uid_t old_uid = -1;
+	uid_t old_uid = -1;
 
-        /*
-         * When test ended with SIGTERM etc, mq discriptor is left remains.
-         * So we delete it first.
-         */
-        TEST(mq_unlink(QUEUE_NAME));
+	/*
+	 * When test ended with SIGTERM etc, mq discriptor is left remains.
+	 * So we delete it first.
+	 */
+	TEST(mq_unlink(QUEUE_NAME));
 
-        /*
-         * Open message queue
-         */
-        TEST(rc = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
-	if (TEST_RETURN < 0) {
-                tst_resm(TFAIL, "mq_open failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
-                result = 1;
-                goto EXIT;
-        }
-        fd1 = rc;
+	/*
+	 * Open message queue
+	 */
+	rc = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL);
+	if (rc == -1) {
+		tst_resm(TFAIL|TTERRNO, "mq_open failed");
+		result = 1;
+		goto EXIT;
+	}
+	fd1 = rc;
 
-        /*
-         * Change effective user id
-         */
-        if (tc->user != NULL) {
-                TEST(rc = setup_euid(tc->user, &old_uid));
-                if (TEST_RETURN < 0) {
-                        result = 1;
-                        goto EXIT;
-                }
-        }
+	/*
+	 * Change effective user id
+	 */
+	if (tc->user != NULL) {
+		TEST(rc = setup_euid(tc->user, &old_uid));
+		if (TEST_RETURN < 0) {
+			result = 1;
+			goto EXIT;
+		}
+	}
 
-/*
-         * Execute system call
-         */
-        //tst_resm(TINFO,"PATH_MAX: %d\n", PATH_MAX);
-        //tst_resm(TINFO,"NAME_MAX: %d\n", NAME_MAX);
-        errno = 0;
-        TEST(sys_ret = mq_unlink(tc->qname));
-        sys_errno = errno;
-        if (sys_ret >= 0)
-                fd2 = sys_ret;
+	/*
+	 * Execute system call
+	 */
+	errno = 0;
+	TEST(sys_ret = mq_unlink(tc->qname));
+	sys_errno = errno;
+	if (sys_ret >= 0)
+		fd2 = sys_ret;
 
-        /*
-         * Check results
-         */
-        result |= (sys_errno != tc->err);
-        PRINT_RESULT(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno);
+	/*
+	 * Check results
+	 */
+	result |= (sys_errno != tc->err);
+	PRINT_RESULT(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno);
 
 EXIT:
-        if (tc->user != NULL && old_uid != -1)
-                cleanup_euid(old_uid);
+	if (tc->user != NULL && old_uid != -1)
+		cleanup_euid(old_uid);
 
-        if (fd1 >= 0)
-                close(fd1);
-        if (fd2 >= 0)
-                close(fd2);
-        if (fd1 >= 0)
-                mq_unlink(QUEUE_NAME);
-
-        return result;
-}
-
-
-/*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG\n");
-        exit(1);
+	if (fd1 >= 0)
+		close(fd1);
+	if (fd2 >= 0)
+		close(fd2);
+	mq_unlink(QUEUE_NAME);
 }
 
 
@@ -310,84 +279,38 @@
  */
 
 
-
 int main(int ac, char **av) {
 	int result = RESULT_OK;
-        int c;
-        int i;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
+	int i;
+	int lc;
+	char *msg;
 
-	struct option long_options[] = {
-                { "debug", no_argument, 0, 'd' },
-                { "help",  no_argument, 0, 'h' },
-                { NULL, 0, NULL, 0 }
-        };
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	progname = strchr(av[0], '/');
-        progname = progname ? progname + 1 : av[0];	
-	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	setup();
 
-        setup();
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-        /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-			 TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
-			 while (TEST_RETURN != -1) {
-		                switch (c) {
-                		case 'd':
-		                        opt_debug = 1;
-                		        break;
-		                default:
-                		        usage(progname);
-                        		// NOTREACHED
-                		}
-		        }
+			int ret;
 
+			ret = 0;
 
-		if (ac != optind) {
-        	        tst_resm(TINFO,"Options are not match.");
-                	usage(progname);
-                	// NOTREACHED
-	        }
+			/*
+			 * Execute test
+			 */
+			for (i = 0; ret == 0 &&
+				    i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				ret = do_test(&tcase[i]);
+			}
 
-		/*
-		* Execute test
-         	*/
-	        for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
-        	        int ret;
-	                tst_resm(TINFO,"(case%02d) START", i);
-	                ret = do_test(&tcase[i]);
-	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
-	                result |= ret;
-        	}
-		
-		/*
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "mq_ulink call succeeded");
-		                break;
-
-	        default:
-                 	   	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-        		        RPRINTF("NG\n");
-				cleanup();
-				tst_exit();
-		                break;
-        	}
-
-                }
-        }	
-        cleanup();
+		}
+	}	
+	cleanup();
 	tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
index 8bc9e02..77ae73f 100644
--- a/testcases/kernel/syscalls/mremap/mremap01.c
+++ b/testcases/kernel/syscalls/mremap/mremap01.c
@@ -104,9 +104,15 @@
 	int ind;		/* counter variable */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Check looping state if -i option given */
@@ -172,7 +178,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -198,7 +204,7 @@
 
 	/* Get the system page size */
 	if ((pagesz = getpagesize()) < 0) {
-		tst_brkm(TFAIL, tst_exit,
+		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
 	}
 
diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
index 35aa609..7021118 100644
--- a/testcases/kernel/syscalls/mremap/mremap02.c
+++ b/testcases/kernel/syscalls/mremap/mremap02.c
@@ -99,9 +99,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -154,7 +160,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -175,7 +181,7 @@
 
 	/* Get the system page size */
 	if ((memsize = getpagesize()) < 0) {
-		tst_brkm(TFAIL, tst_exit,
+		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
 	}
 
diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
index bde99f8..ec03571 100644
--- a/testcases/kernel/syscalls/mremap/mremap03.c
+++ b/testcases/kernel/syscalls/mremap/mremap03.c
@@ -101,9 +101,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -157,7 +163,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -179,7 +185,7 @@
 
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
-		tst_brkm(TFAIL, tst_exit,
+		tst_brkm(TFAIL, NULL,
 			 "getpagesize() fails to get system page size");
 	}
 
diff --git a/testcases/kernel/syscalls/mremap/mremap04.c b/testcases/kernel/syscalls/mremap/mremap04.c
index c6b4a91..deb1d6a 100644
--- a/testcases/kernel/syscalls/mremap/mremap04.c
+++ b/testcases/kernel/syscalls/mremap/mremap04.c
@@ -111,9 +111,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -168,7 +174,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -198,7 +204,7 @@
 
 	/* Get the system page size */
 	if ((memsize = getpagesize()) < 0) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			 "getpagesize() failed to get system page size");
 	}
 
@@ -214,7 +220,7 @@
 	 */
 	shmid = shmget(shmkey, newsize, IPC_CREAT | SHM_MODE);
 	if (shmid == -1) {
-		tst_brkm(TBROK, tst_exit, "shmget() Failed to create a shared "
+		tst_brkm(TBROK, NULL, "shmget() Failed to create a shared "
 			 "memory, error:%d", errno);
 	}
 
diff --git a/testcases/kernel/syscalls/msync/msync01.c b/testcases/kernel/syscalls/msync/msync01.c
index 1a121aa..19045b4 100644
--- a/testcases/kernel/syscalls/msync/msync01.c
+++ b/testcases/kernel/syscalls/msync/msync01.c
@@ -96,9 +96,15 @@
 	int nread = 0, count, err_flg = 0;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Check looping state if -i option given */
@@ -183,7 +189,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/msync/msync02.c b/testcases/kernel/syscalls/msync/msync02.c
index 1a2e083..2cd13d9 100644
--- a/testcases/kernel/syscalls/msync/msync02.c
+++ b/testcases/kernel/syscalls/msync/msync02.c
@@ -93,9 +93,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Check looping state if -i option given */
@@ -151,7 +157,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/msync/msync03.c b/testcases/kernel/syscalls/msync/msync03.c
index 4aea7b3..ca1afc5 100644
--- a/testcases/kernel/syscalls/msync/msync03.c
+++ b/testcases/kernel/syscalls/msync/msync03.c
@@ -88,9 +88,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -135,7 +141,7 @@
 	/* Call cleanup() to exit the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/msync/msync04.c b/testcases/kernel/syscalls/msync/msync04.c
index a8e5e5c..9061f8e 100644
--- a/testcases/kernel/syscalls/msync/msync04.c
+++ b/testcases/kernel/syscalls/msync/msync04.c
@@ -94,9 +94,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	TEST_EXP_ENOS(exp_enos);
@@ -146,7 +152,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/msync/msync05.c b/testcases/kernel/syscalls/msync/msync05.c
index 9f0067c..1e0a257 100644
--- a/testcases/kernel/syscalls/msync/msync05.c
+++ b/testcases/kernel/syscalls/msync/msync05.c
@@ -88,9 +88,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -135,7 +141,7 @@
 	/* Call test cleanup to exit the test */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/munlock/munlock01.c b/testcases/kernel/syscalls/munlock/munlock01.c
index d5524fb..3874d47 100644
--- a/testcases/kernel/syscalls/munlock/munlock01.c
+++ b/testcases/kernel/syscalls/munlock/munlock01.c
@@ -162,7 +162,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* set the expected errnos... */
diff --git a/testcases/kernel/syscalls/munlockall/munlockall01.c b/testcases/kernel/syscalls/munlockall/munlockall01.c
index d51fae0..3b6cd94 100644
--- a/testcases/kernel/syscalls/munlockall/munlockall01.c
+++ b/testcases/kernel/syscalls/munlockall/munlockall01.c
@@ -137,7 +137,7 @@
 	TEST_EXP_ENOS(exp_enos);
 
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be tested as root");
+		tst_brkm(TBROK, NULL, "Test must be tested as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/munlockall/munlockall02.c b/testcases/kernel/syscalls/munlockall/munlockall02.c
index b48bc22..0c4901f 100644
--- a/testcases/kernel/syscalls/munlockall/munlockall02.c
+++ b/testcases/kernel/syscalls/munlockall/munlockall02.c
@@ -137,15 +137,15 @@
 
 	/* switch to nobody user */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "\"nobody\"user not present");
+		tst_brkm(TBROK, NULL, "\"nobody\"user not present");
 	}
 
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_brkm(TBROK, tst_exit, "seteuid failed to "
+		tst_brkm(TBROK, NULL, "seteuid failed to "
 			 "to set the effective uid to %d", ltpuser->pw_uid);
 	}
 
diff --git a/testcases/kernel/syscalls/munmap/munmap01.c b/testcases/kernel/syscalls/munmap/munmap01.c
index dc574c6..58837f9 100644
--- a/testcases/kernel/syscalls/munmap/munmap01.c
+++ b/testcases/kernel/syscalls/munmap/munmap01.c
@@ -97,9 +97,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Check looping state if -i option given */
@@ -158,7 +164,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/munmap/munmap02.c b/testcases/kernel/syscalls/munmap/munmap02.c
index 1870584..9165d55 100644
--- a/testcases/kernel/syscalls/munmap/munmap02.c
+++ b/testcases/kernel/syscalls/munmap/munmap02.c
@@ -101,9 +101,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Check looping state if -i option given */
@@ -156,7 +162,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/munmap/munmap03.c b/testcases/kernel/syscalls/munmap/munmap03.c
index 994ca4d..912a5d3 100644
--- a/testcases/kernel/syscalls/munmap/munmap03.c
+++ b/testcases/kernel/syscalls/munmap/munmap03.c
@@ -98,9 +98,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* set the expected errnos... */
@@ -148,7 +154,7 @@
 	/* exit with return code appropriate for results */
 	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep01.c b/testcases/kernel/syscalls/nanosleep/nanosleep01.c
index 18182a2..078d44e 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep01.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep01.c
@@ -93,7 +93,11 @@
 	int retval = 0, e_code, status;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep02.c b/testcases/kernel/syscalls/nanosleep/nanosleep02.c
index 123fa4f..3aa651a 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep02.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep02.c
@@ -113,9 +113,15 @@
 	int status;		/* child exit status */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "dddd", &timereq.tv_sec, &timereq.tv_nsec,
@@ -175,7 +181,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep03.c b/testcases/kernel/syscalls/nanosleep/nanosleep03.c
index 75a61fd..c880767 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep03.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep03.c
@@ -92,9 +92,15 @@
 	int status;		/* child exit status */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "dddd", &timereq.tv_sec, &timereq.tv_nsec,
@@ -155,7 +161,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep04.c b/testcases/kernel/syscalls/nanosleep/nanosleep04.c
index 8b376f1..93f4474 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep04.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep04.c
@@ -89,9 +89,15 @@
 	int status;		/* child exit status */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -160,7 +166,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
diff --git a/testcases/kernel/syscalls/newuname/newuname01.c b/testcases/kernel/syscalls/newuname/newuname01.c
index 78317df..9f1b51e 100644
--- a/testcases/kernel/syscalls/newuname/newuname01.c
+++ b/testcases/kernel/syscalls/newuname/newuname01.c
@@ -117,7 +117,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/nftw/nftw.c b/testcases/kernel/syscalls/nftw/nftw.c
index 801f5a3..5718cb1 100644
--- a/testcases/kernel/syscalls/nftw/nftw.c
+++ b/testcases/kernel/syscalls/nftw/nftw.c
@@ -663,7 +663,7 @@
 	cleanup_function();
 
 	anyfail();		/* THIS CALL DOES NOT RETURN - EXITS!!  */
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 /*--------------------------------------------------------------*/
 }
 
diff --git a/testcases/kernel/syscalls/nftw/nftw64.c b/testcases/kernel/syscalls/nftw/nftw64.c
index 4941065..a5cf382 100644
--- a/testcases/kernel/syscalls/nftw/nftw64.c
+++ b/testcases/kernel/syscalls/nftw/nftw64.c
@@ -689,7 +689,7 @@
 
 	anyfail();		/* THIS CALL DOES NOT RETURN - EXITS!!  */
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*--------------------------------------------------------------*/
diff --git a/testcases/kernel/syscalls/nftw/test.c b/testcases/kernel/syscalls/nftw/test.c
index f443c4a..59e6336 100644
--- a/testcases/kernel/syscalls/nftw/test.c
+++ b/testcases/kernel/syscalls/nftw/test.c
@@ -82,7 +82,7 @@
 		for (j = 0; j < ngoods; j++) {
 			if (strcmp(dirlist[i], goodlist[j]) == 0) {
 				free(dirlist[i]);
-				dirlist[i] = (char *)NULL;
+				dirlist[i] = NULL;
 				break;
 			}
 		}
diff --git a/testcases/kernel/syscalls/nftw/test64.c b/testcases/kernel/syscalls/nftw/test64.c
index 0affb2e..0ab8cb4 100644
--- a/testcases/kernel/syscalls/nftw/test64.c
+++ b/testcases/kernel/syscalls/nftw/test64.c
@@ -80,7 +80,7 @@
 		for (j = 0; j < ngoods; j++) {
 			if (strcmp(dirlist[i], goodlist[j]) == 0) {
 				free(dirlist[i]);
-				dirlist[i] = (char *)NULL;
+				dirlist[i] = NULL;
 				break;
 			}
 		}
diff --git a/testcases/kernel/syscalls/nice/nice01.c b/testcases/kernel/syscalls/nice/nice01.c
index 6aa94da..c78f0b3 100644
--- a/testcases/kernel/syscalls/nice/nice01.c
+++ b/testcases/kernel/syscalls/nice/nice01.c
@@ -95,9 +95,15 @@
 	int rval;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -164,7 +170,7 @@
 
 	/* Make sure the calling process is super-user only */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be ROOT to run this test.");
+		tst_brkm(TBROK, NULL, "Must be ROOT to run this test.");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/nice/nice02.c b/testcases/kernel/syscalls/nice/nice02.c
index 0d00cdd..844f7e4 100644
--- a/testcases/kernel/syscalls/nice/nice02.c
+++ b/testcases/kernel/syscalls/nice/nice02.c
@@ -89,9 +89,15 @@
 	int max_val;		/* Maximum nice value per OS. */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
diff --git a/testcases/kernel/syscalls/nice/nice03.c b/testcases/kernel/syscalls/nice/nice03.c
index bc67a1a..0fcd07b 100644
--- a/testcases/kernel/syscalls/nice/nice03.c
+++ b/testcases/kernel/syscalls/nice/nice03.c
@@ -92,9 +92,15 @@
 	int New_nice;		/* priority of process after nice() */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
diff --git a/testcases/kernel/syscalls/nice/nice04.c b/testcases/kernel/syscalls/nice/nice04.c
index 300eaef..899bcf1 100644
--- a/testcases/kernel/syscalls/nice/nice04.c
+++ b/testcases/kernel/syscalls/nice/nice04.c
@@ -100,9 +100,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -156,7 +162,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/open/open01.c b/testcases/kernel/syscalls/open/open01.c
index d160037..fb88616 100644
--- a/testcases/kernel/syscalls/open/open01.c
+++ b/testcases/kernel/syscalls/open/open01.c
@@ -78,8 +78,12 @@
 	 * parse standard command line options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup for test */
 
@@ -149,7 +153,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/open/open02.c b/testcases/kernel/syscalls/open/open02.c
index a75dbbc..7ca5b59 100644
--- a/testcases/kernel/syscalls/open/open02.c
+++ b/testcases/kernel/syscalls/open/open02.c
@@ -70,8 +70,12 @@
 	 * parse standard command line options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup for test */
 
@@ -101,7 +105,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/open/open03.c b/testcases/kernel/syscalls/open/open03.c
index 91f33f1..b9a290b 100644
--- a/testcases/kernel/syscalls/open/open03.c
+++ b/testcases/kernel/syscalls/open/open03.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/open/open04.c b/testcases/kernel/syscalls/open/open04.c
index 4f634ae..ec3b02a 100644
--- a/testcases/kernel/syscalls/open/open04.c
+++ b/testcases/kernel/syscalls/open/open04.c
@@ -75,7 +75,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -106,7 +110,7 @@
 	close(fd);
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -137,7 +141,7 @@
 
 	/* Allocate memory for stat and ustat structure variables */
 	if ((buf = (int *)malloc(sizeof(int) * nfile - first)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	for (ifile = first; ifile <= nfile; ifile++) {
diff --git a/testcases/kernel/syscalls/open/open05.c b/testcases/kernel/syscalls/open/open05.c
index f89bb4e..05a8948 100644
--- a/testcases/kernel/syscalls/open/open05.c
+++ b/testcases/kernel/syscalls/open/open05.c
@@ -75,7 +75,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -90,7 +94,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* child */
 			if (seteuid(nobody->pw_uid) == -1) {
@@ -137,7 +141,7 @@
 		}
 	}
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -147,7 +151,7 @@
 {
 	/* test must be run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run test as root");
+		tst_brkm(TBROK, NULL, "Must run test as root");
 	}
 
 	/* capture signals */
@@ -165,7 +169,7 @@
 
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
 		tst_brkm(TBROK, cleanup, "open() failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/open/open06.c b/testcases/kernel/syscalls/open/open06.c
index 71293a7..a36f8d5 100644
--- a/testcases/kernel/syscalls/open/open06.c
+++ b/testcases/kernel/syscalls/open/open06.c
@@ -70,7 +70,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -99,7 +103,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -120,7 +124,7 @@
 
 	if (mknod(fname, S_IFIFO | 0644, (dev_t) NULL) == -1) {
 		tst_brkm(TBROK, cleanup, "mknod FAILED");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/open/open07.c b/testcases/kernel/syscalls/open/open07.c
index 3c01b9a..378d02b 100644
--- a/testcases/kernel/syscalls/open/open07.c
+++ b/testcases/kernel/syscalls/open/open07.c
@@ -112,7 +112,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -167,7 +171,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 void setupfunc_test1()
@@ -178,10 +182,10 @@
 	sprintf(file2, "open03.2.%d", getpid());
 	if ((fd1 = creat(file1, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	strcpy(TC[0].filename, file2);
 }
 
@@ -193,10 +197,10 @@
 	sprintf(file2, "open03.4.%d", getpid());
 	if (mkdir(file1, 00700) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	strcpy(TC[1].filename, file2);
 }
 
@@ -209,13 +213,13 @@
 	sprintf(file3, "open03.7.%d", getpid());
 	if ((fd2 = creat(file1, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file2, file3) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	strcpy(TC[2].filename, file3);
 }
 
@@ -228,13 +232,13 @@
 	sprintf(file3, "open03.10.%d", getpid());
 	if (mkdir(file1, 00700) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (symlink(file2, file3) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	strcpy(TC[3].filename, file3);
 }
 
@@ -246,10 +250,10 @@
 	sprintf(file2, "open12.4.%d", getpid());
 	if (mkdir(file1, 00700) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) failed: errno: %d", errno);
-	/*NOTREACHED*/}
+	}
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	/*NOTREACHED*/}
+	}
 	strcpy(TC[4].filename, file2);
 	strcat(TC[4].filename, "/");
 }
diff --git a/testcases/kernel/syscalls/open/open08.c b/testcases/kernel/syscalls/open/open08.c
index 6a158de..4ebc854 100644
--- a/testcases/kernel/syscalls/open/open08.c
+++ b/testcases/kernel/syscalls/open/open08.c
@@ -102,7 +102,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -142,7 +146,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -162,14 +166,14 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setgid(ltpuser->pw_gid) == -1) {
-		tst_brkm(TBROK | TERRNO, tst_exit, "setgid(%d) failed",
+		tst_brkm(TBROK | TERRNO, NULL, "setgid(%d) failed",
 			ltpuser->pw_gid);
 	} else if (setuid(ltpuser->pw_uid) == -1) {
-		tst_brkm(TBROK | TERRNO, tst_exit, "setuid(%d) failed",
+		tst_brkm(TBROK | TERRNO, NULL, "setuid(%d) failed",
 			ltpuser->pw_uid);
 	}
 
diff --git a/testcases/kernel/syscalls/open/open09.c b/testcases/kernel/syscalls/open/open09.c
index 0931a2f..66f835a 100644
--- a/testcases/kernel/syscalls/open/open09.c
+++ b/testcases/kernel/syscalls/open/open09.c
@@ -65,7 +65,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 	tst_tmpdir();
 	local_flag = PASSED;
 	sprintf(tempfile, "open09.%d", getpid());
diff --git a/testcases/kernel/syscalls/open/open10.c b/testcases/kernel/syscalls/open/open10.c
index 0b5bafe..ef14f79 100644
--- a/testcases/kernel/syscalls/open/open10.c
+++ b/testcases/kernel/syscalls/open/open10.c
@@ -123,8 +123,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	tst_tmpdir();
 
diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
index 7a11f2f..c74716e 100644
--- a/testcases/kernel/syscalls/openat/openat01.c
+++ b/testcases/kernel/syscalls/openat/openat01.c
@@ -98,7 +98,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/pathconf/pathconf01.c b/testcases/kernel/syscalls/pathconf/pathconf01.c
index af7df99..9ce298a 100644
--- a/testcases/kernel/syscalls/pathconf/pathconf01.c
+++ b/testcases/kernel/syscalls/pathconf/pathconf01.c
@@ -161,7 +161,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, options, &help)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	if (!lflag) {
 		path = strdup("/tmp");
diff --git a/testcases/kernel/syscalls/pause/pause01.c b/testcases/kernel/syscalls/pause/pause01.c
index 53dfb4a..1693507 100644
--- a/testcases/kernel/syscalls/pause/pause01.c
+++ b/testcases/kernel/syscalls/pause/pause01.c
@@ -133,7 +133,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/pause/pause02.c b/testcases/kernel/syscalls/pause/pause02.c
index cd15a6a..b785b5a 100644
--- a/testcases/kernel/syscalls/pause/pause02.c
+++ b/testcases/kernel/syscalls/pause/pause02.c
@@ -95,9 +95,15 @@
 	int rval;		/* return value for wait() */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "");
diff --git a/testcases/kernel/syscalls/pause/pause03.c b/testcases/kernel/syscalls/pause/pause03.c
index 5b5b2c0..0e90ac8 100644
--- a/testcases/kernel/syscalls/pause/pause03.c
+++ b/testcases/kernel/syscalls/pause/pause03.c
@@ -90,9 +90,15 @@
 	int ret_val;		/* return value for wait() */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
diff --git a/testcases/kernel/syscalls/personality/personality01.c b/testcases/kernel/syscalls/personality/personality01.c
index f176607..07d568c 100644
--- a/testcases/kernel/syscalls/personality/personality01.c
+++ b/testcases/kernel/syscalls/personality/personality01.c
@@ -75,7 +75,6 @@
 	PER_IRIX32, PER_IRIXN32, PER_IRIX64
 };
 
-#ifdef __NR_personality
 int main(int ac, char **av)
 {
 	int lc;			/* loop counter */
@@ -83,9 +82,8 @@
 	int i, start_pers;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
@@ -145,15 +143,8 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
-}
-#else
-int main(int ac, char **av)
-{
-	tst_resm(TCONF, "personality() not defined in your system");
 	tst_exit();
 }
-#endif
 
 /*
  * setup() - performs all the ONE TIME setup for this test.
@@ -178,7 +169,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/personality/personality02.c b/testcases/kernel/syscalls/personality/personality02.c
index 49b6952..d26efa0 100644
--- a/testcases/kernel/syscalls/personality/personality02.c
+++ b/testcases/kernel/syscalls/personality/personality02.c
@@ -66,6 +66,7 @@
 
 #include <errno.h>
 #include <linux/personality.h>
+#include "linux_syscall_numbers.h"
 #undef personality
 
 extern int personality(unsigned long);
@@ -79,7 +80,6 @@
 
 #define	PER_BAD	0x00dd		/* A non-existent personality type */
 
-#ifdef __NR_personality
 int main(int ac, char **av)
 {
 	int lc;			/* loop counter */
@@ -87,16 +87,15 @@
 	int start_pers;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
 	start_pers = personality(PER_LINUX);
 	if (start_pers == -1) {
 		printf("personality01:  Test Failed\n");
-		exit(-1);
+		exit(1);
 	}
 
 	/* The following checks the looping state if -i option given */
@@ -126,17 +125,8 @@
 	}
 
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
-}
-#else
-int main(int ac, char **av)
-{
-	tst_resm(TCONF, "personality() not defined in your system");
 	tst_exit();
 }
-#endif
-
 
 /*
  * setup() - performs all the ONE TIME setup for this test.
@@ -161,7 +151,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe01.c b/testcases/kernel/syscalls/pipe/pipe01.c
index 233a728..54562a1 100644
--- a/testcases/kernel/syscalls/pipe/pipe01.c
+++ b/testcases/kernel/syscalls/pipe/pipe01.c
@@ -78,9 +78,8 @@
 	int greater, length;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -106,16 +105,16 @@
 				tst_brkm(TBROK, cleanup, "write() failed");
 			}
 
-			if ((written < 0) || (written > 26)) {
+			if (written < 0 || written > 26) {
 				tst_resm(TFAIL, "Condition #1 test failed");
 				continue;
 			}
 
 			if ((red = safe_read(fildes[0], rebuf, written)) == -1) {
-				tst_brkm(TBROK, cleanup, "read() failed");
+				tst_brkm(TBROK|TERRNO, cleanup, "read() failed");
 			}
 
-			if ((red < 0) || (red > written)) {
+			if (red < 0 || red > written) {
 				tst_resm(TFAIL, "Condition #2 test failed");
 				continue;
 			}
@@ -132,7 +131,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -158,7 +157,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe02.c b/testcases/kernel/syscalls/pipe/pipe02.c
index c093209..7e24efe 100644
--- a/testcases/kernel/syscalls/pipe/pipe02.c
+++ b/testcases/kernel/syscalls/pipe/pipe02.c
@@ -91,8 +91,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "dd", &pp[0], &pp[1]);
 #endif
diff --git a/testcases/kernel/syscalls/pipe/pipe03.c b/testcases/kernel/syscalls/pipe/pipe03.c
index c008795..3695bf6 100644
--- a/testcases/kernel/syscalls/pipe/pipe03.c
+++ b/testcases/kernel/syscalls/pipe/pipe03.c
@@ -76,9 +76,8 @@
 	char rbuf[BUFSIZ];
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -90,8 +89,8 @@
 		TEST(pipe(fildes));
 
 		if (TEST_RETURN == -1)
-			tst_brkm(TBROK, cleanup, "pipe() failed unexpectedly "
-				 "- errno %d", TEST_ERRNO);
+			tst_brkm(TBROK|TTERRNO, cleanup,
+			    "pipe() failed unexpectedly");
 
 		TEST(write(fildes[0], "A", 1));
 		if (TEST_RETURN == -1 && TEST_ERRNO == EBADF)
@@ -107,13 +106,13 @@
 			tst_resm(TPASS, "expected failure reading from "
 				 "write end of pipe");
 		else
-			tst_resm(TFAIL, "success when reading from "
+			tst_resm(TFAIL|TTERRNO, "success when reading from "
 				 "write end of pipe ret=%ld, "
-				 "errno=%d", TEST_RETURN, TEST_ERRNO);
+				 "errno=%d", TEST_RETURN);
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -139,7 +138,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe04.c b/testcases/kernel/syscalls/pipe/pipe04.c
index 51e99c0..01be958 100644
--- a/testcases/kernel/syscalls/pipe/pipe04.c
+++ b/testcases/kernel/syscalls/pipe/pipe04.c
@@ -88,9 +88,8 @@
 	char rbuf[BUFSIZ];
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 #ifdef UCLINUX
 	maybe_run_child(&c1func, "ndd", 1, &fildes[0], &fildes[1]);
 	maybe_run_child(&c2func, "ndd", 2, &fildes[0], &fildes[1]);
@@ -174,25 +173,24 @@
 		 * Set action for the alarm
 		 */
 		if (signal(SIGALRM, alarmfunc) == SIG_ERR)
-			tst_resm(TWARN, "call to signal failed, errno=%d",
-				 errno);
+			tst_resm(TWARN|TERRNO, "call to signal failed");
 		/*
 		 * Set an alarm for 60 seconds just in case the child
 		 * processes don't die
 		 */
 		alarm(60);
-		if ((wtchild = waitpid(c1pid, &wtstatus, 0)) != -1) {
+		if (waitpid(c1pid, &wtstatus, 0) != -1) {
 			if (wtstatus != SIGKILL)
-				tst_resm(TFAIL, "unexpected wait status %d, "
-					 "errno=%d", wtstatus, errno);
+				tst_resm(TFAIL|TERRNO, "unexpected wait status "
+				    "%d", wtstatus);
 			else
 				tst_resm(TPASS, "Child 1 killed while "
 					 "writing to a pipe");
 		}
-		if ((wtchild = waitpid(c2pid, &wtstatus, 0)) != -1) {
-			if (wtstatus != SIGKILL)
-				tst_resm(TFAIL, "unexpected wait status %d, "
-					 "errno=%d", wtstatus, errno);
+		if (waitpid(c2pid, &wtstatus, 0) != -1) {
+			if (!WIFSIGNALED(wtstatus) || WTERMSIG != SIGKILL)
+				tst_resm(TFAIL|TERRNO, "unexpected wait status "
+				    "%d", wtstatus);
 			else
 				tst_resm(TPASS, "Child 2 killed while "
 					 "writing to a pipe");
@@ -202,7 +200,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -228,9 +226,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
 
 void c1func()
@@ -239,8 +234,7 @@
 		tst_resm(TWARN, "Could not close fildes[0] - errno %d", errno);
 	while (1)
 		if (write(fildes[1], "bbbbbbbbbbbbbbbbbbbbbbbbb", 25) == -1)
-			tst_resm(TBROK, "Child 1 error writing to pipe - "
-				 "errno %d", errno);
+			tst_resm(TBROK|TERRNO, "[child 1] pipe write failed");
 }
 
 void c2func()
@@ -249,13 +243,12 @@
 		tst_resm(TWARN, "Could not close fildes[0] - errno %d", errno);
 	while (1)
 		if (write(fildes[1], "AAAAAAAAAAAAAAAAAAAAAAAAA", 25) == -1)
-			tst_resm(TBROK, "Child 2 error writing to pipe - "
-				 "errno %d", errno);
+			tst_resm(TBROK|TERRNO, "[child 2] pipe write failed");
 }
 
 void alarmfunc(int sig)
 {
 	/* for some reason tst_brkm doesn't seem to work in a signal handler */
-	tst_resm(TFAIL, "One or more children did not die within 60 seconds");
-	cleanup();
+	tst_brkm(TFAIL, cleanup, "one or more children did't die in 60 second "
+	    "time limit");
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe05.c b/testcases/kernel/syscalls/pipe/pipe05.c
index e5cb67e..cf3dcdb 100644
--- a/testcases/kernel/syscalls/pipe/pipe05.c
+++ b/testcases/kernel/syscalls/pipe/pipe05.c
@@ -68,9 +68,8 @@
 	struct sigaction sa, osa;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -114,7 +113,7 @@
 
 	}
 	cleanup();
-	return 0;
+	tst_exit();
 }
 
 /*
@@ -148,7 +147,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe06.c b/testcases/kernel/syscalls/pipe/pipe06.c
index e4d5f8f..4cc050e 100644
--- a/testcases/kernel/syscalls/pipe/pipe06.c
+++ b/testcases/kernel/syscalls/pipe/pipe06.c
@@ -64,9 +64,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -86,18 +85,14 @@
 		TEST_ERROR_LOG(TEST_ERRNO);
 
 		if (TEST_ERRNO != EMFILE) {
-			tst_resm(TFAIL, "unexpected error - %d : %s - "
-				 "expected EMFILE", TEST_ERRNO,
-				 strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TTERRNO, "pipe failed unexpectedly");
 		} else {
-			tst_resm(TPASS, "expected failure - "
-				 "errno = %d : %s", TEST_ERRNO,
-				 strerror(TEST_ERRNO));
+			tst_resm(TPASS, "failed with EMFILE");
 		}
 
 	}
 	cleanup();
-	return 0;
+	tst_exit();
 }
 
 /*
@@ -119,8 +114,8 @@
 		pipe_ret = pipe(pipes);
 		if (pipe_ret < 0) {
 			if (errno != EMFILE) {
-				tst_brkm(TBROK, cleanup, "got unexpected "
-					 "error - %d", errno);
+				tst_brkm(TBROK|TTERRNO, cleanup,
+				    "didn't get EMFILE");
 			}
 			break;
 		}
@@ -138,7 +133,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe07.c b/testcases/kernel/syscalls/pipe/pipe07.c
index 0ce821f..083e8ca 100644
--- a/testcases/kernel/syscalls/pipe/pipe07.c
+++ b/testcases/kernel/syscalls/pipe/pipe07.c
@@ -77,9 +77,8 @@
 	FILE *f;		/* used for retrieving the used fds */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 	/* Get the currently used number of file descriptors */
 	mypid = getpid();
@@ -176,7 +175,4 @@
 
 	/* Remove temporary test directory */
 	rmdir(tempdir);
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe08.c b/testcases/kernel/syscalls/pipe/pipe08.c
index 180eb33..a608a3d 100644
--- a/testcases/kernel/syscalls/pipe/pipe08.c
+++ b/testcases/kernel/syscalls/pipe/pipe08.c
@@ -73,9 +73,8 @@
 	int close_stat;		/*  exit status of close(read fd) */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	if (!STD_FUNCTIONAL_TEST) {
 		tst_resm(TWARN, "-f option should not be used");
@@ -111,7 +110,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -149,7 +148,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe09.c b/testcases/kernel/syscalls/pipe/pipe09.c
index 5726c11..e036bf0 100644
--- a/testcases/kernel/syscalls/pipe/pipe09.c
+++ b/testcases/kernel/syscalls/pipe/pipe09.c
@@ -85,9 +85,8 @@
 	int fork_1, fork_2;	/* ret values in parent */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -111,7 +110,7 @@
 
 		if ((fork_1 = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #1 failed");
-		 /*NOTREACHED*/}
+		}
 
 		if (fork_1 == 0) {	/* 1st child */
 			if (close(pipefd[0]) != 0) {
@@ -131,26 +130,25 @@
 
 		/* parent */
 
-		waitpid(fork_1, &wtstatus, 0);
-		if (WEXITSTATUS(wtstatus) != 0) {
-			tst_brkm(TBROK, cleanup, "problem detected in child, "
-				 "wait status %d, errno = %d", wtstatus, errno);
+		if (waitpid(fork_1, &wtstatus, 0) == -1)
+			tst_brkm(TBROK, cleanup, "waitpid failed");
+		if (WIFEXITED(wstatus) && WEXITSTATUS(wtstatus) != 0) {
+			tst_brkm(TBROK, cleanup, "child exited abnormally");
 		}
 
 		if ((fork_2 = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #2 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (fork_2 == 0) {	/* 2nd child */
 			if (close(pipefd[0]) != 0) {
-				tst_resm(TWARN, "pipefd[0] close "
-					 "failed, errno = %d", errno);
+				perror("pipefd[0] close failed");
 				exit(1);
 			}
 
 			for (i = 0; i < PIPEWRTCNT / 2; ++i) {
 				if (write(pipefd[1], "B", 1) != 1) {
-					tst_resm(TWARN, "write to pipe failed");
+					perror("write to pipe failed");
 					exit(1);
 				}
 			}
@@ -159,16 +157,17 @@
 
 		/* parent */
 
-		waitpid(fork_2, &wtstatus, 0);
+		if (waitpid(fork_2, &wtstatus, 0) == -1)
+			tst_brkm(TBROK, cleanup, "waitpid failed");
 		if (WEXITSTATUS(wtstatus) != 0) {
 			tst_brkm(TBROK, cleanup, "problem detected in child, "
 				 "wait status %d, errno = %d", wtstatus, errno);
 		}
 
 		if (close(pipefd[1]) != 0) {
-			tst_brkm(TBROK, cleanup, "pipefd[1] close failed, "
-				 "errno = %d", errno);
-		 /*NOTREACHED*/}
+			tst_brkm(TBROK|TERRNO, cleanup,
+			    "pipefd[1] close failed");
+		}
 
 		while ((red = safe_read(pipefd[0], rebuf, 100)) > 0) {
 			for (i = 0; i < red; i++) {
@@ -187,8 +186,8 @@
 		}
 
 		if (red == -1) {
-			tst_brkm(TBROK, cleanup, "Failure reading pipefd pipe, "
-				 "errno = %d", errno);
+			tst_brkm(TBROK|TERRNO, cleanup,
+			    "reading pipefd pipe failed");
 		}
 
 		if (Bcnt == Acnt && Bcnt == (PIPEWRTCNT / 2)) {
@@ -203,7 +202,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -229,7 +228,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe10.c b/testcases/kernel/syscalls/pipe/pipe10.c
index 7a452e7..19a554a 100644
--- a/testcases/kernel/syscalls/pipe/pipe10.c
+++ b/testcases/kernel/syscalls/pipe/pipe10.c
@@ -81,9 +81,8 @@
 	int retval = 0, status, e_code;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -119,7 +118,7 @@
 
 		if (forkstat == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (forkstat == 0) {	/* child */
 			red = safe_read(fd[0], rebuf, written);
@@ -152,7 +151,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -178,7 +177,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe11.c b/testcases/kernel/syscalls/pipe/pipe11.c
index 908a3cb..8a1ded3 100644
--- a/testcases/kernel/syscalls/pipe/pipe11.c
+++ b/testcases/kernel/syscalls/pipe/pipe11.c
@@ -97,8 +97,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "ddddd", &fd[0], &fd[1], &kidid,
 			&ncperchild, &szcharbuf);
@@ -134,7 +138,7 @@
 
 		if (fork_ret < 0) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fork_ret != 0) && (fork_ret != -1) && (kidid < numchild)) {
 			goto refork;
@@ -145,7 +149,7 @@
 			if (self_exec(av[0], "ddddd", fd[0], fd[1], kidid,
 				      ncperchild, szcharbuf) < 0) {
 				tst_brkm(TBROK, cleanup, "self_exec failed");
-			 /*NOTREACHED*/}
+			 }
 #else
 			do_child();
 #endif
@@ -167,7 +171,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -199,7 +203,7 @@
 {
 	if ((rdbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
-	 /*NOTREACHED*/}
+	 }
 
 	do_child();
 }
@@ -233,11 +237,11 @@
 
 	if ((wrbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc failed");
-	 /*NOTREACHED*/}
+	 }
 
 	if ((rdbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
-	 /*NOTREACHED*/}
+	 }
 
 	/* initialize wrbuf */
 	j = 0;
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_01.c b/testcases/kernel/syscalls/pipe2/pipe2_01.c
index 42083cf..957ec84 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_01.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_01.c
@@ -146,7 +146,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_02.c b/testcases/kernel/syscalls/pipe2/pipe2_02.c
index 42e7f2a..47a6c33 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_02.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_02.c
@@ -137,7 +137,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/poll/poll01.c b/testcases/kernel/syscalls/poll/poll01.c
index 696bccc..dd5b799 100644
--- a/testcases/kernel/syscalls/poll/poll01.c
+++ b/testcases/kernel/syscalls/poll/poll01.c
@@ -95,9 +95,15 @@
 	int rval;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -203,7 +209,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -221,7 +227,7 @@
 
 	/* Creat read/write pipe */
 	if (pipe(fildes) < 0) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			 "pipe() failed to create interprocess channel");
 	}
 
diff --git a/testcases/kernel/syscalls/ppoll/ppoll01.c b/testcases/kernel/syscalls/ppoll/ppoll01.c
index f192a4a..a48ae3b 100644
--- a/testcases/kernel/syscalls/ppoll/ppoll01.c
+++ b/testcases/kernel/syscalls/ppoll/ppoll01.c
@@ -110,9 +110,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 void sighandler(int sig); /* signals handler function for the test */
@@ -137,7 +134,7 @@
 /******************************************************************************/
 void setup() {
 	/* Capture signals if any */
-	signal(SIGINT, &sighandler);
+	tst_sig(NOFORK, sighandler, cleanup);
 
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -349,8 +346,8 @@
 	 * Execute system call
 	 */
 	errno = 0;
-	TEST(sys_ret = syscall(__NR_ppoll, p_fds, nfds, p_ts, p_sigmask, SIGSETSIZE));
-		sys_errno = errno;
+	sys_ret = syscall(__NR_ppoll, p_fds, nfds, p_ts, p_sigmask, SIGSETSIZE);
+	sys_errno = errno;
 	if (sys_ret <= 0 || tc->ret < 0)
 		goto TEST_END;
 
@@ -358,7 +355,7 @@
 	tst_resm(TINFO, "EXPECT: revents=0x%04x", tc->expect_revents);
 	tst_resm(TINFO, "RESULT: revents=0x%04x", fds[0].revents);
 
-	TEST_END:
+TEST_END:
 	/*
 	 * Check results
 	 */
@@ -378,7 +375,8 @@
 	}
 	result |= (sys_errno != tc->err) || !cmp_ok;
 	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno, cmp_ok);
-	cleanup: if (fd >= 0) {
+cleanup:
+	if (fd >= 0) {
 		close(fd);
 		cleanup_file(fpath);
 	}
@@ -399,7 +397,7 @@
 void sighandler(int sig) {
 	if (sig == SIGINT)
 		return;
-	// NOTREACHED
+	
 	return;
 }
 
@@ -408,53 +406,20 @@
  */
 
 int main(int ac, char **av) {
-	int result = RESULT_OK;
 	int i;
-	int lc; /* loop counter */
-	char *msg; /* message returned from parse_opts */
-
-	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	int ret;
 
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			/*
-			 * Execute test
-			 */
-			for (i = 0; i < (int) (sizeof(tcase) / sizeof(tcase[0])); i++) {
-				int ret;
-				tst_resm(TINFO, "(case%02d) START", i);
-				ret = do_test(&tcase[i]);
-				tst_resm(TINFO, "(case%02d) END => %s", i, (ret == 0) ? "OK"
-						: "NG");
-				TEST_ERROR_LOG(TEST_ERRNO);
-				result |= ret;
-			}
+	ret = 0;
 
-			/*
-			 * Check results
-			 */
-			switch (result) {
-			case RESULT_OK:
-				tst_resm(TPASS, "ppoll01 call succeeded ");
-				break;
-
-			default:
-				tst_resm(TFAIL | TTERRNO, "%s failed", TCID);
-				RPRINTF("NG");
-				cleanup();
-				break;
-			}
-
-		}
+	for (i = 0; ret == 0 &&
+	    i < (sizeof(tcase) / sizeof(tcase[0])); i++) {
+		tst_resm(TINFO, "(case%02d) START", i);
+		ret = do_test(&tcase[i]);
+		tst_resm(TINFO, "(case%02d) END => %s", i, (ret == 0) ? "OK"
+				: "NG");
 	}
 	cleanup();
-	return 0;
+	tst_exit();
 }
-
diff --git a/testcases/kernel/syscalls/prctl/prctl01.c b/testcases/kernel/syscalls/prctl/prctl01.c
index abce308..c4e5a44 100644
--- a/testcases/kernel/syscalls/prctl/prctl01.c
+++ b/testcases/kernel/syscalls/prctl/prctl01.c
@@ -98,9 +98,15 @@
 	int status, sig;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -159,7 +165,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/prctl/prctl02.c b/testcases/kernel/syscalls/prctl/prctl02.c
index 72fb064..7ef86a2 100644
--- a/testcases/kernel/syscalls/prctl/prctl02.c
+++ b/testcases/kernel/syscalls/prctl/prctl02.c
@@ -114,9 +114,15 @@
 	int status;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -175,7 +181,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/pread/pread01.c b/testcases/kernel/syscalls/pread/pread01.c
index edfb4f9..8c8c76a 100644
--- a/testcases/kernel/syscalls/pread/pread01.c
+++ b/testcases/kernel/syscalls/pread/pread01.c
@@ -106,9 +106,15 @@
 	int nread;		/* no. of bytes read by pread() */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -194,7 +200,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/* End main */
 
 /*
@@ -289,7 +295,7 @@
 		read_buf[count] = (char *)malloc(K1);
 
 		if ((write_buf[count] == NULL) || (read_buf[count] == NULL)) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "malloc() failed on read/write buffers");
 		}
 		memset(write_buf[count], count, K1);
diff --git a/testcases/kernel/syscalls/pread/pread02.c b/testcases/kernel/syscalls/pread/pread02.c
index 9c90899..00dd937 100644
--- a/testcases/kernel/syscalls/pread/pread02.c
+++ b/testcases/kernel/syscalls/pread/pread02.c
@@ -121,9 +121,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -184,7 +190,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -283,7 +289,7 @@
 		read_buf[count] = (char *)malloc(K1);
 
 		if ((write_buf[count] == NULL) || (read_buf[count] == NULL)) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "malloc() failed on read/write buffers");
 		}
 		memset(write_buf[count], count, K1);
diff --git a/testcases/kernel/syscalls/pread/pread03.c b/testcases/kernel/syscalls/pread/pread03.c
index d426283..9eb38de 100644
--- a/testcases/kernel/syscalls/pread/pread03.c
+++ b/testcases/kernel/syscalls/pread/pread03.c
@@ -107,9 +107,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -153,7 +159,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -189,7 +195,7 @@
 	if (mkdir(PREAD_TEMPDIR, 0777) != 0) {
 		tst_resm(TFAIL, "mkdir() failed to create" " test directory");
 		exit(1);
-		/* NOTREACHED */
+		
 	}
 
 	/* open temporary directory used for test */
@@ -214,7 +220,7 @@
 		read_buf[count] = (char *)malloc(K1);
 
 		if (read_buf[count] == NULL) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "malloc() failed on read buffers");
 		}
 	}
diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c
index dbcbc53..266f1b4 100644
--- a/testcases/kernel/syscalls/pselect/pselect01.c
+++ b/testcases/kernel/syscalls/pselect/pselect01.c
@@ -114,7 +114,7 @@
 			tst_resm(TPASS, "Sleep time was correct "
 				"(%lf/%d < 20 %%)", real_sec, total_sec);
 		else
-			tst_resm(TFAIL, "Sleep time was incorrect (%lf/%lf "
+			tst_resm(TFAIL, "Sleep time was incorrect (%d/%lf "
 				">= 20%%)", total_sec, real_sec);
 	}
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace01.c b/testcases/kernel/syscalls/ptrace/ptrace01.c
index 32c46f5..e152070 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace01.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace01.c
@@ -121,9 +121,15 @@
 	struct sigaction parent_act;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "d", &i);
@@ -220,7 +226,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace02.c b/testcases/kernel/syscalls/ptrace/ptrace02.c
index 28210a0..ad0b5cf 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace02.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace02.c
@@ -121,9 +121,15 @@
 	struct sigaction parent_act;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "d", &i);
@@ -221,7 +227,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
index 6286fb3..ccc74a4 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace03.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
@@ -124,9 +124,15 @@
 	int status;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -204,7 +210,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace04.c b/testcases/kernel/syscalls/ptrace/ptrace04.c
index 2fcba53..f0f45d0 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace04.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace04.c
@@ -103,11 +103,11 @@
 	char *msg;
 
 	if (ARRAY_SIZE(regs) == 0)
-		tst_brkm(TCONF, tst_exit,
+		tst_brkm(TCONF, NULL,
 			"test not supported for your arch (yet)");
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)))
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	make_a_baby(argc, argv);
 
diff --git a/testcases/kernel/syscalls/ptrace/ptrace06.c b/testcases/kernel/syscalls/ptrace/ptrace06.c
index 455ad4d..3eac5a0 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace06.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace06.c
@@ -174,7 +174,7 @@
 	char *msg;
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)))
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	make_a_baby(argc, argv);
 
diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
index 24f4d7f..40e9f81 100644
--- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
+++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
@@ -34,7 +34,7 @@
 	int status;
 	if (sig != SIGCHLD) {
  die:
-		tst_brkm(TBROK, tst_exit, "child signal %i: %s\n", sig, strsignal(sig));
+		tst_brkm(TBROK, NULL, "child signal %i: %s\n", sig, strsignal(sig));
 		kill(pid, SIGKILL);
 		exit(1);
 	}
diff --git a/testcases/kernel/syscalls/pwrite/pwrite01.c b/testcases/kernel/syscalls/pwrite/pwrite01.c
index a840df5..8456fb2 100644
--- a/testcases/kernel/syscalls/pwrite/pwrite01.c
+++ b/testcases/kernel/syscalls/pwrite/pwrite01.c
@@ -107,9 +107,15 @@
 	int nwrite;		/* no. of bytes written by pwrite() */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -255,7 +261,7 @@
 		write_buf[count] = (char *)malloc(K1);
 
 		if (write_buf[count] == NULL) {
-			tst_brkm(TBROK, tst_exit, "malloc() failed ");
+			tst_brkm(TBROK, NULL, "malloc() failed ");
 		}
 		memset(write_buf[count], count, K1);
 	}
diff --git a/testcases/kernel/syscalls/pwrite/pwrite02.c b/testcases/kernel/syscalls/pwrite/pwrite02.c
index 6a0b5eb..b0bdafc 100644
--- a/testcases/kernel/syscalls/pwrite/pwrite02.c
+++ b/testcases/kernel/syscalls/pwrite/pwrite02.c
@@ -122,9 +122,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -300,7 +306,7 @@
 		write_buf[count] = (char *)malloc(K1);
 
 		if (write_buf[count] == NULL) {
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "malloc() failed on write buffer");
 		}
 		memset(write_buf[count], count, K1);
diff --git a/testcases/kernel/syscalls/pwrite/pwrite03.c b/testcases/kernel/syscalls/pwrite/pwrite03.c
index 47e0047..a8d5218 100644
--- a/testcases/kernel/syscalls/pwrite/pwrite03.c
+++ b/testcases/kernel/syscalls/pwrite/pwrite03.c
@@ -101,9 +101,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
index 58bb86c..a6745d0 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl01.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
@@ -150,11 +150,11 @@
 	/* Create temporary directories */
 
 	if (geteuid() != 0) {
-		tst_brkm(TCONF, tst_exit,
+		tst_brkm(TCONF, NULL,
 			"You must be root in order to execute this test");
 	}
 	if ((quota_loc = malloc(FILENAME_MAX)) == NULL) {
-		tst_brkm(TCONF | TERRNO, tst_exit,
+		tst_brkm(TCONF | TERRNO, NULL,
 			"couldn't allocate memory for the quota loc buffer");
 	}
 
@@ -234,7 +234,7 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, (option_t*) opts, NULL)) != (char*)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
diff --git a/testcases/kernel/syscalls/read/read01.c b/testcases/kernel/syscalls/read/read01.c
index 7b459bc..8c32eca 100644
--- a/testcases/kernel/syscalls/read/read01.c
+++ b/testcases/kernel/syscalls/read/read01.c
@@ -149,7 +149,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/read/read02.c b/testcases/kernel/syscalls/read/read02.c
index 090804e..fffd1d2 100644
--- a/testcases/kernel/syscalls/read/read02.c
+++ b/testcases/kernel/syscalls/read/read02.c
@@ -112,7 +112,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -151,7 +155,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -178,7 +182,7 @@
 
 	if (write(fd3, "A", 1) != 1) {
 		tst_brkm(TBROK, cleanup, "can't write to fd3");
-	 /*NOTREACHED*/}
+	 }
 	close(fd3);
 	if ((fd3 = open(fname, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup, "open of fd3 (temp file) failed");
diff --git a/testcases/kernel/syscalls/read/read03.c b/testcases/kernel/syscalls/read/read03.c
index 6f8d5fe..b84991f 100644
--- a/testcases/kernel/syscalls/read/read03.c
+++ b/testcases/kernel/syscalls/read/read03.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -108,7 +112,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -130,13 +134,13 @@
 
 	if (mknod(fifo, S_IFIFO | 0777, 0) < 0) {
 		tst_brkm(TBROK, cleanup, "mknod() failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(fifo, &buf) != 0) {
 		tst_brkm(TBROK, cleanup, "stat() failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if ((buf.st_mode & S_IFIFO) == 0) {
 		tst_brkm(TBROK, cleanup, "Mode does not indicate fifo file");
-	 /*NOTREACHED*/}
+	 }
 
 	rfd = open(fifo, O_RDONLY | O_NONBLOCK);
 	wfd = open(fifo, O_WRONLY | O_NONBLOCK);
diff --git a/testcases/kernel/syscalls/read/read04.c b/testcases/kernel/syscalls/read/read04.c
index 308f72b..69319e0 100644
--- a/testcases/kernel/syscalls/read/read04.c
+++ b/testcases/kernel/syscalls/read/read04.c
@@ -77,8 +77,12 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();		/* global setup for test */
 
@@ -89,7 +93,7 @@
 
 		if ((rfild = open(fname, O_RDONLY)) == -1) {
 			tst_brkm(TBROK, cleanup, "can't open for reading");
-		 /*NOTREACHED*/}
+		 }
 		TEST(read(rfild, prbuf, BUFSIZ));
 
 		if (TEST_RETURN == -1) {
@@ -114,10 +118,10 @@
 		}
 		if (close(rfild) == -1) {
 			tst_brkm(TBROK, cleanup, "close() failed");
-		 /*NOTREACHED*/}
+		 }
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -141,10 +145,10 @@
 	if ((fild = creat(fname, 0777)) == -1) {
 		tst_brkm(TBROK, cleanup, "creat(%s, 0777) Failed, errno = %d"
 			 " : %s", fname, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (write(fild, palfa, TST_SIZE) != TST_SIZE) {
 		tst_brkm(TBROK, cleanup, "can't write to Xread");
-	 /*NOTREACHED*/}
+	 }
 	close(fild);
 }
 
diff --git a/testcases/kernel/syscalls/readdir/readdir02.c b/testcases/kernel/syscalls/readdir/readdir02.c
index d317642..af4eb08 100644
--- a/testcases/kernel/syscalls/readdir/readdir02.c
+++ b/testcases/kernel/syscalls/readdir/readdir02.c
@@ -98,7 +98,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
     /***************************************************************
diff --git a/testcases/kernel/syscalls/readlink/readlink01.c b/testcases/kernel/syscalls/readlink/readlink01.c
index 2ac9f3d..4ee37e4 100644
--- a/testcases/kernel/syscalls/readlink/readlink01.c
+++ b/testcases/kernel/syscalls/readlink/readlink01.c
@@ -98,18 +98,13 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	/* Perform global setup for test */
 	setup();
 
-	/* Check looping state if -i option given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
-		/* Reset Tst_count in case we are looping. */
 		Tst_count = 0;
 
 		/*
@@ -118,7 +113,6 @@
 		 */
 		TEST(readlink(SYMFILE, buffer, sizeof(buffer)));
 
-		/* Check return code of readlink(2) */
 		if (TEST_RETURN == -1) {
 			tst_resm(TFAIL,
 				 "readlink() on %s failed, errno=%d : %s",
@@ -155,13 +149,12 @@
 		} else {
 			tst_resm(TPASS, "call succeeded");
 		}
-	}			/* End for TEST_LOOPING */
+	}
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	return 0;
-}				/* End main */
+	tst_exit();
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -174,44 +167,35 @@
 {
 	int fd;			/* file handle for testfile */
 
-	/* Switch to nobody user for correct error code collection */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
-	}
+	tst_require_root(NULL);
+
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
 		tst_brkm(TBROK, cleanup, "getpwname(nobody_uid) failed ");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TINFO, "seteuid failed to "
-			 "to set the effective uid to %d", ltpuser->pw_uid);
-		perror("seteuid");
+		tst_brkm(TBROK|TERRNO, cleanup, "seteuid to nobody failed");
 	}
 
-	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
-	/* Pause if that option was specified */
 	TEST_PAUSE;
 
-	/* make a temp directory and cd to it */
 	tst_tmpdir();
 
 	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "open(%s, O_RDWR|O_CREAT, %#o) failed, errno=%d : %s",
-			 TESTFILE, FILE_MODE, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
+			 TESTFILE, FILE_MODE);
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
-			 TESTFILE, errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "close(%s) failed", TESTFILE);
 	}
 
 	/* Create a symlink of testfile under temporary directory */
 	if (symlink(TESTFILE, SYMFILE) < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "symlink(%s, %s) failed, errno=%d : %s",
-			 TESTFILE, SYMFILE, errno, strerror(errno));
+		tst_brkm(TBROK|TERRNO, cleanup, "symlink(%s, %s) failed",
+		    TESTFILE, SYMFILE);
 	}
 
 	/* Get the strlen of testfile */
@@ -232,9 +216,6 @@
 	 */
 	TEST_CLEANUP;
 
-	/* Remove tmp dir and all files in it */
 	tst_rmdir();
 
-	/* exit with return code appropriate for results */
-	tst_exit();
-}
+}
\ No newline at end of file
diff --git a/testcases/kernel/syscalls/readlink/readlink02.c b/testcases/kernel/syscalls/readlink/readlink02.c
index e140571..ddfd0ac 100644
--- a/testcases/kernel/syscalls/readlink/readlink02.c
+++ b/testcases/kernel/syscalls/readlink/readlink02.c
@@ -137,7 +137,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/readlink/readlink03.c b/testcases/kernel/syscalls/readlink/readlink03.c
index 8ef8744..ca5fbe0 100644
--- a/testcases/kernel/syscalls/readlink/readlink03.c
+++ b/testcases/kernel/syscalls/readlink/readlink03.c
@@ -150,9 +150,15 @@
 	size_t buf_size;	/* size of buffer for readlink */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -226,7 +232,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
 		tst_brkm(TBROK, cleanup, "getpwname(nobody_uid) failed ");
diff --git a/testcases/kernel/syscalls/readlink/readlink04.c b/testcases/kernel/syscalls/readlink/readlink04.c
index 18e4dd3..24af4a9 100644
--- a/testcases/kernel/syscalls/readlink/readlink04.c
+++ b/testcases/kernel/syscalls/readlink/readlink04.c
@@ -102,9 +102,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -184,7 +190,7 @@
 
 	/* Check that the test process id is super/root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
 	}
 
 	/* capture signals */
@@ -195,7 +201,7 @@
 
 	/* Get current bin directory */
 	if (getcwd(bin_dir, sizeof(bin_dir)) == NULL) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			 "getcwd(3) fails to get working directory of process");
 	}
 
@@ -204,7 +210,7 @@
 
 	/* get the name of the temporary directory */
 	if ((tmp_dir = getcwd(tmp_dir, 0)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "getcwd failed");
+		tst_brkm(TBROK, NULL, "getcwd failed");
 	}
 
 	if ((pwent = getpwnam("bin")) == NULL) {
diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
index 22c7969..d6ba697 100644
--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
@@ -111,7 +111,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/readv/readv01.c b/testcases/kernel/syscalls/readv/readv01.c
index 44a5d48..2fc7ad0 100644
--- a/testcases/kernel/syscalls/readv/readv01.c
+++ b/testcases/kernel/syscalls/readv/readv01.c
@@ -92,8 +92,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -125,7 +129,7 @@
 	close(fd);
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 int init_buffs(char *pbufs[])
@@ -191,7 +195,7 @@
 	buf_list[0] = buf1;
 	buf_list[1] = buf2;
 	buf_list[2] = buf3;
-	buf_list[3] = (char *)NULL;
+	buf_list[3] = NULL;
 
 	init_buffs(buf_list);
 
diff --git a/testcases/kernel/syscalls/readv/readv02.c b/testcases/kernel/syscalls/readv/readv02.c
index 85fd6e6..db41a7e 100644
--- a/testcases/kernel/syscalls/readv/readv02.c
+++ b/testcases/kernel/syscalls/readv/readv02.c
@@ -107,8 +107,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -182,7 +186,7 @@
 	close(fd[1]);
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -204,7 +208,7 @@
 	buf_list[0] = buf1;
 	buf_list[1] = buf2;
 	buf_list[2] = buf3;
-	buf_list[3] = (char *)NULL;
+	buf_list[3] = NULL;
 
 	init_buffs(buf_list);
 
diff --git a/testcases/kernel/syscalls/readv/readv03.c b/testcases/kernel/syscalls/readv/readv03.c
index c839ccf..9c0fc0f 100644
--- a/testcases/kernel/syscalls/readv/readv03.c
+++ b/testcases/kernel/syscalls/readv/readv03.c
@@ -84,8 +84,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -109,7 +113,7 @@
 
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/reboot/reboot01.c b/testcases/kernel/syscalls/reboot/reboot01.c
index 5be79b6..bc7532d 100644
--- a/testcases/kernel/syscalls/reboot/reboot01.c
+++ b/testcases/kernel/syscalls/reboot/reboot01.c
@@ -95,9 +95,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -127,7 +133,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
@@ -138,7 +144,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/reboot/reboot02.c b/testcases/kernel/syscalls/reboot/reboot02.c
index 89f305a..5b00656 100644
--- a/testcases/kernel/syscalls/reboot/reboot02.c
+++ b/testcases/kernel/syscalls/reboot/reboot02.c
@@ -110,9 +110,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -166,7 +172,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/*End of main */
 
 /*
@@ -198,7 +204,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/recv/recv01.c b/testcases/kernel/syscalls/recv/recv01.c
index 4014408..50d3da6 100644
--- a/testcases/kernel/syscalls/recv/recv01.c
+++ b/testcases/kernel/syscalls/recv/recv01.c
@@ -115,9 +115,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = argv[0];
@@ -156,7 +162,7 @@
 	}
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return 0;
 }				/* End main */
 
@@ -261,7 +267,7 @@
 		return pid;
 	}
 
-	 /*NOTREACHED*/ exit(1);
+	  exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/recvfrom/recvfrom01.c b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
index 521076d..31fd1ce 100644
--- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
+++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
@@ -135,9 +135,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = argv[0];
@@ -287,7 +293,7 @@
 		return pid;
 	}
 
-	 /*NOTREACHED*/ exit(1);
+	  exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg01.c b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
index 743ec79..62eddc5 100644
--- a/testcases/kernel/syscalls/recvmsg/recvmsg01.c
+++ b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
@@ -203,10 +203,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 #ifdef UCLINUX
 	argv0 = argv[0];
 	maybe_run_child(&do_child, "dd", &sfd, &ufd);
@@ -430,7 +428,7 @@
 		(void)close(ufd);
 		return pid;
 	}
-	 /*NOTREACHED*/ exit(1);
+	exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
index 848f18b..83d2a33 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
@@ -127,7 +127,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -149,7 +153,7 @@
 	/* clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /* test case function, that runs remap_file_pages */
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
index f6177f4..8701b61 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
@@ -146,9 +146,15 @@
 #endif
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -207,7 +213,7 @@
 	/* clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/rename/rename01.c b/testcases/kernel/syscalls/rename/rename01.c
index d6f76ac..2bdf7c6 100644
--- a/testcases/kernel/syscalls/rename/rename01.c
+++ b/testcases/kernel/syscalls/rename/rename01.c
@@ -112,9 +112,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -143,7 +142,7 @@
 				if (stat(TC[i].name2, &buf1) == -1) {
 					tst_brkm(TBROK, cleanup, "stat of %s "
 						 "failed", TC[i].desc);
-					/* NOTREACHED */
+					
 				}
 
 				/*
@@ -184,11 +183,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -217,7 +213,7 @@
 	if (stat(fname, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat file %s"
 			 "in setup()", fname);
-		/* NOTREACHED */
+		
 	}
 
 	f_olddev = buf1.st_dev;
@@ -226,12 +222,12 @@
 	/* create "old" directory */
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s"
 			 "in setup()", fname);
-		/* NOTREACHED */
+		
 	}
 
 	d_olddev = buf1.st_dev;
@@ -254,9 +250,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename02.c b/testcases/kernel/syscalls/rename/rename02.c
index e69fd8b..b3884f3 100644
--- a/testcases/kernel/syscalls/rename/rename02.c
+++ b/testcases/kernel/syscalls/rename/rename02.c
@@ -134,23 +134,14 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -168,9 +159,6 @@
 				 fname, mname, TEST_ERRNO,
 				 strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "rename(%s, %s) returned %ld",
@@ -185,12 +173,9 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
+	tst_exit();
 
-	return 0;
 }				/* End main */
 
 /***************************************************************
@@ -227,8 +212,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/rename/rename03.c b/testcases/kernel/syscalls/rename/rename03.c
index 0299b11..a274e0c 100644
--- a/testcases/kernel/syscalls/rename/rename03.c
+++ b/testcases/kernel/syscalls/rename/rename03.c
@@ -93,12 +93,8 @@
 	dev_t *olddev;
 	ino_t *oldino;
 } TC[] = {
-	/* comment goes here */
-	{
-	fname, mname, "file", &f_olddev, &f_oldino},
-	    /* comment goes here */
-	{
-	fdir, mdir, "directory", &d_olddev, &d_oldino}
+	{ fname, mname, "file", &f_olddev, &f_oldino},
+	{ fdir, mdir, "directory", &d_olddev, &d_oldino}
 };
 
 int main(int ac, char **av)
@@ -110,10 +106,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
-
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	/*
 	 * perform global setup for test
 	 */
@@ -145,7 +139,7 @@
 				if (stat(TC[i].name2, &buf2) == -1) {
 					tst_brkm(TBROK, cleanup, "stat of %s "
 						 "failed", TC[i].desc);
-					/* NOTREACHED */
+					
 				}
 
 				/*
@@ -186,16 +180,13 @@
 
 		/* remove the new directory */
 		if (rmdir(mdir) == -1) {
-			tst_brkm(TBROK, cleanup, "Could not remove "
-				 "directory %s", mdir);
-		 /*NOTREACHED*/}
+			tst_brkm(TBROK, cleanup, "Couldn't remove directory %s",
+			    mdir);
+		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -230,7 +221,7 @@
 	if (stat(fname, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat file %s"
 			 "in rename()", fname);
-		/* NOTREACHED */
+		
 	}
 
 	/* save original file's dev and ino */
@@ -243,11 +234,11 @@
 	/* create "old" directory */
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	}
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s"
 			 "in rename()", fdir);
-		/* NOTREACHED */
+		
 	}
 
 	d_olddev = buf1.st_dev;
@@ -256,7 +247,7 @@
 	/* create another directory */
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 /*NOTREACHED*/}
+	}
 }
 
 /*
@@ -275,9 +266,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename04.c b/testcases/kernel/syscalls/rename/rename04.c
index 1b44528..117e203 100644
--- a/testcases/kernel/syscalls/rename/rename04.c
+++ b/testcases/kernel/syscalls/rename/rename04.c
@@ -91,9 +91,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -139,7 +138,7 @@
 	 * cleanup and exit
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -164,12 +163,12 @@
 	/* create "old" directory */
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s"
 			 "in rename()", fdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "old"'s dev and ino */
@@ -179,7 +178,7 @@
 	/* create another directory */
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 /*NOTREACHED*/}
+	 }
 
 	/* create a file under "new" directory */
 	do_file_setup(tstfile);
@@ -187,7 +186,7 @@
 	if (stat(mdir, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", mdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "new"'s dev and ino */
@@ -211,9 +210,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename05.c b/testcases/kernel/syscalls/rename/rename05.c
index 0c38a3b..91fe146 100644
--- a/testcases/kernel/syscalls/rename/rename05.c
+++ b/testcases/kernel/syscalls/rename/rename05.c
@@ -88,9 +88,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -131,7 +130,7 @@
 	 * cleanup and exit
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -157,7 +156,7 @@
 	if (stat(fname, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat file %s"
 			 "in rename()", fname);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "old"'s dev and ino */
@@ -167,16 +166,16 @@
 	/* create another directory */
 	if (stat(mdir, &buf2) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", mdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(mdir, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", mdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "new"'s dev and ino */
diff --git a/testcases/kernel/syscalls/rename/rename06.c b/testcases/kernel/syscalls/rename/rename06.c
index 793f37c..61d9cf7 100644
--- a/testcases/kernel/syscalls/rename/rename06.c
+++ b/testcases/kernel/syscalls/rename/rename06.c
@@ -89,9 +89,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -128,11 +127,9 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+
+	tst_exit();
 
 }				/* End main */
 
@@ -156,14 +153,14 @@
 	/* create "old" directory */
 	if (stat(fdir, &buf1) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", fdir);
-	 /*NOTREACHED*/}
+	 }
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", fdir);
-		/* NOTREACHED */
+		
 	}
 	/* save "old"'s dev and ino */
 	olddev = buf1.st_dev;
@@ -172,15 +169,15 @@
 	/* create another directory */
 	if (stat(mdir, &buf2) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", mdir);
-	 /*NOTREACHED*/}
+	 }
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(mdir, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", mdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "new"'s dev and ino */
@@ -204,9 +201,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename07.c b/testcases/kernel/syscalls/rename/rename07.c
index f5f4a61..05312b5 100644
--- a/testcases/kernel/syscalls/rename/rename07.c
+++ b/testcases/kernel/syscalls/rename/rename07.c
@@ -71,9 +71,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -110,11 +109,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -138,16 +134,16 @@
 	/* create "old" directory */
 	if (stat(fdir, &buf1) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", fdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", fdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "old"'s dev and ino */
@@ -162,7 +158,7 @@
 	if (stat(mname, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat file %s in rename()",
 			 mname);
-		/* NOTREACHED */
+		
 	}
 
 	/* save "new"'s dev and ino */
@@ -186,9 +182,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename08.c b/testcases/kernel/syscalls/rename/rename08.c
index 7b25c24..53e793a 100644
--- a/testcases/kernel/syscalls/rename/rename08.c
+++ b/testcases/kernel/syscalls/rename/rename08.c
@@ -115,13 +115,9 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	/*
-	 * perform global setup for test
-	 */
 	setup();
 
 	/* set the expected errnos... */
@@ -159,11 +155,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -212,9 +205,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename09.c b/testcases/kernel/syscalls/rename/rename09.c
index 76fdd78..89de1a7 100644
--- a/testcases/kernel/syscalls/rename/rename09.c
+++ b/testcases/kernel/syscalls/rename/rename09.c
@@ -112,9 +112,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -134,7 +133,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #1 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* first child */
 			/* set to nobody */
@@ -146,14 +145,14 @@
 					 nobody->pw_uid, nobody->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			/* create the a directory with 0700 permits */
 			if (mkdir(fdir, PERMS) == -1) {
 				tst_resm(TWARN, "mkdir(%s, %#o) Failed",
 					 fdir, PERMS);
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			/* create "old" file under it */
 			do_file_setup(fname);
@@ -170,7 +169,7 @@
 
 		if ((pid1 = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #2 failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid1 == 0) {	/* second child */
 			/* set to bin */
@@ -178,14 +177,14 @@
 				tst_resm(TWARN, "seteuid() failed");
 				perror("setreuid");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			/* create "new" directory */
 			if (mkdir(mdir, PERMS) == -1) {
 				tst_resm(TWARN, "mkdir(%s, %#o) failed",
 					 mdir, PERMS);
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			/* create the new file */
 			do_file_setup(mname);
@@ -202,7 +201,7 @@
 			if (TEST_ERRNO != EACCES) {
 				tst_resm(TFAIL, "Expected EACCES got %d",
 					 TEST_ERRNO);
-			 /*NOTREACHED*/} else {
+			 } else {
 				tst_resm(TPASS, "rename() returned EACCES");
 			}
 
@@ -241,7 +240,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -252,8 +251,8 @@
 {
 	/* must run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run test as root");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must run test as root");
+	 }
 
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/syscalls/rename/rename10.c b/testcases/kernel/syscalls/rename/rename10.c
index 6bfedf2..7db9e66 100644
--- a/testcases/kernel/syscalls/rename/rename10.c
+++ b/testcases/kernel/syscalls/rename/rename10.c
@@ -106,9 +106,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -150,12 +149,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -196,9 +191,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename12.c b/testcases/kernel/syscalls/rename/rename12.c
index 1136fc5..a8e4ef9 100644
--- a/testcases/kernel/syscalls/rename/rename12.c
+++ b/testcases/kernel/syscalls/rename/rename12.c
@@ -106,9 +106,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -134,7 +133,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* child */
 			/* set to nobody */
@@ -142,7 +141,7 @@
 				tst_resm(TWARN, "setreuid failed");
 				perror("setreuid");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			/* rename "old" to "new" */
 			TEST(rename(fname, mname));
@@ -150,7 +149,7 @@
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "call succeeded unexpectedly");
 				exit(1);
-			 /*NOTREACHED*/}
+			 }
 
 			TEST_ERROR_LOG(TEST_ERRNO);
 
@@ -159,7 +158,7 @@
 					 "Expected EPERM or EACCES, got %d",
 					 TEST_ERRNO);
 				exit(1);
-			 /*NOTREACHED*/} else {
+			 } else {
 				tst_resm(TPASS,
 					 "rename returned EPERM or EACCES");
 			}
@@ -179,12 +178,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/*
-	 * cleanup and exit
-	 */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -195,8 +190,8 @@
 {
 	/* must run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run this as root");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must run this as root");
+	 }
 
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -216,17 +211,17 @@
 	/* create a directory */
 	if (mkdir(fdir, PERMS) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 /*NOTREACHED*/}
+	 }
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s", fdir);
-		/* NOTREACHED */
+		
 	}
 
 	/* set the sticky bit */
 	if (chmod(fdir, buf1.st_mode | S_ISVTX) != 0) {
 		tst_brkm(TBROK, cleanup, "failed to set the S_ISVTX bit");
-		/* NOTREACHED */
+		
 	}
 
 	/* create a file under fdir */
@@ -252,9 +247,4 @@
 	 * Remove the temporary directory.
 	 */
 	tst_rmdir();
-
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename13.c b/testcases/kernel/syscalls/rename/rename13.c
index 69a0328..c21358a 100644
--- a/testcases/kernel/syscalls/rename/rename13.c
+++ b/testcases/kernel/syscalls/rename/rename13.c
@@ -89,9 +89,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
@@ -124,14 +123,14 @@
 			if (stat(mname, &buf2) == -1) {
 				tst_brkm(TBROK, cleanup, "failed to stat file "
 					 "%s in rename()", mname);
-				/* NOTREACHED */
+				
 			}
 
 			/* check the existence of "old", and get the status */
 			if (stat(fname, &buf1) == -1) {
 				tst_brkm(TBROK, cleanup, "failed to stat file "
 					 "%s in rename()", fname);
-				/* NOTREACHED */
+				
 			}
 
 			/* verify the new file is the same as the original */
@@ -161,7 +160,7 @@
 	 * cleanup and exit
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -188,7 +187,7 @@
 	if (stat(fname, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat file %s"
 			 "in rename()", fname);
-		/* NOTREACHED */
+		
 	}
 
 	/* save the dev and inode */
@@ -199,7 +198,7 @@
 	if (link(fname, mname) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "link from %s to %s failed!", fname, mname);
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -219,8 +218,4 @@
 	 */
 	tst_rmdir();
 
-	/*
-	 * Exit with return code appropriate for results.
-	 */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rename/rename14.c b/testcases/kernel/syscalls/rename/rename14.c
index f0303b4..dec6d6a 100644
--- a/testcases/kernel/syscalls/rename/rename14.c
+++ b/testcases/kernel/syscalls/rename/rename14.c
@@ -78,10 +78,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	}
 
 	maybe_run_child(&dochild1, "n", 1);
 	maybe_run_child(&dochild2, "n", 2);
@@ -158,10 +156,7 @@
 	    : tst_resm(TFAIL, "Test Failed");
 
 	tst_rmdir();
-/*--------------------------------------------------------------*/
-	tst_exit();		/* THIS CALL DOES NOT RETURN - EXITS!!  */
-/*--------------------------------------------------------------*/
-	return 0;
+	tst_exit();
 }
 
 /* FUNCTIONS GO HERE */
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 3220fd5..f149b13 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -109,7 +109,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/rmdir/rmdir01.c b/testcases/kernel/syscalls/rmdir/rmdir01.c
index a947d0d..ef2dd98 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir01.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir01.c
@@ -86,7 +86,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -112,7 +116,7 @@
 		if (mkdir(tstdir, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir, PERMS);
-		 /*NOTREACHED*/}
+		 }
 		/* call rmdir using TEST macro */
 
 		TEST(rmdir(tstdir));
@@ -142,7 +146,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/rmdir/rmdir02.c b/testcases/kernel/syscalls/rmdir/rmdir02.c
index 1c55180..1d01ee2 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir02.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir02.c
@@ -146,7 +146,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/*
@@ -210,7 +214,7 @@
 	 * cleanup and exit
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -230,7 +234,7 @@
 		if (mkdir(tstdir1, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir1, PERMS);
-		 /*NOTREACHED*/}
+		 }
 
 		/* create a file under tstdir1 */
 		do_file_setup(tstfile);
@@ -251,7 +255,7 @@
 		/* create a file */
 		if ((fd = creat(tstfile, PERMS)) == -1) {
 			tst_brkm(TBROK, cleanup, "creat() failed");
-		 /*NOTREACHED*/}
+		 }
 		close(fd);
 		break;
 	default:
diff --git a/testcases/kernel/syscalls/rmdir/rmdir03.c b/testcases/kernel/syscalls/rmdir/rmdir03.c
index 8d59ad6..1632b78 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir03.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir03.c
@@ -107,7 +107,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	maybe_run_child(&dochild1, "ns", 1, tstdir2);
@@ -140,24 +144,24 @@
 		if (stat(tstdir1, &buf1) != -1) {
 			tst_brkm(TBROK, cleanup,
 				 "tmp directory %s found!", tstdir1);
-		 /*NOTREACHED*/}
+		 }
 		/* create a directory */
 		if (mkdir(tstdir1, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup,
 				 "Couldnot create directory %s", tstdir1);
-		 /*NOTREACHED*/}
+		 }
 		if (stat(tstdir1, &buf1) == -1) {
 			perror("stat");
 			tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 				 "in rmdir()", tstdir1);
-			/* NOTREACHED */
+			
 		}
 		/* set the sticky bit */
 		if (chmod(tstdir1, buf1.st_mode | S_ISVTX) != 0) {
 			perror("chmod");
 			tst_brkm(TBROK, cleanup,
 				 "failed to set the S_ISVTX bit");
-			/* NOTREACHED */
+			
 		}
 		/* create a sub directory under tstdir1 */
 		if (mkdir(tstdir2, PERMS) == -1) {
@@ -167,7 +171,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* first child */
 #ifdef UCLINUX
@@ -185,16 +189,16 @@
 		if (mkdir(tstdir3, 0700) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir3, PERMS);
-		 /*NOTREACHED*/}
+		 }
 		/* create the a directory with 0700 permits */
 		if (mkdir(tstdir4, 0777) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir4, PERMS);
-		 /*NOTREACHED*/}
+		 }
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if (pid == 0) {	/* child */
 #ifdef UCLINUX
@@ -236,7 +240,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -253,7 +257,7 @@
 		retval = 1;
 		tst_brkm(TBROK, cleanup, "setreuid failed to "
 			 "set effective uid to %d", nobody->pw_uid);
-	 /*NOTREACHED*/}
+	 }
 
 	/* rmdir tstdir2 */
 	TEST(rmdir(tstdir2));
@@ -293,7 +297,7 @@
 		retval = 1;
 		tst_brkm(TBROK, cleanup, "setreuid failed to "
 			 "set effective uid to %d", nobody->pw_uid);
-	 /*NOTREACHED*/}
+	 }
 
 	/* rmdir tstdir4 */
 	TEST(rmdir(tstdir4));
@@ -326,7 +330,7 @@
 {
 	/* test must be run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "test must be run as root");
+		tst_brkm(TBROK, NULL, "test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/rmdir/rmdir04.c b/testcases/kernel/syscalls/rmdir/rmdir04.c
index f5f0682..a65ba22 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir04.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir04.c
@@ -140,7 +140,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
index 5d7323a..0cb8e12 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
@@ -155,7 +155,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
index 1842800..25feb25 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
@@ -151,7 +151,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
index f7b21c8..b243e79 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
@@ -165,7 +165,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
index 26acd3e..cffa307 100644
--- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
@@ -152,7 +152,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-	     tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -239,7 +243,7 @@
 	}	
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 1;
 
 }
diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
index 2db92ec..36d239d 100644
--- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
@@ -156,7 +156,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
index 9759f8b..dd8c672 100644
--- a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
+++ b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
@@ -120,8 +120,8 @@
 	char *msg; /* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* Check looping state if -i option given */
diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
index 4bd4a4c..11780f7 100644
--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
+++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
@@ -122,7 +122,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-	     tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -186,7 +190,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 1;
 }
 
diff --git a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
index 67eb7d0..7d0b43e 100644
--- a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
+++ b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
@@ -94,9 +94,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -128,7 +134,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
index c946794..46f3d6e 100644
--- a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
+++ b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
@@ -86,9 +86,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -117,7 +123,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
index 383c274..1aea113 100644
--- a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
+++ b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
@@ -94,9 +94,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -128,7 +134,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
index 81bf8ad..4da3dc1 100644
--- a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
+++ b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
@@ -86,9 +86,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -117,7 +123,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
index 025cd2b..795d5d7 100644
--- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
@@ -134,7 +134,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -240,7 +244,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return (1);
 
 }
diff --git a/testcases/kernel/syscalls/sched_getparam/sched_getparam01.c b/testcases/kernel/syscalls/sched_getparam/sched_getparam01.c
index 08f4591..d223151 100644
--- a/testcases/kernel/syscalls/sched_getparam/sched_getparam01.c
+++ b/testcases/kernel/syscalls/sched_getparam/sched_getparam01.c
@@ -83,10 +83,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -123,10 +121,8 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-	/* cleanup and exit */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -154,7 +150,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/sched_getparam/sched_getparam02.c b/testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
index feeb51a..5a87c70 100644
--- a/testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
+++ b/testcases/kernel/syscalls/sched_getparam/sched_getparam02.c
@@ -95,10 +95,8 @@
 	pid_t child_pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -160,11 +158,9 @@
 
 	}			/* End for TEST_LOOPING */
 
-	/* cleanup and exit */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
-
+	tst_exit();
+	
 }				/* End main */
 
 /* setup() - performs all ONE TIME setup for this test */
@@ -190,7 +186,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/sched_getparam/sched_getparam03.c b/testcases/kernel/syscalls/sched_getparam/sched_getparam03.c
index 6756ef1..6728da9 100644
--- a/testcases/kernel/syscalls/sched_getparam/sched_getparam03.c
+++ b/testcases/kernel/syscalls/sched_getparam/sched_getparam03.c
@@ -109,10 +109,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
@@ -146,8 +144,8 @@
 	}
 
 	cleanup();
+	tst_exit();
 
-	 /*NOTREACHED*/ return 0;
 }
 
 /*
@@ -179,7 +177,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
index 800a4da..6eac20f 100644
--- a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
+++ b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
@@ -83,8 +83,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -128,7 +132,7 @@
 	cleanup();
 
 	return -1;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -137,7 +141,7 @@
 {
 	/* Must run test as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run test as root");
+		tst_brkm(TBROK, NULL, "Must run test as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
index a033e28..4379a28 100644
--- a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
+++ b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
@@ -64,8 +64,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -94,7 +98,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
index 087b87c..159fb59 100644
--- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
+++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
@@ -85,9 +85,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -118,7 +124,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval02.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval02.c
index db7aa19..3b77540 100644
--- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval02.c
+++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval02.c
@@ -86,9 +86,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -123,7 +129,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
index b931df4..33ad77a 100644
--- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
+++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
@@ -109,9 +109,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -144,7 +150,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
index e183485..fccb9e1 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
@@ -83,10 +83,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -115,7 +113,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -145,7 +143,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
index 18b6d09..d3a3efd 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
@@ -11,8 +11,6 @@
  *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
  */
 /**********************************************************
  *
@@ -102,10 +100,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -148,7 +144,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -175,9 +171,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 /*
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
index 3d4ce09..b875446 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
@@ -95,10 +95,8 @@
 	pid_t child_pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -127,7 +125,7 @@
 			TEST(sched_setparam(getppid(), &param));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TWARN|TTERRNO, "sched_setparam() returned %ld", TEST_RETURN);
+				perror("sched_setparam returned %ld", TEST_RETURN);
 				exit(0);
 			}
 			exit(1);
@@ -155,7 +153,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -189,9 +187,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
 
 /*
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam04.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam04.c
index 8a44446..4b98213 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam04.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam04.c
@@ -117,10 +117,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();		/* global setup */
 
@@ -153,7 +151,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
index 2300d98..5787805 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
@@ -99,10 +99,8 @@
 	pid_t child_pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -125,7 +123,7 @@
 
 			/* Switch to nobody user */
 			if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-				tst_brkm(TBROK, tst_exit, "\"nobody\" user"
+				tst_brkm(TBROK, NULL, "\"nobody\" user"
 					 "not present");
 			}
 			if (seteuid(ltpuser->pw_uid) == -1) {
@@ -168,7 +166,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -178,7 +176,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
@@ -204,7 +202,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
index db09840..2f27373 100644
--- a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
+++ b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
@@ -105,8 +105,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	/* check looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -144,7 +148,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
index dcdeec5..74b8c47 100644
--- a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
+++ b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
@@ -80,8 +80,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -136,7 +140,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -147,7 +151,7 @@
 {
 	/* must run test as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run test as root");
+		tst_brkm(TBROK, NULL, "Must run test as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/sched_yield/sched_yield01.c b/testcases/kernel/syscalls/sched_yield/sched_yield01.c
index c375a1a..40bbffa 100644
--- a/testcases/kernel/syscalls/sched_yield/sched_yield01.c
+++ b/testcases/kernel/syscalls/sched_yield/sched_yield01.c
@@ -62,8 +62,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -84,7 +88,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/send/send01.c b/testcases/kernel/syscalls/send/send01.c
index 37ddc55..81f9e07 100644
--- a/testcases/kernel/syscalls/send/send01.c
+++ b/testcases/kernel/syscalls/send/send01.c
@@ -154,7 +154,7 @@
 		return pid;
 	}
 
-	 /*NOTREACHED*/ exit(1);
+	  exit(1);
 }
 
 void do_child()
@@ -204,9 +204,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = av[0];
@@ -251,7 +257,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 pid_t pid;
diff --git a/testcases/kernel/syscalls/sendfile/sendfile02.c b/testcases/kernel/syscalls/sendfile/sendfile02.c
index b9c375f..8d89a11 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile02.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile02.c
@@ -109,22 +109,22 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	if ((before_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek before invoking sendfile failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	TEST(sendfile(out_fd, in_fd, &offset, sb.st_size - offset));
 
 	if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek after invoking sendfile failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	if (STD_FUNCTIONAL_TEST) {
 		/* Close the sockets */
@@ -204,11 +204,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -292,8 +292,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
@@ -313,5 +317,5 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sendfile/sendfile03.c b/testcases/kernel/syscalls/sendfile/sendfile03.c
index e1169d1..6809900 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile03.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile03.c
@@ -95,8 +95,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -135,7 +139,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -158,19 +162,19 @@
 	if ((in_fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(in_fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(in_fd);
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(out_file, "out.%d", getpid());
 	if ((out_fd = open(out_file, O_TRUNC | O_CREAT | O_RDWR, 0777)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sendfile/sendfile04.c b/testcases/kernel/syscalls/sendfile/sendfile04.c
index 43a3f63..bfb671d 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile04.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile04.c
@@ -109,21 +109,21 @@
 				prot, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
 	if (protected_buffer == MAP_FAILED) {
 		tst_brkm(TBROK, cleanup, "mmap failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	out_fd = create_server();
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	if (pass_unmapped_buffer) {
 		if (munmap(protected_buffer, sizeof(*protected_buffer)) < 0) {
 			tst_brkm(TBROK, cleanup, "munmap failed: %d", errno);
-		 /*NOTREACHED*/}
+		 }
 	}
 
 	TEST(sendfile(out_fd, in_fd, protected_buffer, sb.st_size));
@@ -191,11 +191,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -279,8 +279,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
@@ -301,5 +305,5 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sendfile/sendfile05.c b/testcases/kernel/syscalls/sendfile/sendfile05.c
index 936fd34..6cff59e 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile05.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile05.c
@@ -89,10 +89,10 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	offset = -1;
 	TEST(sendfile(out_fd, in_fd, &offset, sb.st_size));
@@ -155,11 +155,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -242,8 +242,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
@@ -261,5 +265,5 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sendfile/sendfile06.c b/testcases/kernel/syscalls/sendfile/sendfile06.c
index 99e9acc..da8cbbb 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile06.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile06.c
@@ -93,16 +93,16 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	TEST(sendfile(out_fd, in_fd, NULL, sb.st_size));
 	if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek after invoking sendfile failed: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	if (STD_FUNCTIONAL_TEST) {
 		/* Close the sockets */
@@ -177,11 +177,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -264,8 +264,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
@@ -283,5 +287,5 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sendfile/sendfile07.c b/testcases/kernel/syscalls/sendfile/sendfile07.c
index 42c45fa..8f04f99 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile07.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile07.c
@@ -81,8 +81,12 @@
 	char *msg;		/* parse_opts() return message */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -113,7 +117,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -138,20 +142,20 @@
 	if ((in_fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(in_fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 	close(in_fd);
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Make fulfilled out_fd. */
 	if (socketpair(PF_UNIX, SOCK_DGRAM, 0, p) < 0) {
 		tst_brkm(TBROK, cleanup, "socketpair failed, errno: %d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Don't close.
 	   You cannot write nothing on out_fd if ignored_fd is closed. */
diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg01.c b/testcases/kernel/syscalls/sendmsg/sendmsg01.c
index 8c4023b..134a181 100644
--- a/testcases/kernel/syscalls/sendmsg/sendmsg01.c
+++ b/testcases/kernel/syscalls/sendmsg/sendmsg01.c
@@ -230,7 +230,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -343,7 +347,7 @@
 		return pid;
 	}
 
-	 /*NOTREACHED*/ exit(1);
+	  exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/sendto/sendto01.c b/testcases/kernel/syscalls/sendto/sendto01.c
index 82e25e5..ce1f91e 100644
--- a/testcases/kernel/syscalls/sendto/sendto01.c
+++ b/testcases/kernel/syscalls/sendto/sendto01.c
@@ -177,7 +177,7 @@
 		return pid;
 	}
 
-	 /*NOTREACHED*/ exit(1);
+	  exit(1);
 }
 
 void do_child()
@@ -227,9 +227,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 #ifdef UCLINUX
 	argv0 = av[0];
@@ -274,7 +280,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 pid_t pid;
diff --git a/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c b/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
index 50fdcb8..5e07d89 100644
--- a/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
+++ b/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
@@ -90,7 +90,11 @@
 	int retval;
 #endif
 
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
index a1ca7c6..27c8b01 100644
--- a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
+++ b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
@@ -116,7 +116,11 @@
 	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		 tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		 tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		 tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c b/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c
index 0129898..54e5b37 100644
--- a/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c
+++ b/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c
@@ -53,7 +53,6 @@
 
 /* Global Variables */
 char *TCID = "set_thread_area_02";  /* Test program identifier.*/
-int  testno;
 int  TST_TOTAL = 3;		   /* total number of tests in this file.   */
 
 #if defined(HAVE_ASM_LDT_H) && defined(HAVE_STRUCT_USER_DESC)
@@ -83,9 +82,6 @@
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -116,81 +112,46 @@
 int main(int ac, char **av) {
 	
 	thread_area_s u_info;
-	int lc;		 /* loop counter */
-	char *msg;		  /* message returned from parse_opts */
-	
-	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	setup();
 
-	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-
-		Tst_count = 0;
-
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-
-			u_info.entry_number = 6;
+	u_info.entry_number = 6;
 	
-			/*
-			 * This call to get_thread_area function should be sucessful.
-			 */
+	TEST(syscall(__NR_get_thread_area, &u_info));	 //call get_thread_area()
+	if (TEST_RETURN == -1) {
+		tst_brkm(TFAIL|TTERRNO, cleanup, "call get_thread_area() failed");
+	}
 
-			TEST(syscall(__NR_get_thread_area, &u_info));	 //call get_thread_area()
-			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL | TTERRNO, "call get_thread_area() failed");
-				cleanup();
-				tst_exit();
-			}
-			 
-			u_info.entry_number = -2;
-			/*
-			 * This call to set_thread_area function with invalid entry_number should be FAILED.
-			 */
+	u_info.entry_number = -2;
+	TEST(syscall(__NR_set_thread_area, &u_info));	 //call set_thread_area()
+	if (TEST_RETURN == -1) {
 
-			TEST(syscall(__NR_set_thread_area, &u_info));	 //call set_thread_area()
-			if (TEST_RETURN == -1) {
-
-				if (TEST_ERRNO == EINVAL) {
-					tst_resm(TPASS, "Call to set_thread_area call failed with invalid entry_number  errno = %d (expected EINVAL)",TEST_ERRNO);
-				} else {
-			 		tst_resm(TFAIL,"Call to set_thread_area with invalid entry_number got unexpected errno = %d (expected EINVAL)",TEST_ERRNO);
-				}
-
-			} else {
-		   		tst_resm(TFAIL,"Call to set_thread_area with invalid entry_number succeed,but should fail" );
-				cleanup();
-				tst_exit();
-			}
-
-			/*
-			 * This call to set_thread_area function with an invalid pointer should be FAILED with EFAULT.
-			 */
-
-			TEST(syscall(__NR_set_thread_area,(struct user_desc *)-9));	 //call set_thread_area()
-			if (TEST_RETURN == -1) {
-				if (TEST_ERRNO == EFAULT) {
-					tst_resm(TPASS, "Call to set_thread_area call with invalid entry_number errno = %d (got expected error EFAULT)",TEST_ERRNO);
-				} else {
-					tst_resm(TFAIL,"Call to set_thread_area with invalid entry_number got unexpected errno = %d (expected EFAULT)",TEST_ERRNO);
-				}
-			} else {
-				tst_resm(TFAIL,"Call to set_thread_area with invalid entry_number succeed,but should fail" );
-				tst_exit();
-			}
+		if (TEST_ERRNO == EINVAL) {
+			tst_resm(TPASS, "set_thread_area failed with EINVAL as expected");
+		} else {
+	 		tst_resm(TFAIL|TTERRNO, "set_thread_area didn't fail with EINVAL");
 		}
+
+	} else {
+   		tst_brkm(TFAIL, cleanup, "set_thread_area succeeded unexpectedly");
+	}
+
+	TEST(syscall(__NR_set_thread_area,(struct user_desc *)-9));	 //call set_thread_area()
+	if (TEST_RETURN == -1) {
+		if (TEST_ERRNO == EFAULT) {
+			tst_resm(TPASS, "set_thread_area failed with EFAULT as expected");
+		} else {
+			tst_resm(TFAIL|TTERRNO, "set_thread_area didn't fail with EFAULT");
+		}
+	} else {
+		tst_resm(TFAIL, cleanup, "set_thread_area succeeded unexpectedly");
 	}
 	cleanup();
 	tst_exit();
 }
 #else
 int main(void) {
-	tst_resm(TCONF, "is not available for this architecture");
-	tst_exit();
+	tst_brkm(TCONF, NULL, "set_thread_area isn't available for this architecture");
 }
 #endif
 
diff --git a/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c b/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
index fb99937..2a6e737 100644
--- a/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
+++ b/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
@@ -114,7 +114,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/setdomainname/setdomainname01.c b/testcases/kernel/syscalls/setdomainname/setdomainname01.c
index 567e230..a95552c 100644
--- a/testcases/kernel/syscalls/setdomainname/setdomainname01.c
+++ b/testcases/kernel/syscalls/setdomainname/setdomainname01.c
@@ -123,7 +123,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -136,12 +136,12 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Save current domain name */
 	if ((getdomainname(old_domain_name, sizeof(old_domain_name))) < 0) {
-		tst_brkm(TBROK, tst_exit, "getdomainname() failed while"
+		tst_brkm(TBROK, NULL, "getdomainname() failed while"
 			 " getting current domain name");
 	}
 
diff --git a/testcases/kernel/syscalls/setdomainname/setdomainname02.c b/testcases/kernel/syscalls/setdomainname/setdomainname02.c
index fa26eb3..2acac5d 100644
--- a/testcases/kernel/syscalls/setdomainname/setdomainname02.c
+++ b/testcases/kernel/syscalls/setdomainname/setdomainname02.c
@@ -114,7 +114,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
+>>>>>>> master
 	    != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -153,7 +157,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -171,12 +175,12 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Save current domainname */
 	if ((getdomainname(old_domain_name, MAX_NAME_LEN)) < 0) {
-		tst_brkm(TBROK, tst_exit, "getdomainname() failed while"
+		tst_brkm(TBROK, NULL, "getdomainname() failed while"
 			 " getting current domain name");
 	}
 
diff --git a/testcases/kernel/syscalls/setdomainname/setdomainname03.c b/testcases/kernel/syscalls/setdomainname/setdomainname03.c
index 7146f55..b3c1659 100644
--- a/testcases/kernel/syscalls/setdomainname/setdomainname03.c
+++ b/testcases/kernel/syscalls/setdomainname/setdomainname03.c
@@ -101,7 +101,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -141,7 +145,7 @@
 	 */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -159,10 +163,10 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "\"nobody\" user not present");
+		tst_brkm(TBROK, NULL, "\"nobody\" user not present");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		tst_resm(TWARN, "seteuid failed to "
@@ -172,7 +176,7 @@
 
 	/* Save current domainname */
 	if ((getdomainname(old_domain_name, MAX_NAME_LEN)) < 0) {
-		tst_brkm(TBROK, tst_exit, "getdomainname() failed while"
+		tst_brkm(TBROK, NULL, "getdomainname() failed while"
 			 " getting current domain name");
 	}
 
diff --git a/testcases/kernel/syscalls/setfsgid/setfsgid01.c b/testcases/kernel/syscalls/setfsgid/setfsgid01.c
index 9d32061..c7a68cd 100644
--- a/testcases/kernel/syscalls/setfsgid/setfsgid01.c
+++ b/testcases/kernel/syscalls/setfsgid/setfsgid01.c
@@ -68,7 +68,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -103,7 +107,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setfsgid/setfsgid02.c b/testcases/kernel/syscalls/setfsgid/setfsgid02.c
index c1fd0f2..d4711b5 100644
--- a/testcases/kernel/syscalls/setfsgid/setfsgid02.c
+++ b/testcases/kernel/syscalls/setfsgid/setfsgid02.c
@@ -72,7 +72,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -110,7 +114,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return EXIT_SUCCESS;
+	  return EXIT_SUCCESS;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setfsgid/setfsgid03.c b/testcases/kernel/syscalls/setfsgid/setfsgid03.c
index 00e1156..addbaa4 100644
--- a/testcases/kernel/syscalls/setfsgid/setfsgid03.c
+++ b/testcases/kernel/syscalls/setfsgid/setfsgid03.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -113,7 +117,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return EXIT_SUCCESS;
+	  return EXIT_SUCCESS;
 }
 
 /*
@@ -123,7 +127,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid01.c b/testcases/kernel/syscalls/setfsuid/setfsuid01.c
index d69aa8c..758e12d 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid01.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid01.c
@@ -69,7 +69,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -105,7 +109,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid02.c b/testcases/kernel/syscalls/setfsuid/setfsuid02.c
index 7bc6d44..333d6d5 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid02.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid02.c
@@ -74,7 +74,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -114,7 +118,7 @@
 	cleanup();
 
 	return 0;
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid03.c b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
index 6859886..b6f6c0f 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid03.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
@@ -75,7 +75,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -118,7 +122,7 @@
 
 	return 0;
 
- /*NOTREACHED*/}
+ }
 
 /*
  * setup() - performs all ONE TIME setup for this test.
@@ -127,7 +131,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid04.c b/testcases/kernel/syscalls/setfsuid/setfsuid04.c
index 5c6262e..aeb7ee9 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid04.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid04.c
@@ -78,8 +78,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -103,7 +107,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -209,7 +213,7 @@
 void setup(void)
 {
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/setgid/setgid01.c b/testcases/kernel/syscalls/setgid/setgid01.c
index d10da6d..d525d4b 100644
--- a/testcases/kernel/syscalls/setgid/setgid01.c
+++ b/testcases/kernel/syscalls/setgid/setgid01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/setgid/setgid02.c b/testcases/kernel/syscalls/setgid/setgid02.c
index f660812..edc2fab 100644
--- a/testcases/kernel/syscalls/setgid/setgid02.c
+++ b/testcases/kernel/syscalls/setgid/setgid02.c
@@ -73,8 +73,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -115,7 +119,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -125,7 +129,7 @@
 {
 /* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 
diff --git a/testcases/kernel/syscalls/setgid/setgid03.c b/testcases/kernel/syscalls/setgid/setgid03.c
index 251bbde..9f196b5 100644
--- a/testcases/kernel/syscalls/setgid/setgid03.c
+++ b/testcases/kernel/syscalls/setgid/setgid03.c
@@ -68,8 +68,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -100,7 +104,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -110,7 +114,7 @@
 {
 	/* test must be run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/setgroups/setgroups02.c b/testcases/kernel/syscalls/setgroups/setgroups02.c
index b42fbd2..a009712 100644
--- a/testcases/kernel/syscalls/setgroups/setgroups02.c
+++ b/testcases/kernel/syscalls/setgroups/setgroups02.c
@@ -94,9 +94,15 @@
 	int PASS_FLAG = 0;	/* used for checking group array */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform global setup for test */
@@ -158,7 +164,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -174,7 +180,7 @@
 
 	/* Make sure the calling process is super-user only */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be ROOT to run this test.");
+		tst_brkm(TBROK, NULL, "Must be ROOT to run this test.");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/setgroups/setgroups03.c b/testcases/kernel/syscalls/setgroups/setgroups03.c
index 0f7169b..c7e4659 100644
--- a/testcases/kernel/syscalls/setgroups/setgroups03.c
+++ b/testcases/kernel/syscalls/setgroups/setgroups03.c
@@ -116,9 +116,15 @@
 	int ngroups_max = sysconf(_SC_NGROUPS_MAX);	/* max no. of groups in the current system */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	groups_list = malloc(ngroups_max * sizeof(GID_T));
@@ -181,7 +187,7 @@
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -193,7 +199,7 @@
 {
 
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/setgroups/setgroups04.c b/testcases/kernel/syscalls/setgroups/setgroups04.c
index de61fc3..82a436b 100644
--- a/testcases/kernel/syscalls/setgroups/setgroups04.c
+++ b/testcases/kernel/syscalls/setgroups/setgroups04.c
@@ -92,9 +92,15 @@
 	char *test_desc;	/* test specific error message */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* Perform setup for test */
@@ -143,7 +149,7 @@
 	/* Call cleanup() */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 #else
@@ -164,7 +170,7 @@
 
 	/* check root user */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/sethostname/sethostname01.c b/testcases/kernel/syscalls/sethostname/sethostname01.c
index fbc386c..1bf4c59 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname01.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname01.c
@@ -138,12 +138,12 @@
 
 	/* Test should be executed as root user */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Store the existing hostname to retain it before exiting */
 	if ((ret = gethostname(hname, sizeof(hname))) < 0) {
-		tst_brkm(TBROK, tst_exit, "gethostname() failed while getting"
+		tst_brkm(TBROK, NULL, "gethostname() failed while getting"
 			 " current host name");
 	}
 
diff --git a/testcases/kernel/syscalls/sethostname/sethostname02.c b/testcases/kernel/syscalls/sethostname/sethostname02.c
index bf7ad55..dfdebc2 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname02.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname02.c
@@ -178,12 +178,12 @@
 
 	/* Test should be executed as root user */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Keep the host name before starting the test */
 	if ((ret = gethostname(hname, sizeof(hname))) < 0) {
-		tst_brkm(TBROK, tst_exit, "gethostname() failed while"
+		tst_brkm(TBROK, NULL, "gethostname() failed while"
 			 " getting current host name");
 	}
 
diff --git a/testcases/kernel/syscalls/sethostname/sethostname03.c b/testcases/kernel/syscalls/sethostname/sethostname03.c
index 9255129..d90d327 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname03.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname03.c
@@ -145,12 +145,12 @@
 
 	/* Test should be executed as root user */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Switch to nobody user for correct error code collection */
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Required user \"nobody\" not"
+		tst_brkm(TBROK, NULL, "Required user \"nobody\" not"
 			 " present");
 	}
 
@@ -162,7 +162,7 @@
 
 	/* Keep current hostname */
 	if ((ret = gethostname(hname, sizeof(hname))) < 0) {
-		tst_brkm(TBROK, tst_exit, "gethostname() failed while"
+		tst_brkm(TBROK, NULL, "gethostname() failed while"
 			 " getting current host name");
 	}
 
diff --git a/testcases/kernel/syscalls/setitimer/setitimer01.c b/testcases/kernel/syscalls/setitimer/setitimer01.c
index 5df4d61..8b00bd3 100644
--- a/testcases/kernel/syscalls/setitimer/setitimer01.c
+++ b/testcases/kernel/syscalls/setitimer/setitimer01.c
@@ -76,7 +76,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -148,7 +152,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/setitimer/setitimer02.c b/testcases/kernel/syscalls/setitimer/setitimer02.c
index 756dfdf..978dc85 100644
--- a/testcases/kernel/syscalls/setitimer/setitimer02.c
+++ b/testcases/kernel/syscalls/setitimer/setitimer02.c
@@ -77,7 +77,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -139,7 +143,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/setitimer/setitimer03.c b/testcases/kernel/syscalls/setitimer/setitimer03.c
index 65640e0..d8dffe4 100644
--- a/testcases/kernel/syscalls/setitimer/setitimer03.c
+++ b/testcases/kernel/syscalls/setitimer/setitimer03.c
@@ -75,7 +75,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -148,7 +152,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/setpgid/setpgid01.c b/testcases/kernel/syscalls/setpgid/setpgid01.c
index 923023c..5060504 100644
--- a/testcases/kernel/syscalls/setpgid/setpgid01.c
+++ b/testcases/kernel/syscalls/setpgid/setpgid01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/setpgid/setpgid02.c b/testcases/kernel/syscalls/setpgid/setpgid02.c
index 1bd751c..a8b7041 100644
--- a/testcases/kernel/syscalls/setpgid/setpgid02.c
+++ b/testcases/kernel/syscalls/setpgid/setpgid02.c
@@ -93,7 +93,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -133,7 +137,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setpgid/setpgid03.c b/testcases/kernel/syscalls/setpgid/setpgid03.c
index c59effa..370978f 100644
--- a/testcases/kernel/syscalls/setpgid/setpgid03.c
+++ b/testcases/kernel/syscalls/setpgid/setpgid03.c
@@ -64,8 +64,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
 #endif
diff --git a/testcases/kernel/syscalls/setpgrp/setpgrp02.c b/testcases/kernel/syscalls/setpgrp/setpgrp02.c
index bdafab8..06a72a7 100644
--- a/testcases/kernel/syscalls/setpgrp/setpgrp02.c
+++ b/testcases/kernel/syscalls/setpgrp/setpgrp02.c
@@ -66,7 +66,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -119,7 +123,7 @@
 		}
 	}
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setpriority/setpriority01.c b/testcases/kernel/syscalls/setpriority/setpriority01.c
index f77d14f..f5dfdb7 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority01.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority01.c
@@ -78,7 +78,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -135,7 +139,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/setpriority/setpriority02.c b/testcases/kernel/syscalls/setpriority/setpriority02.c
index a1ff93d..70e6cb9 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority02.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority02.c
@@ -79,7 +79,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -120,7 +124,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -131,7 +135,7 @@
 {
 /* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setpriority/setpriority03.c b/testcases/kernel/syscalls/setpriority/setpriority03.c
index 798f37b..75756d9 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority03.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority03.c
@@ -78,7 +78,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -119,7 +123,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
diff --git a/testcases/kernel/syscalls/setpriority/setpriority04.c b/testcases/kernel/syscalls/setpriority/setpriority04.c
index a169fdb..52a68aa 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority04.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority04.c
@@ -95,7 +95,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -137,7 +141,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setpriority/setpriority05.c b/testcases/kernel/syscalls/setpriority/setpriority05.c
index c22a5e5..2580445 100644
--- a/testcases/kernel/syscalls/setpriority/setpriority05.c
+++ b/testcases/kernel/syscalls/setpriority/setpriority05.c
@@ -80,7 +80,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -120,7 +124,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -131,7 +135,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c
index 70fa600..be0c0d9 100644
--- a/testcases/kernel/syscalls/setregid/setregid01.c
+++ b/testcases/kernel/syscalls/setregid/setregid01.c
@@ -66,7 +66,7 @@
  *	(See the parse_opts(3) man page).
  *
  *    OUTPUT SPECIFICATIONS
- *$
+ *
  *    DURATION
  * 	Terminates - with frequency and infinite modes.
  *
@@ -134,23 +134,14 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -173,9 +164,6 @@
 				 "setregid -  Dont change either real or effective gid failed, errno=%d : %s",
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
@@ -199,9 +187,6 @@
 				 "setregid -  change effective to effective gid failed, errno=%d : %s",
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
@@ -225,9 +210,6 @@
 				 "setregid -  change real to real gid failed, errno=%d : %s",
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
@@ -251,9 +233,6 @@
 				 "setregid -  change effective to real gid failed, errno=%d : %s",
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
@@ -273,29 +252,20 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL,
-				 "setregid -  try to change real to current real failed, errno=%d : %s",
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TTERRNO, "setregid failed");
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
-				tst_resm(TPASS,
-					 "setregid -  try to change real to current real returned %ld",
-					 TEST_RETURN);
+				tst_resm(TPASS, "setregid return %ld",
+				    TEST_RETURN);
 			}
 		}
 
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
 
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -327,7 +297,4 @@
 
 	/* remove files and temp dir */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
index 3b1d64c..b368f08 100644
--- a/testcases/kernel/syscalls/setregid/setregid02.c
+++ b/testcases/kernel/syscalls/setregid/setregid02.c
@@ -80,10 +80,10 @@
 int exp_enos[] = { EPERM, 0 };
 gid_t inval_user = (USHRT_MAX);
 char nobody_uid[] = "nobody";
-struct passwd *ltpuser;
+struct passwd *nobody;
 
 struct group users, root, bin;
-struct passwd nobody;
+struct passwd *nobody;
 
 /*
  * The following structure contains all test data.  Each structure in the array
@@ -128,10 +128,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	 /*NOTREACHED*/}
 
 	/* Perform global setup for test */
 	setup();
@@ -189,8 +187,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
-
+	tst_exit();
 }
 
 /*
@@ -199,45 +196,42 @@
  */
 void setup(void)
 {
+	struct group *junk;
+
+	tst_require_root(NULL);
+	
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	if (getpwnam("nobody") == NULL) {
-		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
-		tst_exit();
-	 /*NOTREACHED*/}
-
-	nobody = *getpwnam("nobody");
-
-	/* Check that the test process id is nobody */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, NULL, "Must be root for this test!");
-		tst_exit();
+	if ((nobody = getpwnam("nobody")) == NULL) {
+		tst_brkm(TBROK, NULL, "getpwnam(\"nobody\") failed");
 	}
 
-	ltpuser = getpwnam(nobody_uid);
-	if (setgid(ltpuser->pw_gid) == -1) {
-		tst_resm(TINFO, "setgid failed to "
-			 "to set the effective gid to %d", ltpuser->pw_gid);
-		perror("setgid");
+	if (setgid(nobody->pw_gid) == -1) {
+		tst_brkm(TBROK|TERRNO, NULL,
+		    "setgid failed to set the effective gid to %d",
+		    nobody->pw_gid);
 	}
-	if (setuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TINFO, "setuid failed to "
-			 "to set the effective uid to %d", ltpuser->pw_uid);
-		perror("setuid");
+	if (setuid(nobody->pw_uid) == -1) {
+		tst_brkm(TBROK|TERRNO, NULL,
+		    "setuid failed to to set the effective uid to %d",
+		    nobody->pw_uid);
 	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-	root = *(getgrnam("root"));
-	root_gr_gid = root.gr_gid;
+#define GET_GID(group)	do {		\
+	junk = getgrnam(#group);	\
+	if (junk == NULL) {		\
+		tst_brkm(TBROK|TERRNO, NULL, "getgrnam(\"%s\") failed", #group); \
+	}				\
+	group ## _gr_gid = junk->gr_gid;\
+} while (0)
 
-	users = *(getgrnam("users"));
-	users_gr_gid = users.gr_gid;
-
-	bin = *(getgrnam("bin"));
-	bin_gr_gid = bin.gr_gid;
+	GET_GID(root);
+	GET_GID(users);
+	GET_GID(bin);
 
 	/* Pause if that option was specified
 	 * TEST_PAUSE contains the code to fork the test with the -c option.
@@ -257,10 +251,7 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void gid_verify(struct group *rg, struct group *eg, char *when)
 {
diff --git a/testcases/kernel/syscalls/setregid/setregid03.c b/testcases/kernel/syscalls/setregid/setregid03.c
index 007894c..d6c51b9 100644
--- a/testcases/kernel/syscalls/setregid/setregid03.c
+++ b/testcases/kernel/syscalls/setregid/setregid03.c
@@ -99,28 +99,18 @@
 	struct group *exp_eff_usr;
 	char *test_msg;
 } test_data[] = {
-	{
-	&sys_gr_gid, &bin_gr_gid, &pass, &sys, &bin,
-		    "After setregid(sys, bin),"}, {
-	&neg_one, &sys_gr_gid, &pass, &sys, &sys, "After setregid(-1, sys)"},
-	{
-	&neg_one, &bin_gr_gid, &pass, &sys, &bin, "After setregid(-1, bin),"},
-	{
-	&bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1),"},
-	{
-	&neg_one, &neg_one, &pass, &bin, &bin, "After setregid(-1, -1),"}, {
-	&neg_one, &bin_gr_gid, &pass, &bin, &bin, "After setregid(-1, bin),"},
-	{
-	&bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1),"},
-	{
-	&bin_gr_gid, &bin_gr_gid, &pass, &bin, &bin,
-		    "After setregid(bin, bin),"}, {
-	&sys_gr_gid, &neg_one, &fail, &bin, &bin, "After setregid(sys, -1)"},
-	{
-	&neg_one, &sys_gr_gid, &fail, &bin, &bin, "After setregid(-1, sys)"},
-	{
-&sys_gr_gid, &sys_gr_gid, &fail, &bin, &bin,
-		    "After setregid(sys, sys)"},};
+	{ &sys_gr_gid, &bin_gr_gid, &pass, &sys, &bin, "After setregid(sys, bin)," },
+	{ &neg_one, &sys_gr_gid, &pass, &sys, &sys, "After setregid(-1, sys)" },
+	{ &neg_one, &bin_gr_gid, &pass, &sys, &bin, "After setregid(-1, bin)," },
+	{ &bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1)," },
+	{ &neg_one, &neg_one, &pass, &bin, &bin, "After setregid(-1, -1)," },
+	{ &neg_one, &bin_gr_gid, &pass, &bin, &bin, "After setregid(-1, bin)," },
+	{ &bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1)," },
+	{ &bin_gr_gid, &bin_gr_gid, &pass, &bin, &bin, "After setregid(bin, bin)," },
+	{ &sys_gr_gid, &neg_one, &fail, &bin, &bin, "After setregid(sys, -1)" },
+	{ &neg_one, &sys_gr_gid, &fail, &bin, &bin, "After setregid(-1, sys)"},
+	{ &sys_gr_gid, &sys_gr_gid, &fail, &bin, &bin, "After setregid(sys, sys)"},
+};
 
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
 
@@ -134,33 +124,31 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	 /*NOTREACHED*/}
 
 	/* Perform global setup for test */
 	setup();
 
 	/* check looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
-		int pid, status, i;
+		pid_t pid;
+		int status, i;
 
 		/* reset Tst_count in case we are looping */
 		Tst_count = 0;
 
 		/* set the appropriate ownership values */
 		if (setregid(sys_gr_gid, bin_gr_gid) == -1) {
-			tst_brkm(TBROK, cleanup, "Initial setregid failed");
-		 /*NOTREACHED*/}
+			tst_brkm(TBROK, NULL, "Initial setregid failed");
+		 }
 
 		if (seteuid(nobody_pw_uid) == -1) {
-			tst_brkm(TBROK, cleanup, "Initial seteuid failed");
-		 /*NOTREACHED*/}
-
+			tst_brkm(TBROK, NULL, "Initial seteuid failed");
+		}
 		if ((pid = FORK_OR_VFORK()) == -1) {
-			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+			tst_brkm(TBROK, NULL, "fork failed");
+		} else if (pid == 0) {	/* child */
 			for (i = 0; i < TST_TOTAL; i++) {
 				gid_t test_ret;
 				/* Set the real or effective group id */
@@ -230,8 +218,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
-
+	tst_exit();
 }
 
 /*
@@ -240,20 +227,11 @@
  */
 void setup(void)
 {
+	tst_require_root(NULL);
+
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	if (getpwnam("nobody") == NULL) {
-		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
-		tst_exit();
-	 /*NOTREACHED*/}
-
-	/* Check that the test process id is super/root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, NULL, "Must be root for this test!");
-		tst_exit();
-	}
-
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
@@ -290,10 +268,7 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
- /*NOTREACHED*/}
+}
 
 void gid_verify(struct group *rg, struct group *eg, char *when)
 {
diff --git a/testcases/kernel/syscalls/setregid/setregid04.c b/testcases/kernel/syscalls/setregid/setregid04.c
index ae503f0..be55a67 100644
--- a/testcases/kernel/syscalls/setregid/setregid04.c
+++ b/testcases/kernel/syscalls/setregid/setregid04.c
@@ -133,11 +133,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)	{
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-		/*NOTREACHED*/
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -174,15 +171,14 @@
 			}
 		}
 	}
+
 	cleanup();
-	/*NOTREACHED*/
-	return 0;
+	tst_exit();
 }
 
 #define SAFE_GETGROUP(GROUPNAME)	\
 	if ((junk = getgrnam(#GROUPNAME)) == NULL) { \
 		tst_brkm(TBROK, NULL, "Couldn't find the `" #GROUPNAME "' group"); \
-		tst_exit(); \
 	} \
 	memcpy((void*) &GROUPNAME ## _gr, (const void*) junk, sizeof(struct group)); \
 	GROUPNAME ## _gr_gid = GROUPNAME ## _gr.gr_gid
@@ -195,15 +191,11 @@
 {
 	struct group *junk;
 
+	tst_require_root(NULL);
+
 	/* capture signals */
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	/* Check that the test process id is super/root  */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, NULL, "Must be root for this test!");
-		tst_exit();
-	}
-
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
@@ -230,10 +222,6 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-	/*NOTREACHED*/
 }
 
 void gid_verify(struct group *rg, struct group *eg, const char *when)
diff --git a/testcases/kernel/syscalls/setresgid/setresgid01.c b/testcases/kernel/syscalls/setresgid/setresgid01.c
index c2a271b..6a31f8f 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid01.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid01.c
@@ -122,9 +122,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -163,7 +163,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 static int test_functionality(uid_t exp_rgid, uid_t exp_egid, uid_t exp_sgid)
@@ -203,19 +203,19 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "getpwnam() failed for root");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
+		
 	}
 	root = *passwd_p;
 	root_gid = root.pw_gid;
 
 	if ((passwd_p = getpwnam("nobody")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "nobody user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "nobody user id doesn't exist");
+		
 	}
 	nobody = *passwd_p;
 	nobody_gid = nobody.pw_gid;
@@ -242,4 +242,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/setresgid/setresgid02.c b/testcases/kernel/syscalls/setresgid/setresgid02.c
index aa2a765..7828f2f 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid02.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid02.c
@@ -129,9 +129,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -170,7 +170,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 static int test_functionality(uid_t exp_rgid, uid_t exp_egid, uid_t exp_sgid)
@@ -211,35 +211,35 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "getpwnam() failed for root");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
+		
 	}
 	root = *passwd_p;
 	root_gid = root.pw_gid;
 
 	if ((passwd_p = getpwnam("bin")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "bin user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "bin user id doesn't exist");
+		
 	}
 	bin = *passwd_p;
 	bin_gid = bin.pw_gid;
 
 	if ((passwd_p = getpwnam("nobody")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "nobody user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "nobody user id doesn't exist");
+		
 	}
 	nobody = *passwd_p;
 	nobody_gid = nobody.pw_gid;
 
 	/* Set effective/saved gid to nobody */
 	if (setresgid(-1, nobody_gid, nobody_gid) == -1) {
-		tst_brkm(TBROK, tst_exit, "setup() failed for setting while"
+		tst_brkm(TBROK, NULL, "setup() failed for setting while"
 			 " setting real/effective/saved gid");
-		/* NOTREACHED */
+		
 	}
 
 	/* Pause if that option was specified
@@ -264,4 +264,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/setresgid/setresgid03.c b/testcases/kernel/syscalls/setresgid/setresgid03.c
index da59620..bdc8e25 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid03.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid03.c
@@ -122,9 +122,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -169,7 +169,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 static int test_functionality(uid_t exp_rgid, uid_t exp_egid, uid_t exp_sgid)
@@ -209,25 +209,25 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "getpwnam() failed for root");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
+		
 	}
 	root = *passwd_p;
 
 	if ((passwd_p = getpwnam("bin")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "bin user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "bin user id doesn't exist");
+		
 	}
 	bin = *passwd_p;
 	bin_gid = bin.pw_gid;
 
 	if ((passwd_p = getpwnam("nobody")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "nobody user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "nobody user id doesn't exist");
+		
 	}
 	nobody = *passwd_p;
 	nobody_gid = nobody.pw_gid;
@@ -237,15 +237,15 @@
 
 	/* Set real/effective/saved gid to nobody */
 	if (setresgid(nobody_gid, nobody_gid, nobody_gid) == -1) {
-		tst_brkm(TBROK, tst_exit, "setup() failed for setting while"
+		tst_brkm(TBROK, NULL, "setup() failed for setting while"
 			 " setting real/effective/saved gid");
-		/* NOTREACHED */
+		
 	}
 	/* Set euid to nobody */
 	if (setuid(nobody.pw_uid) == -1) {
-		tst_brkm(TBROK, tst_exit, "setuid failed to "
+		tst_brkm(TBROK, NULL, "setuid failed to "
 			 "to set the effective uid to nodody");
-		/* NOTREACHED */
+		
 	}
 	/* Pause if that option was specified
 	 * TEST_PAUSE contains the code to fork the test with the -c option.
@@ -269,4 +269,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/setresuid/setresuid01.c b/testcases/kernel/syscalls/setresuid/setresuid01.c
index bfb5b01..f8dea2f 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid01.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid01.c
@@ -131,7 +131,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -172,7 +172,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -188,17 +188,17 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -233,7 +233,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -241,7 +241,7 @@
 	uid_t cur_ru, cur_eu, cur_su;
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 /*NOTREACHED*/}
+	 }
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid02.c b/testcases/kernel/syscalls/setresuid/setresuid02.c
index db138ca..9866deb 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid02.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid02.c
@@ -120,7 +120,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -135,11 +135,11 @@
 		/* set the appropriate ownership values */
 		if (setresuid(nobody_pw_uid, bin_pw_uid, nobody_pw_uid) == -1) {
 			tst_brkm(TFAIL, cleanup, "Initial setresuid failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+		 } else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -186,7 +186,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -201,12 +201,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
@@ -243,7 +243,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -252,7 +252,7 @@
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		flag = -1;
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 /*NOTREACHED*/}
+	 }
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid03.c b/testcases/kernel/syscalls/setresuid/setresuid03.c
index 38d4f9c..f13780e 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid03.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid03.c
@@ -131,7 +131,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -147,11 +147,11 @@
 		if (setresuid(root_pw_uid, bin_pw_uid, bin_pw_uid)
 		    == -1) {
 			tst_brkm(TFAIL, cleanup, "Initial setresuid failed");
-		 /*NOTREACHED*/}
+		 }
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+		 } else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -199,7 +199,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -214,18 +214,18 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	root = *(getpwnam("root"));
 	root_pw_uid = root.pw_uid;
@@ -259,7 +259,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -268,7 +268,7 @@
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		flag = -1;
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 /*NOTREACHED*/}
+	 }
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid04.c b/testcases/kernel/syscalls/setresuid/setresuid04.c
index b9893a9..9b0bac4 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid04.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid04.c
@@ -76,8 +76,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -101,7 +105,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -207,7 +211,7 @@
 void setup(void)
 {
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/setreuid/setreuid01.c b/testcases/kernel/syscalls/setreuid/setreuid01.c
index cf73af4..a75f9fd 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid01.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid01.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/setreuid/setreuid02.c b/testcases/kernel/syscalls/setreuid/setreuid02.c
index 8d0982b..c7b263d 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid02.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid02.c
@@ -116,7 +116,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -154,7 +154,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -170,12 +170,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("daemon") == NULL) {
 		tst_brkm(TBROK, NULL, "daemon must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Check that the test process id is root  */
 	if (geteuid() != 0) {
@@ -219,7 +219,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid03.c b/testcases/kernel/syscalls/setreuid/setreuid03.c
index af40f89..07162c5 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid03.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid03.c
@@ -142,7 +142,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -204,7 +204,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -220,12 +220,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -267,7 +267,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid04.c b/testcases/kernel/syscalls/setreuid/setreuid04.c
index 65c1a5f..587ff77 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid04.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid04.c
@@ -113,7 +113,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -127,7 +127,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+		 } else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -170,7 +170,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -186,7 +186,7 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
@@ -223,7 +223,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid05.c b/testcases/kernel/syscalls/setreuid/setreuid05.c
index 67b9742..4dc5fef 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid05.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid05.c
@@ -137,11 +137,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -155,7 +155,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+		 } else if (pid == 0) {	/* child */
 			for (i = 0; i < TST_TOTAL; i++) {
 				/* Set the real or effective user id */
 				TEST(setreuid(*test_data[i].real_uid,
@@ -218,7 +218,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -234,17 +234,17 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getpwnam("daemon") == NULL) {
 		tst_brkm(TBROK, NULL, "daemon must be a valid user.");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	if (getuid() != 0) {
 		tst_resm(TBROK, "Must be run as root");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -282,7 +282,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid06.c b/testcases/kernel/syscalls/setreuid/setreuid06.c
index eb198c6..f6af207 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid06.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid06.c
@@ -73,10 +73,10 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -103,7 +103,7 @@
 
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -123,7 +123,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid07.c b/testcases/kernel/syscalls/setreuid/setreuid07.c
index c97248c..fafb833 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid07.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid07.c
@@ -75,8 +75,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -100,7 +104,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -206,7 +210,7 @@
 void setup(void)
 {
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit01.c b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
index e45dd21..6cc29f9 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit01.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
@@ -82,8 +82,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();		/* set "tstdir", and "fname" vars */
 
@@ -105,7 +109,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -343,7 +347,7 @@
 {
 	/* must run test as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must run test as root");
+		tst_brkm(TBROK, NULL, "Must run test as root");
 	}
 
 	umask(0);
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit02.c b/testcases/kernel/syscalls/setrlimit/setrlimit02.c
index 0b5249a..12c08c0 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit02.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit02.c
@@ -88,8 +88,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -127,7 +131,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -145,7 +149,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
index 9c61e5c..41928ff 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
@@ -70,8 +70,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	setup();
 
@@ -105,7 +109,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -115,7 +119,7 @@
 {
 	/* must run test as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "must run test as root");
+		tst_brkm(TBROK, NULL, "must run test as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/setsid/setsid01.c b/testcases/kernel/syscalls/setsid/setsid01.c
index 558e778..840a990 100644
--- a/testcases/kernel/syscalls/setsid/setsid01.c
+++ b/testcases/kernel/syscalls/setsid/setsid01.c
@@ -71,9 +71,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 #ifdef UCLINUX
 	argv0 = av[0];
 
@@ -148,7 +147,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt01.c b/testcases/kernel/syscalls/setsockopt/setsockopt01.c
index 9cf3ab8..872c211 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt01.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt01.c
@@ -138,11 +138,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 	setup();
 
 	/* Check looping state if -i option given */
@@ -176,7 +180,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 void setup(void)
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday01.c b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
index b933def..8e1da9f 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday01.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
@@ -85,11 +85,11 @@
 	suseconds_t delta;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	setup();
 
@@ -144,7 +144,7 @@
 
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -171,7 +171,7 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -185,7 +185,7 @@
 	if ((gettimeofday(&tp, (struct timezone *)&tp1)) == -1) {
 		tst_brkm(TBROK, cleanup, "gettimeofday failed. "
 			 "errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 	save_tv_sec = tp.tv_sec;
 	save_tv_usec = tp.tv_usec;
 }
@@ -213,4 +213,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday02.c b/testcases/kernel/syscalls/settimeofday/settimeofday02.c
index eedd8a4..4bee4a3 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday02.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday02.c
@@ -89,8 +89,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -132,7 +132,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -159,7 +159,7 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Switch to nobody user for correct error code collection */
 	ltpuser = getpwnam(nobody_uid);
@@ -181,7 +181,7 @@
 	if ((gettimeofday(&tp, (struct timezone *)&tp)) == -1) {
 		tst_brkm(TBROK, cleanup, "gettimeofday failed. "
 			 "errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 	save_tv_sec = tp.tv_sec;
 	save_tv_usec = tp.tv_usec;
 }
@@ -201,7 +201,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void restore_time(void)
 {
diff --git a/testcases/kernel/syscalls/setuid/setuid02.c b/testcases/kernel/syscalls/setuid/setuid02.c
index 52073d0..558e12f 100644
--- a/testcases/kernel/syscalls/setuid/setuid02.c
+++ b/testcases/kernel/syscalls/setuid/setuid02.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/setuid/setuid03.c b/testcases/kernel/syscalls/setuid/setuid03.c
index 5d4b549..3cda4be 100644
--- a/testcases/kernel/syscalls/setuid/setuid03.c
+++ b/testcases/kernel/syscalls/setuid/setuid03.c
@@ -67,8 +67,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -101,7 +105,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -111,7 +115,7 @@
 {
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/setuid/setuid04.c b/testcases/kernel/syscalls/setuid/setuid04.c
index 58083aa..92c502f 100644
--- a/testcases/kernel/syscalls/setuid/setuid04.c
+++ b/testcases/kernel/syscalls/setuid/setuid04.c
@@ -77,8 +77,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/*
 	 * perform global setup for the test
@@ -101,7 +105,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -114,7 +118,7 @@
 	int status;
 
 	if (setuid(ltpuser->pw_uid) == -1) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			 "setuid failed to set the effective uid to %d",
 			 ltpuser->pw_uid);
 	}
@@ -143,7 +147,7 @@
 
 		pid = FORK_OR_VFORK();
 		if (pid < 0)
-			tst_brkm(TBROK, tst_exit, "Fork failed");
+			tst_brkm(TBROK, NULL, "Fork failed");
 
 		if (pid == 0) {
 			int tst_fd2;
@@ -182,7 +186,7 @@
 void setup(void)
 {
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
diff --git a/testcases/kernel/syscalls/sgetmask/sgetmask01.c b/testcases/kernel/syscalls/sgetmask/sgetmask01.c
index 7ebe67e..9e2263a 100644
--- a/testcases/kernel/syscalls/sgetmask/sgetmask01.c
+++ b/testcases/kernel/syscalls/sgetmask/sgetmask01.c
@@ -127,7 +127,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/sigaction/sigaction01.c b/testcases/kernel/syscalls/sigaction/sigaction01.c
index 2586917..9de1b2e 100644
--- a/testcases/kernel/syscalls/sigaction/sigaction01.c
+++ b/testcases/kernel/syscalls/sigaction/sigaction01.c
@@ -243,7 +243,11 @@
 	};
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -284,5 +288,5 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sigaction/sigaction02.c b/testcases/kernel/syscalls/sigaction/sigaction02.c
index 4598d91..618e010 100644
--- a/testcases/kernel/syscalls/sigaction/sigaction02.c
+++ b/testcases/kernel/syscalls/sigaction/sigaction02.c
@@ -117,7 +117,11 @@
 	int ret;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 //test1:
 	testcase_no = 1;
diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
index de8c093..e5263a2 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
@@ -100,11 +100,15 @@
 	void *alt_stk;		/* address of alternate stack for signal */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -187,7 +191,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -215,7 +219,7 @@
 	if ((sigaction(SIGUSR1, &act, &oact)) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() fails in setup, errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Send the signal to the test process */
 	kill(my_pid, SIGUSR1);
@@ -230,7 +234,7 @@
 	if ((sigstk.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
 		tst_brkm(TFAIL, cleanup,
 			 "could not allocate memory for the alternate stack");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
index e58680b..ad94e26 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
@@ -119,11 +119,15 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -180,7 +184,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -201,7 +205,7 @@
 	if ((sigstk.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
 		tst_brkm(TFAIL, cleanup,
 			 "could not allocate memory for the alternate stack");
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
diff --git a/testcases/kernel/syscalls/signal/signal02.c b/testcases/kernel/syscalls/signal/signal02.c
index d505dd4..2ef48fb 100644
--- a/testcases/kernel/syscalls/signal/signal02.c
+++ b/testcases/kernel/syscalls/signal/signal02.c
@@ -80,8 +80,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -104,7 +108,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID, TEST_ERRNO,
 					 strerror(TEST_ERRNO));
-			 /*NOTREACHED*/}
+			 }
 
 			TEST_ERROR_LOG(TEST_ERRNO);
 
@@ -126,7 +130,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/signal/signal03.c b/testcases/kernel/syscalls/signal/signal03.c
index dcaaf05..6569260 100644
--- a/testcases/kernel/syscalls/signal/signal03.c
+++ b/testcases/kernel/syscalls/signal/signal03.c
@@ -98,8 +98,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -122,7 +126,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID,
 					 TEST_ERRNO, strerror(TEST_ERRNO));
-			 /*NOTREACHED*/}
+			 }
 
 			if (STD_FUNCTIONAL_TEST) {
 				/*
@@ -135,7 +139,7 @@
 				if ((rval = kill(pid, siglist[i])) != 0) {
 					tst_brkm(TBROK, cleanup, "call to "
 						 "kill failed");
-				 /*NOTREACHED*/}
+				 }
 
 				if (fail == 0) {
 					tst_resm(TPASS, "%s call succeeded",
@@ -153,7 +157,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/signal/signal04.c b/testcases/kernel/syscalls/signal/signal04.c
index 0f65a43..587c11f 100644
--- a/testcases/kernel/syscalls/signal/signal04.c
+++ b/testcases/kernel/syscalls/signal/signal04.c
@@ -92,8 +92,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -117,7 +121,7 @@
 			if ((rval = signal(siglist[i], &sighandler)) == SIG_ERR) {
 				tst_brkm(TBROK, cleanup, "initial signal call"
 					 " failed");
-			 /*NOTREACHED*/}
+			 }
 
 			/* store the return value */
 			first = rval;
@@ -131,7 +135,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID, TEST_ERRNO,
 					 strerror(TEST_ERRNO));
-			 /*NOTREACHED*/}
+			 }
 
 			if (STD_FUNCTIONAL_TEST) {
 				/* now set the handler back to our own */
@@ -139,7 +143,7 @@
 				    == SIG_ERR) {
 					tst_brkm(TBROK, cleanup, "initial "
 						 "signal call failed");
-				 /*NOTREACHED*/}
+				 }
 
 				/*
 				 * the first return value should equal the
@@ -153,7 +157,7 @@
 						 "values for signal(%d) don't "
 						 "match. Got %p, expected %p.",
 						 siglist[i], rval, first);
-				 /*NOTREACHED*/}
+				 }
 			} else {
 				tst_resm(TPASS, "Call of signal(%d) succeeded",
 					 siglist[i]);
@@ -162,7 +166,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/signal/signal05.c b/testcases/kernel/syscalls/signal/signal05.c
index 087ed12..ed15347 100644
--- a/testcases/kernel/syscalls/signal/signal05.c
+++ b/testcases/kernel/syscalls/signal/signal05.c
@@ -97,8 +97,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -134,7 +138,7 @@
 				if ((rval = kill(pid, siglist[i])) != 0) {
 					tst_brkm(TBROK, cleanup,
 						 "call to kill failed");
-				 /*NOTREACHED*/}
+				 }
 
 				if (siglist[i] == pass) {
 					tst_resm(TPASS,
@@ -151,7 +155,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/signalfd/signalfd01.c b/testcases/kernel/syscalls/signalfd/signalfd01.c
index 4faaa16..77eb424 100644
--- a/testcases/kernel/syscalls/signalfd/signalfd01.c
+++ b/testcases/kernel/syscalls/signalfd/signalfd01.c
@@ -284,7 +284,7 @@
 	}
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
index 9372384..9846a8f 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
@@ -144,7 +144,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
index 4b5d608..3f55209 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
@@ -136,7 +136,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
index 7ca86e8..d91bb5a 100644
--- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
@@ -103,7 +103,11 @@
 	pid_t my_pid;		/* test process id */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -175,7 +179,7 @@
 						tst_brkm(TFAIL, cleanup,
 							 "sigismember() failed, "
 							 "error:%d", errno);
-					 /*NOTREACHED*/}
+					 }
 
 					/*
 					 * Invoke sigprocmask() again to
@@ -190,7 +194,7 @@
 							 "sigprocmask() failed "
 							 "to unblock signal, "
 							 "error=%d", errno);
-					 /*NOTREACHED*/}
+					 }
 					if (sig_catch) {
 						tst_resm(TPASS, "Functionality "
 							 "of sigprocmask() "
@@ -213,7 +217,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -242,12 +246,12 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigemptyset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (sigfillset(&sigset2) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigfillset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Set the signal handler function to catch the signal */
 	sa_new.sa_handler = sig_handler;
@@ -255,7 +259,7 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Add specified signal (SIGINT) to the signal set
@@ -265,7 +269,7 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaddset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 }				/* End setup() */
 
 /*
diff --git a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
index 5186cfc..37c4380 100644
--- a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
+++ b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
@@ -100,11 +100,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -142,8 +139,8 @@
 				 * Read the current signal mask of process,
 				 * Check whether previous signal mask preserved
 				 */
-				if (sigprocmask(SIG_UNBLOCK, 0, &sigset2)
-				    == -1) {
+				if (sigprocmask(SIG_UNBLOCK, 0, &sigset2) ==
+				    -1) {
 					tst_resm(TFAIL, "sigprocmask() Failed "
 						 "to get previous signal mask "
 						 "of process");
@@ -167,9 +164,9 @@
 		Tst_count++;	/* incr TEST_LOOP counter */
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+
+	tst_exit();
 
 }				/* End main */
 
@@ -197,12 +194,12 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigemptyset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (sigfillset(&sigset2) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigfillset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Set the signal handler function to catch the signal */
 	sa_new.sa_handler = sig_handler;
@@ -210,14 +207,14 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Read the test process's current signal mask. */
 	if (sigprocmask(SIG_UNBLOCK, 0, &sigset1) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigprocmask() Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 }				/* End setup() */
 
 /*
diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
index 398364f..a53feb6 100644
--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
@@ -410,9 +410,9 @@
 	char* msg;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-			(char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+			NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		/*NOT REACHED */
 	}
 
diff --git a/testcases/kernel/syscalls/socket/socket01.c b/testcases/kernel/syscalls/socket/socket01.c
index 6562504..31ebb93 100644
--- a/testcases/kernel/syscalls/socket/socket01.c
+++ b/testcases/kernel/syscalls/socket/socket01.c
@@ -91,7 +91,11 @@
 	int s;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -124,7 +128,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/socket/socket02.c b/testcases/kernel/syscalls/socket/socket02.c
index 6b76d36..beee010 100644
--- a/testcases/kernel/syscalls/socket/socket02.c
+++ b/testcases/kernel/syscalls/socket/socket02.c
@@ -147,7 +147,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/socket/socket03.c b/testcases/kernel/syscalls/socket/socket03.c
index bfa1d92..839397f 100644
--- a/testcases/kernel/syscalls/socket/socket03.c
+++ b/testcases/kernel/syscalls/socket/socket03.c
@@ -131,7 +131,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/socketcall/socketcall02.c b/testcases/kernel/syscalls/socketcall/socketcall02.c
index 15ea122..6d4fd0a 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall02.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall02.c
@@ -131,7 +131,7 @@
 			tst_resm(TPASS, "socketcall() failed"
 				 " as expected for %s", TC.desc);
 		} else {
-			tst_brkm(TFAIL, tst_exit, "socketcall()"
+			tst_brkm(TFAIL, NULL, "socketcall()"
 				 " Failed with wrong experrno"
 				 " =%d got: errno=%d : %s",
 				 TC.experrno, TEST_ERRNO, strerror(TEST_ERRNO));
diff --git a/testcases/kernel/syscalls/socketcall/socketcall03.c b/testcases/kernel/syscalls/socketcall/socketcall03.c
index 6caec41..d4f84c1 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall03.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall03.c
@@ -153,7 +153,7 @@
 	si.sin_port = 0;
 
 	if ((s = socket(TC.domain, TC.type, TC.pro)) == -1) {
-		tst_brkm(TBROK, tst_exit, "socket creation failed");
+		tst_brkm(TBROK, NULL, "socket creation failed");
 	}
 	args[0] = s;
 	args[1] = (unsigned long)&si;
diff --git a/testcases/kernel/syscalls/socketcall/socketcall04.c b/testcases/kernel/syscalls/socketcall/socketcall04.c
index 44dd305..c1091fd 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall04.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall04.c
@@ -147,7 +147,7 @@
 void setup1(void)
 {
 	if ((s = socket(TC.domain, TC.type, TC.pro)) == -1) {
-		tst_brkm(TBROK, tst_exit, "socket creation failed");
+		tst_brkm(TBROK, NULL, "socket creation failed");
 	}
 	args[0] = s;
 	args[1] = 1;
diff --git a/testcases/kernel/syscalls/socketpair/socketpair01.c b/testcases/kernel/syscalls/socketpair/socketpair01.c
index f0e7820..84aedc4 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair01.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair01.c
@@ -99,12 +99,8 @@
 	char *msg;		/* message returned from parse_opts */
 	int s;
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	setup();
 
@@ -141,8 +137,7 @@
 
 	cleanup();
 
-	return 0;
-
+	tst_exit();
 }				/* End main */
 
 void setup(void)
@@ -156,5 +151,4 @@
 void cleanup(void)
 {
 	TEST_CLEANUP;
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/socketpair/socketpair02.c b/testcases/kernel/syscalls/socketpair/socketpair02.c
index 60282dd..3f661b2 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair02.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair02.c
@@ -67,8 +67,6 @@
 
 /* Global Variables */
 char *TCID = "socketpair02";	/* test program identifier.              */
-int testno;
-int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -88,14 +86,11 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup()
+void cleanup()
 {
 	/* Remove tmp dir and all files in it */
 	TEST_CLEANUP;
 	tst_rmdir();
-
-	/* Exit with appropriate return code. */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -127,75 +122,46 @@
 int main(int argc, char *argv[])
 {
 	int fds[2], fl, i;
-	int lc;			/* loop counter */
-	char *msg;		/* message returned from parse_opts */
 
-	/* Parse standard options given to run the test. */
-	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
-	if (msg != NULL) {
-		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
-		tst_resm(TCONF,
-			 "This test can only run on kernels that are 2.6.27 and higher");
-		tst_exit();
+		tst_brkm(TCONF, NULL,
+		    "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
 	/* Check looping state if -i option given */
-	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds) == -1) {
-				tst_resm(TFAIL, "socketpair(0) failed");
-				cleanup();
-				tst_exit();
-			}
-			for (i = 0; i < 2; ++i) {
-				fl = fcntl(fds[i], F_GETFL);
-				if (fl == -1) {
-					tst_brkm(TBROK, cleanup,
-						 "fcntl failed");
-					tst_exit();
-				}
-				if (fl & O_NONBLOCK) {
-					tst_resm(TFAIL,
-						 "socketpair(0) set non-blocking mode for fds[%d]",
-						 i);
-					cleanup();
-					tst_exit();
-				}
-				close(fds[i]);
-			}
-
-			if (socketpair
-			    (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0,
-			     fds) == -1) {
-				tst_resm(TFAIL,
-					 "socketpair(SOCK_NONBLOCK) failed");
-				cleanup();
-				tst_exit();
-			}
-			for (i = 0; i < 2; ++i) {
-				fl = fcntl(fds[i], F_GETFL);
-				if (fl == -1) {
-					tst_brkm(TBROK, cleanup,
-						 "fcntl failed");
-					tst_exit();
-				}
-				if ((fl & O_NONBLOCK) == 0) {
-					tst_resm(TFAIL,
-						 "socketpair(SOCK_NONBLOCK) does not set non-blocking mode for fds[%d]",
-						 i);
-					cleanup();
-					tst_exit();
-				}
-				close(fds[i]);
-			}
-			tst_resm(TPASS, "socketpair(SOCK_NONBLOCK) PASSED");
-			cleanup();
-		}
+	if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds) == -1) {
+		tst_brkm(TFAIL, cleanup, "socketpair(0) failed");
 	}
+	for (i = 0; i < (sizeof(fds) / sizeof(fds[0])); i++) {
+		fl = fcntl(fds[i], F_GETFL);
+		if (fl == -1) {
+			tst_brkm(TBROK, cleanup, "fcntl failed");
+		}
+		if (fl & O_NONBLOCK) {
+			tst_brkm(TFAIL, cleanup,
+			    "socketpair(0) set non-blocking mode for fds[%d]",
+			    i);
+		}
+		close(fds[i]);
+	}
+
+	if (socketpair(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, fds) == -1) {
+		tst_brkm(TFAIL, cleanup, "socketpair(SOCK_NONBLOCK) failed");
+	}
+	for (i = 0; i < (sizeof(fds) / sizeof(fds[0])); i++) {
+		fl = fcntl(fds[i], F_GETFL);
+		if (fl == -1) {
+			tst_brkm(TBROK, cleanup, "fcntl failed");
+		}
+		if ((fl & O_NONBLOCK) == 0) {
+			tst_brkm(TFAIL, cleanup,
+			    "socketpair(SOCK_NONBLOCK) didn't set non-blocking "
+			    "mode for fds[%d]", i);
+		}
+		close(fds[i]);
+	}
+	tst_resm(TPASS, "socketpair(SOCK_NONBLOCK) PASSED");
+	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index bfcd45b..973a508 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -137,7 +137,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -168,7 +172,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/splice/splice01.c b/testcases/kernel/syscalls/splice/splice01.c
index c1af020..0ae6643 100644
--- a/testcases/kernel/syscalls/splice/splice01.c
+++ b/testcases/kernel/syscalls/splice/splice01.c
@@ -87,8 +87,8 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)))
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)))
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/splice/splice02.c b/testcases/kernel/syscalls/splice/splice02.c
index 0e83ed3..d919478 100644
--- a/testcases/kernel/syscalls/splice/splice02.c
+++ b/testcases/kernel/syscalls/splice/splice02.c
@@ -133,7 +133,11 @@
             tst_exit();
 	}
 	fd=open(av[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
+<<<<<<< HEAD
+	if (fd < 0) {
+=======
 	if (fd < 0 ) {
+>>>>>>> master
 		tst_resm(TFAIL, "open(%s) failed - errno = %d : %s", av[1], errno, strerror(errno));
 	   cleanup();
 	   tst_exit();
diff --git a/testcases/kernel/syscalls/ssetmask/ssetmask01.c b/testcases/kernel/syscalls/ssetmask/ssetmask01.c
index 0c75cd0..6dbbc72 100644
--- a/testcases/kernel/syscalls/ssetmask/ssetmask01.c
+++ b/testcases/kernel/syscalls/ssetmask/ssetmask01.c
@@ -118,7 +118,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/stat/stat01.c b/testcases/kernel/syscalls/stat/stat01.c
index 02a3d42..4aa5658 100644
--- a/testcases/kernel/syscalls/stat/stat01.c
+++ b/testcases/kernel/syscalls/stat/stat01.c
@@ -88,8 +88,8 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
 int exp_enos[] = { 0 };
-uid_t User_id;			/* Owner id of the test file */
-gid_t Group_id;			/* Group id of the test file */
+uid_t user_id;			/* Owner id of the test file */
+gid_t group_id;			/* Group id of the test file */
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -103,11 +103,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	msg = parse_opts(ac, av, NULL, NULL);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	 /*NOTREACHED*/}
 
 	/* Perform global setup for test */
 	setup();
@@ -143,8 +141,8 @@
 				 * Verify the data returned by stat(2)
 				 * aganist the expected data.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id) ||
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id) ||
 				    (stat_buf.st_size != FILE_SIZE) ||
 				    ((stat_buf.st_mode & MASK) != FILE_MODE)) {
 					tst_resm(TFAIL, "Functionality of "
@@ -164,7 +162,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -187,7 +185,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -210,7 +208,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Fill the test buffer with the known data */
 	for (i = 0; i < BUF_SIZE; i++) {
@@ -223,7 +221,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TESTFILE, errno, strerror(errno));
-		 /*NOTREACHED*/} else {
+		 } else {
 			write_len += wbytes;
 		}
 	}
@@ -235,8 +233,8 @@
 	}
 
 	/* Get the uid/gid of the process */
-	User_id = getuid();
-	Group_id = getgid();
+	user_id = getuid();
+	group_id = getgid();
 
 }				/* End setup() */
 
@@ -255,7 +253,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/stat/stat02.c b/testcases/kernel/syscalls/stat/stat02.c
index 095bdaf..c9044eb 100644
--- a/testcases/kernel/syscalls/stat/stat02.c
+++ b/testcases/kernel/syscalls/stat/stat02.c
@@ -90,8 +90,8 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
 int exp_enos[] = { 0 };
-uid_t User_id;			/* eff. user id/group id of test process */
-gid_t Group_id;
+uid_t user_id;			/* eff. user id/group id of test process */
+gid_t group_id;
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -105,11 +105,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	}
 
 	/* Perform global setup for test */
 	setup();
@@ -145,8 +142,8 @@
 				 * Verify the data returned by stat(2)
 				 * aganist the expected data.
 				 */
-				if ((stat_buf.st_uid != User_id) ||
-				    (stat_buf.st_gid != Group_id) ||
+				if ((stat_buf.st_uid != user_id) ||
+				    (stat_buf.st_gid != group_id) ||
 				    (stat_buf.st_size != FILE_SIZE) ||
 				    ((stat_buf.st_mode & MASK) != NEW_MODE)) {
 					tst_resm(TFAIL, "Functionality of "
@@ -164,9 +161,8 @@
 		Tst_count++;	/* incr TEST_LOOP counter */
 	}			/* End for TEST_LOOPING */
 
-	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -190,7 +186,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -213,7 +209,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Fill the test buffer with the known data */
 	for (i = 0; i < BUF_SIZE; i++) {
@@ -223,29 +219,24 @@
 	/* Write to the file 1k data from the buffer */
 	while (write_len < FILE_SIZE) {
 		if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
-			tst_brkm(TBROK, cleanup,
-				 "write(2) on %s Failed, errno=%d : %s",
-				 TESTFILE, errno, strerror(errno));
-		 /*NOTREACHED*/} else {
+			tst_brkm(TBROK|TERRNO, cleanup, "write to %s failed", TESTFILE);
+		} else {
 			write_len += wbytes;
 		}
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
-			 TESTFILE, errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "closing %s failed", TESTFILE);
 	}
 
 	/* Modify mode permissions on the testfile */
 	if (chmod(TESTFILE, NEW_MODE) < 0) {
-		tst_brkm(TBROK, cleanup,
-			 "chmod(2) on %s Failed, errno=%d : %s",
-			 TESTFILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK|TERRNO, cleanup, "chmodding %s failed", TESTFILE);
+	 }
 
 	/* Get the uid/gid of the process */
-	User_id = getuid();
-	Group_id = getgid();
+	user_id = getuid();
+	group_id = getgid();
 
 }				/* End setup() */
 
@@ -264,7 +255,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/stat/stat03.c b/testcases/kernel/syscalls/stat/stat03.c
index 606330a..e10cec6 100644
--- a/testcases/kernel/syscalls/stat/stat03.c
+++ b/testcases/kernel/syscalls/stat/stat03.c
@@ -151,11 +151,8 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
-	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
-	if (msg != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		tst_exit();
-	 /*NOTREACHED*/}
 
 	/*
 	 * Invoke setup function to call individual test setup functions
@@ -216,7 +213,7 @@
 	 * in the setup().
 	 */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -237,7 +234,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -300,25 +297,25 @@
 	/* Creat a test directory */
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Creat a test file under above test directory */
 	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	/* Close the test file */
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Modify mode permissions on test directory */
 	if (chmod(DIR_TEMP, FILE_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
@@ -340,13 +337,13 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	/* Close the test file created above */
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
@@ -390,7 +387,4 @@
 
 	/* Remove files and temporary directory created */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/stat/stat05.c b/testcases/kernel/syscalls/stat/stat05.c
index b07ffc3..2aa2fe7 100644
--- a/testcases/kernel/syscalls/stat/stat05.c
+++ b/testcases/kernel/syscalls/stat/stat05.c
@@ -136,23 +136,14 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -166,13 +157,8 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL,
-				 "stat(%s, &statter) Failed, errno=%d : %s",
-				 fname, TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL, "stat(%s, &statter) failed", fname);
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
@@ -183,12 +169,9 @@
 
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
+	tst_exit();
 
-	return 0;
 }				/* End main */
 
 /***************************************************************
@@ -213,8 +196,8 @@
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
-			 fname, errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "close(%s) failed",
+			 fname);
 	}
 }				/* End setup() */
 
@@ -232,7 +215,4 @@
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/statfs/statfs01.c b/testcases/kernel/syscalls/statfs/statfs01.c
index a4005c4..336ecb9 100644
--- a/testcases/kernel/syscalls/statfs/statfs01.c
+++ b/testcases/kernel/syscalls/statfs/statfs01.c
@@ -136,66 +136,48 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
 		Tst_count = 0;
 
-		/*
-		 * Call fstatfs(2)
-		 */
-#ifdef linux
-#define STATFSCALL statfs(fname, &stats)
-#else
-#define STATFSCALL statfs(fname, &stats, sizeof(struct statfs), 0)
-#endif
-
-		TEST(STATFSCALL);
+		/* Call fstatfs(2) */
+		TEST(statfs(fname, &stats));
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL,
-				 "statfs(%s, &stats, sizeof(struct statfs), 0) Failed, errno=%d : %s",
-				 fname, TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TERRNO, "statfs(%s, ..) failed",
+				fname);
 		} else {
 
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
+	     		/* 
+			 * only perform functional verification if flag set
+			 * (-f not given)
+			 */
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
-				tst_resm(TPASS,
-					 "statfs(%s, &stats, sizeof(struct statfs), 0) returned %ld",
+				tst_resm(TPASS, "statfs(%s, ..) returned %ld",
 					 fname, TEST_RETURN);
 			}
 		}
 
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
 
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -240,9 +222,5 @@
 	 */
 	TEST_CLEANUP;
 
-	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/statfs/statfs02.c b/testcases/kernel/syscalls/statfs/statfs02.c
index f4d2801..3428cd8 100644
--- a/testcases/kernel/syscalls/statfs/statfs02.c
+++ b/testcases/kernel/syscalls/statfs/statfs02.c
@@ -118,9 +118,8 @@
 	int i;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -156,9 +155,10 @@
 			}
 		}
 	}
+
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -208,9 +208,6 @@
 
 	TEST_CLEANUP;
 
-	/* delete the test directory created in setup() */
 	tst_rmdir();
 
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/statfs/statfs03.c b/testcases/kernel/syscalls/statfs/statfs03.c
index dc5ce38..b2b5b6f 100644
--- a/testcases/kernel/syscalls/statfs/statfs03.c
+++ b/testcases/kernel/syscalls/statfs/statfs03.c
@@ -57,7 +57,6 @@
 #include "usctest.h"
 #include <pwd.h>
 
-extern char *TESTDIR;
 char *TCID = "statfs03";
 int TST_TOTAL = 1;
 int fileHandle = 0;
@@ -80,9 +79,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -115,8 +113,9 @@
 			}
 		}
 	}
+
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }
 
@@ -126,6 +125,8 @@
 void setup()
 {
 
+	tst_require_root(NULL);
+
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
@@ -134,9 +135,9 @@
 
 	/* make a temporary directory and cd to it */
 	tst_tmpdir();
-	if (chmod(TESTDIR, S_IRWXU) == -1)
-		tst_brkm(TBROK, cleanup, "chmod(%s,700) failed; errno %d: %s",
-			 TESTDIR, errno, strerror(errno));
+	if (chmod(get_tst_tmpdir(), S_IRWXU) == -1)
+		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, 700) failed",
+			 get_tst_tmpdir());
 
 	/* create a test file */
 	sprintf(fname, "%s.%d", fname, getpid());
@@ -145,20 +146,16 @@
 	} else {
 		sprintf(path, "%s/%s", fname, fname);
 		if ((fileHandle = creat(path, 0444)) == -1) {
-			tst_resm(TFAIL, "creat (2) FAILED to creat temp file");
+			tst_brkm(TFAIL|TERRNO, "creat (2) FAILED to creat temp file");
 		}
 	}
 
-	/* Switch to nobody user for correct error code collection */
-	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
-	}
-
 	ltpuser = getpwnam(nobody_uid);
+	if (ltpuser == NULL)
+		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TINFO, "seteuid failed to "
+		tst_resm(TINFO|TERRNO, "seteuid failed to "
 			 "to set the effective uid to %d", ltpuser->pw_uid);
-		perror("seteuid");
 	}
 
 }
@@ -185,6 +182,4 @@
 	/* delete the test directory created in setup() */
 	tst_rmdir();
 
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/statvfs/statvfs01.c b/testcases/kernel/syscalls/statvfs/statvfs01.c
index c13f810..f11f762 100644
--- a/testcases/kernel/syscalls/statvfs/statvfs01.c
+++ b/testcases/kernel/syscalls/statvfs/statvfs01.c
@@ -61,7 +61,7 @@
 	char *msg;		/* message returned from parse_opts */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -78,12 +78,10 @@
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
-			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL|TERRNO, "statvfs(%s, ...) failed",
 			    TEST_PATH);
 		} else {
-			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TPASS, "statvfs - Basic sanity test,PASS");
+			tst_resm(TPASS, "statvfs(%s, ...) passed");
 		}
 
 	}			/* End for TEST_LOOPING */
@@ -100,7 +98,6 @@
 	tst_resm(TINFO, "file system max filename length = %lu", buf.f_namemax);
 
 	cleanup();
-
 	tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/stime/stime01.c b/testcases/kernel/syscalls/stime/stime01.c
index 7f53fc3..02161fc 100644
--- a/testcases/kernel/syscalls/stime/stime01.c
+++ b/testcases/kernel/syscalls/stime/stime01.c
@@ -99,11 +99,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -127,7 +131,7 @@
 		 * to as far as clock skew is concerned :P.
 		 */
 		if (gettimeofday(&real_time_tv, NULL) < 0) {
-			tst_brkm(TBROK|TERRNO, tst_exit,
+			tst_brkm(TBROK|TERRNO, NULL,
 				"failed to get current time via gettimeofday(2)");
 		}
 
@@ -207,7 +211,7 @@
 
 	/* Check that the test process id is super/root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit,
+		tst_brkm(TBROK, NULL,
 			"you must be root to execute this test!");
 	}
 
diff --git a/testcases/kernel/syscalls/stime/stime02.c b/testcases/kernel/syscalls/stime/stime02.c
index 5fbf5e7..baf3d1d 100644
--- a/testcases/kernel/syscalls/stime/stime02.c
+++ b/testcases/kernel/syscalls/stime/stime02.c
@@ -97,7 +97,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -140,7 +144,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -156,7 +160,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -172,7 +176,7 @@
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Get the system's new time */
 	new_time = curr_time + INCR_TIME;
diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
index 9b40d6e..436096c 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
@@ -97,9 +97,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -136,7 +142,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	/*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
@@ -147,7 +153,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c
index 530a93e..4c45cfc 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff02.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c
@@ -126,9 +126,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -188,7 +194,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/*End of main */
 
 /*
@@ -245,7 +251,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index 0322783..0c53f87 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -96,10 +96,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -131,10 +129,8 @@
 		}
 	}			/*End for TEST_LOOPING */
 
-	/*Clean up and exit */
 	cleanup();
-
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
@@ -146,7 +142,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Pause if that option was specified */
@@ -171,7 +167,7 @@
 	}
 
 	/*create file */
-	if (system("dd if=/dev/zero of=swapfile01 bs=1024  count=65536 >"
+	if (system("dd if=/dev/zero of=swapfile01 bs=1024 count=65536 >"
 		   " tmpfile 2>&1") != 0) {
 		tst_brkm(TBROK, cleanup, "Failed to create file for swap");
 	}
@@ -197,6 +193,4 @@
 	/* Remove tmp dir and all files inside it. */
 	tst_rmdir();
 
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/swapon/swapon02.c b/testcases/kernel/syscalls/swapon/swapon02.c
index 28ac3e1..0bec18d 100644
--- a/testcases/kernel/syscalls/swapon/swapon02.c
+++ b/testcases/kernel/syscalls/swapon/swapon02.c
@@ -143,10 +143,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
-	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	uname(&uval);
@@ -173,8 +171,7 @@
 			if (testcase[i].cleanfunc
 			    && testcase[i].cleanfunc() == -1) {
 				tst_brkm(TBROK, cleanup,
-					 "Cleanup failed,"
-					 " quitting the test");
+					 "Cleanup failed, quitting the test");
 			}
 			/* check return code */
 			if ((TEST_RETURN == -1)
@@ -210,10 +207,9 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 		}		/*End of TEST LOOPS */
 	}			/*End of TEST LOOPING */
-	/*Clean up and exit */
-	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	cleanup();
+	tst_exit();
 }				/*End of main */
 
 /*
@@ -272,9 +268,8 @@
 int cleanup01()
 {
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, cleanup, "seteuid failed to set uid to root");
-		perror("seteuid");
-		return -1;
+		tst_brkm(TBROK|TERRNO, cleanup,
+			"seteuid failed to set uid to root");
 	}
 
 	return 0;
@@ -368,7 +363,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* make a temp directory and cd to it */
@@ -403,7 +398,4 @@
 
 	/* Remove tmp dir and all files inside it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c
index f499c41..6f88bbe 100644
--- a/testcases/kernel/syscalls/swapon/swapon03.c
+++ b/testcases/kernel/syscalls/swapon/swapon03.c
@@ -110,11 +110,8 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-	/***************************************************************
-	 * parse standard options
-	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/***************************************************************
 	 * perform global setup for test
@@ -141,14 +138,13 @@
 
 		/* Check return code */
 		if ((TEST_RETURN == -1) && (TEST_ERRNO == expected_errno)) {
-			tst_resm(TPASS, "swapon(2) got expected failure;"
-				 " Got errno = %d," , expected_errno);
+			tst_resm(TPASS, "swapon(2) got expected failure (%d),",
+				expected_errno);
 		} else if (TEST_RETURN < 0) {
-			tst_resm(TFAIL, "swapon(2) failed to produce"
-				 " expected error: %d, got %d (%s)."
-				 " System reboot after execution of LTP"
-				 " test suite is recommended.", expected_errno,
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL|TTERRNO,
+				"swapon(2) failed to produce expected error "
+				"(%d). System reboot recommended.",
+				expected_errno);
 		} else {
 			/* Probably the system supports MAX_SWAPFILES > 30,
 			 * let's try with MAX_SWAPFILES == 32 */
@@ -159,10 +155,8 @@
 
 			/* Check return code (now we're expecting success) */
 			if (TEST_RETURN < 0) {
-				tst_resm(TFAIL,
-					 "swapon(2) got an unexpected failure;"
-					 " Got errno = %d : %s", TEST_ERRNO,
-					 strerror(TEST_ERRNO));
+				tst_resm(TFAIL|TTERRNO,
+					 "swapon(2) got an unexpected failure");
 			} else {
 				/* Call swapon sys call once again for 33
 				 * now we have to receive an error */
@@ -198,12 +192,8 @@
 
 	}			/* End of TEST LOOPING */
 
-	/***************************************************************
-	 * cleanup and exit
-	 ***************************************************************/
 	cleanup();
-
-	return (0);
+	tst_exit();
 
 }				/* End of main */
 
@@ -212,8 +202,8 @@
  ***************************************************************/
 int setup_swap()
 {
+	pid_t pid;
 	int j, fd;		/*j is loop counter, fd is file descriptor */
-	int pid;		/* used for fork */
 	int status;		/* used for fork */
 	int res = 0, pagesize = getpagesize();
 	int bs, count;
@@ -224,20 +214,21 @@
 	swapfiles = 0;
 
 	if (seteuid(0) < 0) {
-		tst_brkm(TFAIL | TERRNO, cleanup, "Failed to call seteuid");
+		tst_brkm(TFAIL|TERRNO, cleanup, "Failed to call seteuid");
 	}
 
 	/* This includes the first (header) line */
 	if ((fd = open("/proc/swaps", O_RDONLY)) == -1) {
-		tst_brkm(TFAIL | TERRNO, cleanup,
+		tst_brkm(TFAIL|TERRNO, cleanup,
 			 "Failed to find out existing number of swap files");
 	}
 	do {
 		char *p = buf;
 		res = read(fd, buf, BUFSIZ);
 		if (res < 0) {
-			tst_brkm(TFAIL | TERRNO, cleanup,
-				 "Failed to find out existing number of swap files");
+			tst_brkm(TFAIL|TERRNO, cleanup,
+				 "Failed to find out existing number of swap "
+				 "files");
 		}
 		buf[res] = '\0';
 		while ((p = strchr(p, '\n'))) {
@@ -250,7 +241,8 @@
 		swapfiles--;	/* don't count the /proc/swaps header */
 
 	if (swapfiles < 0) {
-		tst_brkm(TFAIL, cleanup, "Failed to find existing number of swapfiles");
+		tst_brkm(TFAIL, cleanup,
+			"Failed to find existing number of swapfiles");
 	}
 
 	/* Determine how many more files are to be created */
@@ -278,37 +270,36 @@
 
 			/* prepare filename for the iteration */
 			if (sprintf(filename, "swapfile%02d", j + 2) < 0) {
-				tst_brkm(TFAIL | TERRNO, cleanup,
-					 "sprintf() failed to create filename");
+				printf( "sprintf() failed to create "
+					"filename");
+				exit(1);
 			}
 
 			/* Create the swapfile */
 			if (create_swapfile(filename, bs, count) < 0) {
-				tst_brkm(TFAIL, cleanup,
-					 "Failed to create swapfile for the test");
+				printf("Failed to create swapfile");
+				exit(1);
 			}
 
 			/* turn on the swap file */
 			if ((res = syscall(__NR_swapon, filename, 0)) != 0) {
 				if (errno == EPERM) {
-					printf("Successfully created %d swapfiles\n", j);
+					printf(	"Successfully created %d "
+						"swapfiles\n", j);
 					break;
 				} else {
-					tst_brkm(TFAIL | TERRNO, cleanup,
-						 "Failed swapon for file %s", filename);
-					/* must cleanup already swapon files */
-					clean_swap();
+					printf( "Failed to create "
+						"swapfile: %s\n", filename);
 					exit(1);
 				}
 			}
 		}
-		tst_exit();
+		exit(0);
 	} else
 		waitpid(pid, &status, 0);
 
 	if (WEXITSTATUS(status)) {
-		tst_resm(TFAIL, "Failed to setup swaps");
-		exit(1);
+		tst_brkm(TFAIL, cleanup, "Failed to setup swaps");
 	}
 
 	/* Create all needed extra swapfiles for testing */
@@ -329,7 +320,6 @@
  ***************************************************************/
 int create_swapfile(char *swapfile, int bs, int count)
 {
-
 	char *cmd_buffer;
 	int rc = -1;
 
@@ -361,9 +351,7 @@
 		rc = 0;
 	}
 
-	if (cmd_buffer != NULL) {
-		free(cmd_buffer);
-	}
+	free(cmd_buffer);
 
 	return rc;
 }
@@ -441,9 +429,7 @@
 		} /* else nothing to clean up. */
 
 	}
-	if (cmd_buffer != NULL) {
-		free(cmd_buffer);
-	}
+	free(cmd_buffer);
 
 	return rc;
 
@@ -462,7 +448,7 @@
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* make a temp directory and cd to it */
diff --git a/testcases/kernel/syscalls/symlink/symlink01.c b/testcases/kernel/syscalls/symlink/symlink01.c
index fc9cebb..69d9e90 100644
--- a/testcases/kernel/syscalls/symlink/symlink01.c
+++ b/testcases/kernel/syscalls/symlink/symlink01.c
@@ -751,14 +751,14 @@
 	int ctr, to_go, size, whole_chunks;
 	char *cwd, *getcwd();
 
-	if ((cwd = getcwd((char *)NULL, 0)) == NULL) {
+	if ((cwd = getcwd(NULL, 0)) == NULL) {
 		TEST_RESULT = TBROK;
 		sprintf(test_msg,
 			"getcwd(3) Failure in setup of %s %s %s test case object elements",
 			path1, path2, path3);
 		return 0;
 	}
-	cwd = getcwd((char *)NULL, 0);
+	cwd = getcwd(NULL, 0);
 	size = strlen(cwd);
 
 	to_go = PATH_MAX - size;
@@ -1489,7 +1489,7 @@
 			strcat(expected_location, "/");
 			strcat(expected_location, tc_ptr->fn_arg[2]);
 
-			if ((cwd = getcwd((char *)NULL, 0)) == NULL)
+			if ((cwd = getcwd(NULL, 0)) == NULL)
 				tst_resm(TFAIL, "getcwd(3) FAILURE");
 			else if (strcmp(cwd, expected_location) == 0)
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
diff --git a/testcases/kernel/syscalls/symlink/symlink02.c b/testcases/kernel/syscalls/symlink/symlink02.c
index 6434612..d189210 100644
--- a/testcases/kernel/syscalls/symlink/symlink02.c
+++ b/testcases/kernel/syscalls/symlink/symlink02.c
@@ -138,7 +138,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/symlink/symlink03.c b/testcases/kernel/syscalls/symlink/symlink03.c
index e4bee83..6dfb611 100644
--- a/testcases/kernel/syscalls/symlink/symlink03.c
+++ b/testcases/kernel/syscalls/symlink/symlink03.c
@@ -159,11 +159,15 @@
 	int ind;		/* counter to test different test conditions */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Invoke setup function to call individual test setup functions
@@ -224,7 +228,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -249,7 +253,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
@@ -301,23 +305,23 @@
 
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
-	 /*NOTREACHED*/}
+	 }
 
 	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Modify mode permissions on test directory */
 	if (chmod(DIR_TEMP, FILE_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
@@ -333,18 +337,18 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE2, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	if (symlink(TEST_FILE2, SYM_FILE2) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "symlink() Fails to create %s in setup2, error=%d",
 			 SYM_FILE2, errno);
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
@@ -382,11 +386,11 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup, "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/symlink/symlink04.c b/testcases/kernel/syscalls/symlink/symlink04.c
index 0e809c7..af406c1 100644
--- a/testcases/kernel/syscalls/symlink/symlink04.c
+++ b/testcases/kernel/syscalls/symlink/symlink04.c
@@ -97,11 +97,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -140,7 +144,7 @@
 					tst_brkm(TFAIL, cleanup, "lstat(2) of "
 						 "%s failed, error:%d", SYMFILE,
 						 errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/* Check if the st_mode contains a link  */
 				if (!S_ISLNK(stat_buf.st_mode)) {
@@ -162,13 +166,13 @@
 			tst_brkm(TBROK, cleanup,
 				 "unlink(%s) Failed, errno=%d : %s",
 				 SYMFILE, errno, strerror(errno));
-		 /*NOTREACHED*/}
+		 }
 		Tst_count++;	/* incr TEST_LOOP counter */
 	}			/* End for TEST_LOOPING */
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -200,7 +204,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Close the temporary file created above */
 	if (close(fd) == -1) {
diff --git a/testcases/kernel/syscalls/symlink/symlink05.c b/testcases/kernel/syscalls/symlink/symlink05.c
index 4a49b1d..ea5673b 100644
--- a/testcases/kernel/syscalls/symlink/symlink05.c
+++ b/testcases/kernel/syscalls/symlink/symlink05.c
@@ -97,11 +97,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -141,7 +145,7 @@
 					tst_brkm(TFAIL, cleanup, "lstat(2) of "
 						 "%s failed, error:%d",
 						 SYMFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/* Check if the st_mode contains a link  */
 				if (!S_ISLNK(stat_buf.st_mode)) {
@@ -169,7 +173,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
index 93018e6..7035b80 100644
--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
@@ -151,7 +151,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/sync/sync01.c b/testcases/kernel/syscalls/sync/sync01.c
index 6c9a7ab..d210374 100644
--- a/testcases/kernel/syscalls/sync/sync01.c
+++ b/testcases/kernel/syscalls/sync/sync01.c
@@ -133,7 +133,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/sync/sync02.c b/testcases/kernel/syscalls/sync/sync02.c
index ceda82b..2794e66 100644
--- a/testcases/kernel/syscalls/sync/sync02.c
+++ b/testcases/kernel/syscalls/sync/sync02.c
@@ -97,10 +97,16 @@
 	char read_buffer[BUFSIZ];	/* buffer used to read data from file */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+	if (msg != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
 	if (msg != NULL) {
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	/* Perform global setup for test */
 	setup();
@@ -129,7 +135,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek() "
 						 "failed on %s, error=%d",
 						 TEMP_FILE, errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/* Read the contents of file */
 				if (read(fildes, read_buffer,
@@ -147,7 +153,7 @@
 					tst_brkm(TFAIL, cleanup,
 						 "read() Fails on %s, error=%d",
 						 TEMP_FILE, errno);
-				 /*NOTREACHED*/}
+				 }
 			} else {
 				tst_resm(TPASS, "call succeeded");
 			}
@@ -157,7 +163,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -191,7 +197,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR | O_CREAT, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Write the buffer data into file */
 	if (write(fildes, write_buffer, strlen(write_buffer) + 1) !=
@@ -199,7 +205,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "write() failed to write buffer data to %s",
 			 TEMP_FILE);
-	 /*NOTREACHED*/}
+	 }
 
 }				/* End setup() */
 
diff --git a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
index d60a115..ee75611 100644
--- a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
+++ b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
@@ -123,12 +123,11 @@
 	unsigned int flags;
 	int error;
 } test_data[] = {
-	{
-	&bfd, 0, 1, SYNC_FILE_RANGE_WRITE, EBADF}, {
-	&sfd, 0, 1, SYNC_FILE_RANGE_WAIT_AFTER, ESPIPE}, {
-	&filed, -1, 1, SYNC_FILE_RANGE_WAIT_BEFORE, EINVAL}, {
-	&filed, 0, -1, SYNC_FILE_RANGE_WRITE, EINVAL}, {
-	&filed, 0, 1, SYNC_FILE_RANGE_INVALID, EINVAL}
+	{ &bfd, 0, 1, SYNC_FILE_RANGE_WRITE, EBADF},
+	{ &sfd, 0, 1, SYNC_FILE_RANGE_WAIT_AFTER, ESPIPE},
+	{ &filed, -1, 1, SYNC_FILE_RANGE_WAIT_BEFORE, EINVAL},
+	{ &filed, 0, -1, SYNC_FILE_RANGE_WRITE, EINVAL},
+	{ &filed, 0, 1, SYNC_FILE_RANGE_INVALID, EINVAL}
 };
 
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
@@ -161,15 +160,11 @@
 
 	/* close the file we have open */
 	if (close(filed) == -1) {
-		tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", filename,
-			 errno, strerror(errno));
+		tst_resm(TWARN|TERRNO, "close(%s) failed", filename);
 	}
 
 	/* Remove tmp dir and all files in it */
 	tst_rmdir();
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }
 
 /* Local  Functions */
@@ -203,15 +198,11 @@
 
 	sprintf(filename, "tmpfile_%d", getpid());
 	if ((filed = open(filename, O_RDWR | O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
-			 filename, errno, strerror(errno));
-
+		tst_brkm(TBROK|TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", filename);
 	}
 
-	sfd = open(spl_file, O_RDWR | O_CREAT, 0700);
-
-	return;
+	sfd = open(spl_file, O_RDWR|O_CREAT, 0700);
 }
 
 /*****************************************************************************
@@ -258,71 +249,55 @@
 /*	     On success - exits with 0 exit value.			  */
 /*									    */
 /******************************************************************************/
-int main(int ac,		/* number of command line parameters		      */
-	 char **av)
-{				/* pointer to the array of the command line parameters.   */
+int main(int ac, char **av)
+{
 
 	int test_index = 0;
-	int lc;
 	char *msg;
 
- /***************************************************************
-	      parse standard options$
-  ********************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 #if defined(__powerpc__) || defined(__powerpc64__)	/* for PPC, kernel version > 2.6.21 needed */
 	if (tst_kvercmp(2, 16, 22) < 0) {
-		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
 	/* For other archs, need kernel version > 2.6.16 */
 
 	if (tst_kvercmp(2, 6, 17) < 0) {
-		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");
 	}
 #endif
 
-/* perform global test setup, call setup() function. */
 	setup();
 
-	for (lc = 0; TEST_LOOPING(lc); lc++) {
-		/* reset Tst_count in case we are looping. */
-		Tst_count = 0;
+	for (test_index = 0; test_index < TST_TOTAL; test_index++) {
+		TEST(syncfilerange
+		     (*(test_data[test_index].fd),
+		      test_data[test_index].offset,
+		      test_data[test_index].nbytes,
+		      test_data[test_index].flags));
 
-		for (test_index = 0; test_index < TST_TOTAL; test_index++) {
-			TEST(syncfilerange
-			     (*(test_data[test_index].fd),
-			      test_data[test_index].offset,
-			      test_data[test_index].nbytes,
-			      test_data[test_index].flags));
+		if (TEST_RETURN != -1) {
+			tst_resm(TFAIL,
+				"call succeeded unexpectedly (%ld != -1)",
+				TEST_RETURN);
+			continue;
+		}
 
-			if (TEST_RETURN != -1) {
-				tst_resm(TFAIL,
-					"call succeeded unexpectedly "
-					"(%ld != -1)", TEST_RETURN);
-				continue;
-			}
+		TEST_ERROR_LOG(TEST_ERRNO);
 
-			TEST_ERROR_LOG(TEST_ERRNO);
-
-			if (TEST_ERRNO == test_data[test_index].error) {
-				tst_resm(TPASS, "expected failure - "
-					 "errno = %d : %s", TEST_ERRNO,
-					 strerror(TEST_ERRNO));
-			} else {
-				tst_resm(TFAIL, "unexpected error - %d : %s - "
-					 "expected %d", TEST_ERRNO,
-					 strerror(TEST_ERRNO),
-					 test_data[test_index].error);
-			}
+		if (TEST_ERRNO == test_data[test_index].error) {
+			tst_resm(TPASS|TTERRNO, "got expected error");
+		} else {
+			tst_resm(TFAIL|TTERRNO, "got unexpected error; "
+				 "expected %d",
+				 test_data[test_index].error);
 		}
 
 	}
 
 	cleanup();
-	return 0;
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sysctl/sysctl01.c b/testcases/kernel/syscalls/sysctl/sysctl01.c
index be3398c..f2769ec 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl01.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl01.c
@@ -103,7 +103,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -157,7 +161,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sysctl/sysctl03.c b/testcases/kernel/syscalls/sysctl/sysctl03.c
index 6b0caf5..d82b14c 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl03.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl03.c
@@ -105,9 +105,9 @@
 	struct passwd *ltpuser;
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -192,7 +192,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
@@ -202,7 +202,7 @@
 {
 	/* test must be run as root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* capture signals */
diff --git a/testcases/kernel/syscalls/sysctl/sysctl04.c b/testcases/kernel/syscalls/sysctl/sysctl04.c
index 21996da..c7b3fa4 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl04.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl04.c
@@ -97,7 +97,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -138,7 +142,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sysctl/sysctl05.c b/testcases/kernel/syscalls/sysctl/sysctl05.c
index 9e8c6a0..eea7e66 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl05.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl05.c
@@ -109,7 +109,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();
@@ -156,7 +160,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 #else
diff --git a/testcases/kernel/syscalls/sysfs/sysfs01.c b/testcases/kernel/syscalls/sysfs/sysfs01.c
index 1245293..03dfe42 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs01.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs01.c
@@ -85,8 +85,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
diff --git a/testcases/kernel/syscalls/sysfs/sysfs02.c b/testcases/kernel/syscalls/sysfs/sysfs02.c
index d483764..ce378c1 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs02.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs02.c
@@ -84,8 +84,8 @@
 	char buf[40];		/* 40 bytes suffice to store fs name */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -118,7 +118,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /* setup() - performs all ONE TIME setup for this test */
diff --git a/testcases/kernel/syscalls/sysfs/sysfs03.c b/testcases/kernel/syscalls/sysfs/sysfs03.c
index 752c0ff..b377db9 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs03.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs03.c
@@ -83,8 +83,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
diff --git a/testcases/kernel/syscalls/sysfs/sysfs04.c b/testcases/kernel/syscalls/sysfs/sysfs04.c
index 89fc9a2..14f5efe 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs04.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs04.c
@@ -88,8 +88,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
diff --git a/testcases/kernel/syscalls/sysfs/sysfs05.c b/testcases/kernel/syscalls/sysfs/sysfs05.c
index f11cd56..82d97d1 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs05.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs05.c
@@ -101,8 +101,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
diff --git a/testcases/kernel/syscalls/sysfs/sysfs06.c b/testcases/kernel/syscalls/sysfs/sysfs06.c
index 972e8df..2ede25d 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs06.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs06.c
@@ -104,8 +104,8 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != NULL)
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo01.c b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
index 38a64a9..cbdfbf0 100644
--- a/testcases/kernel/syscalls/sysinfo/sysinfo01.c
+++ b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
@@ -93,8 +93,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* Global setup */
 
@@ -110,7 +114,7 @@
 			/* To gather stats on errnos returned, log the errno */
 			tst_brkm(TFAIL, cleanup, "sysinfo() Failed, errno=%d"
 				 " : %s", TEST_ERRNO, strerror(TEST_ERRNO));
-		 /*NOTREACHED*/} else {
+		 } else {
 			/* Test succeeded */
 
 			/* This portion of the code generates information
@@ -153,7 +157,7 @@
 	}
 
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo02.c b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
index cad5c6e..ffa80a9 100644
--- a/testcases/kernel/syscalls/sysinfo/sysinfo02.c
+++ b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
@@ -92,8 +92,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* Global setup */
 
@@ -113,10 +117,10 @@
 			/* Test Failed */
 			tst_brkm(TFAIL, cleanup, "sysinfo() Failed, Expected -1"
 				 "returned %d/n", TEST_ERRNO);
-		 /*NOTREACHED*/}
+		 }
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/syslog/Makefile b/testcases/kernel/syscalls/syslog/Makefile
index eda3f38..a1d1ea8 100644
--- a/testcases/kernel/syscalls/syslog/Makefile
+++ b/testcases/kernel/syscalls/syslog/Makefile
@@ -20,8 +20,7 @@
 
 include $(top_srcdir)/include/mk/testcases.mk
 
-# Not all of the files are bourne shell scripts; hence, I removed the syslog*
-# glob to avoid overridden target command noise from make.
-INSTALL_TARGETS		:= syslog0* syslog10
+# Not all of the syslog* files are bourne shell scripts.
+INSTALL_TARGETS		:= syslog0* syslog10 syslog-lib.sh
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/syscalls/syslog/syslog-lib.sh b/testcases/kernel/syscalls/syslog/syslog-lib.sh
new file mode 100755
index 0000000..91a2e62
--- /dev/null
+++ b/testcases/kernel/syscalls/syslog/syslog-lib.sh
@@ -0,0 +1,164 @@
+#! /bin/sh
+#
+#  Copyright (c) Linux Test Project, 2010 
+#
+#  This program is free software;  you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY;  without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+#  the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program;  if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+##################################################################
+
+readonly MAILLOG=/var/log/maillog
+
+# Signals to trap.
+readonly TRAP_SIGS="1 2 3 6 11 15"
+
+# configuration file for syslog or syslog-ng
+CONFIG_FILE=""
+
+# rsyslogd .conf specific args.
+RSYSLOG_CONFIG=
+
+# Command for syslog daemon.
+SYSLOG_COMMAND=
+
+# Args to pass to $SYSLOG_COMMAND when restarting the daemon.
+SYSLOG_RESTART_COMMAND_ARGS=
+
+# number of seconds to wait for another syslog test to complete
+WAIT_COUNT=60
+
+cleanup()
+{
+	# Reentrant cleanup -> bad. Especially since rsyslogd on Fedora 13
+	# seems to get stuck FOREVER when not running as root. Lame...
+	disable_traps
+	exit_code=$1
+
+	# Restore the previous syslog daemon state.
+	if [ -f "$CONFIG_FILE.ltpback" ]; then
+		if mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"; then
+			# Make sure that restart_syslog_daemon doesn't loop
+			# back to cleanup again.
+			restart_syslog_daemon "return 1"
+			# Maintain any nonzero exit codes
+			if [ $exit_code -ne $? ]; then
+				exit_code=1
+			fi
+		else
+			exit_code=1
+		fi
+	fi
+
+	exit $exit_code
+}
+
+setup()
+{
+	is_root || exit 1
+
+	trap '	disable_traps
+		tst_resm TBROK "Testing is terminating due to a signal"
+		cleanup 1' $TRAP_SIGS || exit 1
+
+	# Check to see if syslogd or syslog-ng exists
+	if [ -e /sbin/syslogd ]; then
+		CONFIG_FILE="/etc/syslog.conf"
+		SYSLOG_INIT_SCRIPT="/etc/init.d/sysklogd"
+	elif command -v syslog-ng >/dev/null 2>&1; then
+		CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
+		SYSLOG_INIT_SCRIPT="/etc/init.d/syslog-ng"
+	elif command -v rsyslogd >/dev/null 2>&1; then
+		CONFIG_FILE="/etc/rsyslog.conf"
+		SYSLOG_INIT_SCRIPT="/etc/init.d/rsyslog"
+		RSYSLOG_CONFIG='$ModLoad imuxsock.so'
+	#elif <detect-upstart-jobfile-here>; then
+		# TODO: upstart
+	else
+		tst_resm TCONF "couldn't find syslogd, syslog-ng, or rsyslogd"
+		cleanup	0
+	fi
+
+	if [ -z "$SYSLOG_INIT_SCRIPT" ]; then
+		# TODO: upstart
+		:
+	else
+		# Fallback to /etc/init.d/syslog if $SYSLOG_INIT_SCRIPT
+		# doesn't exist.
+		for SYSLOG_INIT_SCRIPT in "$SYSLOG_INIT_SCRIPT" "/etc/init.d/syslog"; do 
+			if [ -x "$SYSLOG_INIT_SCRIPT" ]; then
+				break
+			fi
+		done
+		if [ ! -x "$SYSLOG_INIT_SCRIPT" ]; then
+			tst_resm TBROK "$SYSLOG_INIT_SCRIPT - no such script"
+			cleanup 1
+		fi
+
+		SYSLOG_COMMAND=$SYSLOG_INIT_SCRIPT
+		SYSLOG_RESTART_COMMAND_ARGS=restart
+	fi
+
+	# Back up configuration file
+	if [ -f "$CONFIG_FILE" ]; then
+		# Pause if another LTP syslog test is running
+		while [ -f "$CONFIG_FILE.ltpback" -a $WAIT_COUNT -gt 0 ]; do
+			: $(( WAIT_COUNT -= 1 ))
+			sleep 1
+		done
+		# Oops -- $CONFIG_FILE.ltpback is still there!
+		if [ $WAIT_COUNT -eq 0 ]; then
+			tst_resm TBROK "another syslog test is stuck"
+			cleanup 1
+		elif ! cp "$CONFIG_FILE" "$CONFIG_FILE.ltpback"; then
+			tst_resm TBROK "failed to backup $CONFIG_FILE"
+			cleanup 1
+		fi
+	else
+		tst_resm TBROK "$CONFIG_FILE not found!"
+	fi
+
+}
+
+disable_traps()
+{
+	trap - $TRAP_SIGS
+}
+
+# For most cases this isn't exotic. If you're running upstart however, you
+# might have fun here :).
+restart_syslog_daemon()
+{
+	# Default to running `cleanup 1' when dealing with error cases.
+	if [ $# -eq 0 ]; then
+		cleanup_command="cleanup 1"
+	else
+		cleanup_command=$1
+	fi
+
+	tst_resm TINFO "restarting syslog daemon via $SYSLOG_COMMAND $SYSLOG_RESTART_COMMAND_ARGS"
+
+	if $SYSLOG_COMMAND $SYSLOG_RESTART_COMMAND_ARGS >/dev/null 2>&1; then
+		# XXX: this really shouldn't exist; if *syslogd isn't ready
+		# once the restart directive has been issued, then it needs to
+		# be fixed.
+		sleep 2
+	else
+		$cleanup_command
+	fi
+}
+
+export TST_TOTAL=${TST_TOTAL:=1}
+export TST_COUNT=1
+export TCID=${TCID:="$(basename "$0")"}
+. cmdlib.sh
diff --git a/testcases/kernel/syscalls/syslog/syslog01 b/testcases/kernel/syscalls/syslog/syslog01
index 177700a..eda2ec7 100755
--- a/testcases/kernel/syscalls/syslog/syslog01
+++ b/testcases/kernel/syscalls/syslog/syslog01
@@ -17,186 +17,84 @@
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 #  02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#            fixed bugs.
+#			fixed bugs.
 #  07/26/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#            Made changes to account for the replacement of syslogd
-#            with syslog-ng
+#			Made changes to account for the replacement of syslogd
+#			with syslog-ng
 #
 ##################################################################
 # case1: Test whether messages are logged to the specified file  #
-#        in the configuration file.                              #
-#                                                                #
-#        Send messages to syslogd at some level and facility     #
-#        and grep for those messages.                            #
-#                                                                #
-# syslog.conf should contain:                                    #
-#        *.crit           /usr/adm/critical                      #
-#         mail.info        /usr/spool/adm/syslog                 #
+# in the configuration file.					 #
+#								 #
+# Send messages to syslogd at some level and facility	 	 #
+# and grep for those messages.					 #
+#								 #
+# syslog.conf should contain:					 #
+# *.crit		/usr/adm/critical			 #
+# mail.info		/usr/spool/adm/syslog			 #
 ##################################################################
 
-#number of seconds to wait for another syslog test to complete
-wait_count=60
-
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-    if [ $status_flag -eq 0 ]
-    then
-        tst_resm TPASS "success in generating messages"
-    else
-        tst_resm TFAIL "failed to generate messages"
-    fi
-
-    #Restore syslog.conf
-    [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-    #Restart syslog
-    [ -x "$syslog_cmd" ] && {
-        tst_resm TINFO "restart $syslog_cmd"
-        "$syslog_cmd" restart 2>&1 1>/dev/null
-    }
-
-    sleep 2
-
-    exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case1()
 {
+	tst_resm TINFO "testing whether messages are logged into log file"
 
-    RC=0
-    RSYSLOG_CONFIG=""
-    #set the trap to handle signals.
-    trap '
-        tst_resm TBROK "Testing is terminating due to a signal"
-        status_flag=1
-        cleanup
-    ' 1 2 3 6 11 15
+	# Create the configuration file specific to this test case.
 
-    tst_resm TINFO  "syslog: Testing whether messages are logged into log file"
-    echo
+	case "$CONFIG_FILE" in
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "*.crit		/var/log/messages" >> $CONFIG_FILE
+		echo "mail.info	$MAILLOG" >> $CONFIG_FILE
+		;;
 
-    #check to see if syslogd or syslog-ng exists
-    if [ -e /sbin/syslogd  ]
-    then
-        CONFIG_FILE="/etc/syslog.conf"
-        syslog_cmd="/etc/init.d/sysklogd"
-    elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-        CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-        syslog_cmd="/etc/init.d/syslog-ng"
-    elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-        CONFIG_FILE="/etc/rsyslog.conf"
-        syslog_cmd="/etc/init.d/rsyslog"
-        RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-    else
-        tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-        status_flag=0
-        cleanup    
-    fi
-    [ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
+		      udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo "# Added for syslog testcase"  >> $CONFIG_FILE
+		echo "filter f_syslog	 { level(crit);};" >> $CONFIG_FILE
+		echo "filter f_syslogMail { level(info)	and facility(mail); };" >> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog); destination(syslog-messages); };" >> $CONFIG_FILE
+		echo "destination syslog-mail { file(\"$MAILLOG\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslogMail); destination(syslog-mail); };"  >> $CONFIG_FILE
+		;;
+	esac
 
-    #Back up configuration file
-    if [ ! -e $CONFIG_FILE ]
-    then
-        tst_resm TBROK  "$CONFIG_FILE not found!"
-    else
-    #Pause if another LTP syslog test is running
-        while [ -e $CONFIG_FILE.ltpback ]
-        do
-            if [ $(( wait_count-- )) -gt 0 ]
-            then
-                sleep 1
-            else
-                tst_resm TBROK "Another syslog test appears to be stuck, could not run"
-                status_flag=1
-                exit $status_flag
-            fi
-        done
-        cp $CONFIG_FILE $CONFIG_FILE.ltpback
-    fi
+	restart_syslog_daemon
 
-    echo "Running tests"
+	# check if $MAILLOG script exists
+	if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" -a ! -e $MAILLOG ]; then
+		tst_resm TBROK "$MAILLOG no such log file"
+		cleanup 1
+	fi
 
-    # check if /etc/init/syslog script exists
-    if ! [ -e "$syslog_cmd" ]
-    then
-        tst_resm TBROK "/etc/init.d/syslog no such script"
-        status_flag=1
-        cleanup
-    fi
+	# Grepping pattern has to be changed whenever the executable name
+	# changes, ex: syslogtst executable.
+	# This check is neccessary for syslog-ng because $MAILLOG is
+	# only created after syslogtst
+	if [ -e "$MAILLOG" ]; then
+		oldvalue1=`grep -c "syslogtst: mail info test" $MAILLOG`
+	else
+		oldvalue1=0
+	fi
 
-    # Create the configuration file specific to this test case.
+	# Call syslogtst executable with case number as argument
+	if syslogtst 1 2>/dev/null; then
 
-    case "$CONFIG_FILE" in
-    /etc/syslog.conf|/etc/rsyslog.conf)
-        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-        echo "*.crit        /var/log/messages" >>  $CONFIG_FILE
-        echo "mail.info    /var/log/maillog" >>  $CONFIG_FILE
-        ;;
+		sleep 2
 
-    /etc/syslog-ng/syslog-ng.conf)
-        echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-            udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-        echo " " >> $CONFIG_FILE
-        echo " " >> $CONFIG_FILE
-        echo "# Added for syslog testcase"  >> $CONFIG_FILE
-        echo "filter f_syslog     { level(crit);};" >> $CONFIG_FILE
-        echo "filter f_syslogMail { level(info)      and facility(mail); };"\
-            >> $CONFIG_FILE
-        echo "destination syslog-messages { file(\"/var/log/messages\");};"\
-            >> $CONFIG_FILE
-        echo "log { source(src); filter(f_syslog); destination(syslog-messages);\
-            };" >> $CONFIG_FILE
-        echo "destination syslog-mail { file(\"/var/log/maillog\");};" \
-            >> $CONFIG_FILE
-        echo "log { source(src); filter(f_syslogMail); destination(syslog-mail);\
-            };"  >> $CONFIG_FILE
-        ;;
-    esac
+		newvalue1=`grep -c "syslogtst: mail info test" $MAILLOG`
+		if [ "x$(( $newvalue1 - $oldvalue1 ))" != "x1" ]; then
+			status_flag=1
+		fi
+	else
+		status_flag=1
+	fi
 
-    #Restart syslog
-    $syslog_cmd restart 2>&1 1>/dev/null
-    sleep 2
-    
-
-    # check if /var/log/maillog script exists
-    if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" ] && ! [ -e /var/log/maillog ]
-    then
-        tst_resm TBROK "/var/log/maillog no such log file"
-        status_flag=1
-        cleanup
-    fi
-
-    # Grepping pattern has to be changed whenever the executable name
-    # changes, ex: syslogtst executable.
-    # This check is neccessary for syslog-ng because /var/log/maillog is
-    # only created after syslogtst
-    if [ -e /var/log/maillog ]; then
-        oldvalue1=`grep -c "syslogtst: mail info test" /var/log/maillog`
-    else
-        oldvalue1=0
-    fi
-
-    # Call syslogtst executable with case number as argument
-    syslogtst 1 2>/dev/null
-    if [ $? -ne 0 ]; then
-        status_flag=1
-        return
-    fi
-    sleep 2
-
-    newvalue1=`grep -c "syslogtst: mail info test" /var/log/maillog`
-    diff=$(( $newvalue1 - $oldvalue1 ))
-    if [ $diff -ne 1 ]; then
-        status_flag=1
-    fi
 }
 
 export TST_TOTAL=1
@@ -206,8 +104,6 @@
 tst_resm TINFO "Send messages to syslogd at some level "
 tst_resm TINFO "and facility and grep for those messages."
 
-status_flag=0
-
-
+setup
 syslog_case1
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog02 b/testcases/kernel/syscalls/syslog/syslog02
index 9a4814f..30be60d 100755
--- a/testcases/kernel/syscalls/syslog/syslog02
+++ b/testcases/kernel/syscalls/syslog/syslog02
@@ -18,204 +18,100 @@
 
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#		   fixed bugs.
 # 07/26/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#           Made changes to account for the replacement of syslogd
-#           with syslog-ng
+#		   Made changes to account for the replacement of syslogd
+#		   with syslog-ng
 #
 ##################################################################
-# case2: Test if messages of all levels are logged.              #
-#        For each level, a seperate configuration file is        #
-#        created and that will be used as syslog.conf file.      #
+# case2: Test if messages of all levels are logged.
+#	For each level, a separate configuration file is
+#	created and that will be used as syslog.conf file.
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
-#set -x
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
 
-#Command for syslog or syslog-ng
-syslog_cmd=""
+# Number of levels.
+export TST_TOTAL=8
 
-cleanup()
-{
-    if [ $status_flag -eq 0 ]
-    then
-        tst_resm TPASS "messages of all levels are logged"
-    else
-        tst_resm TFAIL "failed to log messages of all levels."
-    fi
-
-    #Restore syslog.conf
-    [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-    #Restart syslog
-    [ -x "$syslog_cmd" ] && {
-        tst_resm TINFO "restart $syslog_cmd"
-        "$syslog_cmd" restart 2>&1 1>/dev/null
-    }
-
-    sleep 2
-
-    exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case2()
 {
-    RSYSLOG_CONFIG=""
-    #set the trap to handle signals.
-    trap '
-        tst_resm TBROK "Testing is terminating due to a signal"
-        status_flag=1
-        cleanup
-    ' 1 2 3 6 11 15
+	RSYSLOG_CONFIG=""
 
-    echo
-    tst_resm TINFO  "syslog: Testing the messages of all levels"
+	level_no=0
+	levels="emerg alert crit err warning notice info debug"
+	tst_resm TINFO "testing whether messages are logged into log file"
 
-    level_no=0
-    level="emerg alert crit err warning notice info debug"
-    tst_resm TINFO  "syslog: Testing whether messages are logged into log file"
-    echo
+	for level in $levels
+	do
+		tst_resm TINFO "Doing level: $level..."
 
-    #check to see if syslogd or syslog-ng exists
-    if [ -e /sbin/syslogd  ]
-    then
-        CONFIG_FILE="/etc/syslog.conf"
-        syslog_cmd="/etc/init.d/sysklogd"
-    elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-    then
-        CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-        syslog_cmd="/etc/init.d/syslog-ng"
-    elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-    then
-        CONFIG_FILE="/etc/rsyslog.conf"
-        syslog_cmd="/etc/init.d/rsyslog"
-        RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-    else
-        tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-        status_flag=0
-        cleanup    
-    fi
-    [ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
+		case "$CONFIG_FILE" in
+		/etc/syslog.conf|/etc/rsyslog.conf)
+			# Create the configuration file specific to this level
+			echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+			echo "mail.$level	$MAILLOG" >> $CONFIG_FILE
+			;;
 
-    #Back up configuration file
-    if [ ! -e $CONFIG_FILE ]
-    then
-        tst_resm TBROK  "$CONFIG_FILE not found!"
-    else
-        #Pause if another LTP syslog test is running
-        while [ -e $CONFIG_FILE.ltpback ]
-        do
-            : $(( wait_count -= 1 ))
-            if [ $wait_count -gt 0 ]
-            then
-                sleep 1
-            else
-                tst_resm TBROK "Another syslog test appears to be stuck; could not run"
-                   status_flag=1
-                exit $status_flag
-            fi
-        done
-        cp $CONFIG_FILE $CONFIG_FILE.ltpback
-    fi
+		/etc/syslog-ng/syslog-ng.conf)
+			echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+			echo "filter f_syslog_$level { level($level) and facility(mail); };"  >> $CONFIG_FILE
+			echo "destination syslog-$level { file(\"$MAILLOG\"); };"  >> $CONFIG_FILE
+			echo "log { source(src); filter(f_syslog_$level); destination(syslog-$level); };"  >> $CONFIG_FILE;;
+		esac
 
-    echo "Running tests"
+		restart_syslog_daemon
 
-    # check if /etc/init/syslog script exists
-    if ! [ -e "$syslog_cmd" ]
-    then
-        tst_resm TBROK "/etc/init.d/syslog no such script"
-        status_flag=1
-        cleanup
-    fi
-    
-    for current in $level
-    do
-        tst_resm TINFO "Doing level: $current..."
+		# Grepping pattern is as follows:
+		# syslogtst: mail $level test.
+		# check if $MAILLOG script exists
+		if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" -a ! -e $MAILLOG ]; then
+			tst_resm TBROK "$MAILLOG no such log file"
+			cleanup 1
+		fi
 
 
-        case "$CONFIG_FILE" in
-        /etc/syslog.conf|/etc/rsyslog.conf)
-            # Create the configuration file specific to this level
-            echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-            echo "mail.$current    /var/log/maillog" >> $CONFIG_FILE;;
-        /etc/syslog-ng/syslog-ng.conf)
-            echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-                  udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-            echo "filter f_syslog_$current { level($current)      and \
-                  facility(mail); };"  >> $CONFIG_FILE
-            echo "destination syslog-$current { file(\"/var/log/maillog\");\
-                  };"  >> $CONFIG_FILE
-            echo "log { source(src); filter(f_syslog_$current); \
-                  destination(syslog-$current); };"  >> $CONFIG_FILE;;
-        esac
+		# Grepping pattern has to be changed whenever the executable name
+		# changes, ex: syslogtst executable.
+		# This check is neccessary for syslog-ng because $MAILLOG is
+		# only created after syslogtst
+		if [ -e "$MAILLOG" ]; then
+			oldvalue=`grep -c "syslogtst: mail $level test\." $MAILLOG`
+		else
+			oldvalue1=0
+		fi
 
-        #Restart syslog
-        $syslog_cmd restart 2>&1 1>/dev/null
+		# syslogtst has to be called with additional level argument(0-7)
+		if ! syslogtst 2 $level_no 2>/dev/null; then
+			cleanup 1
+		fi
+		sleep 2
 
-        sleep 2
+		# check if $MAILLOG script exists
+		if [ ! -e "$MAILLOG" ]; then
+			tst_resm TBROK "$MAILLOG no such log file"
+			cleanup 1
+		fi
 
-        # Grepping pattern is as follows:
-        # syslogtst: mail $current test.
-        # check if /var/log/maillog script exists
-        if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" ] && ! [ -e /var/log/maillog ]
-        then
-            tst_resm TBROK "/var/log/maillog no such log file"
-            status_flag=1
-            cleanup
-        fi
+		newvalue=`grep -c "syslogtst: mail $level test" $MAILLOG`
+		diff=$(( $newvalue - $oldvalue ))
+		if [ $diff -eq 0 ]; then
+			tst_resm TFAIL "***** Level $level failed *****"
+			status_flag=1
+		elif [ $diff -ge 1 ]; then
+			tst_resm TPASS "***** Level $level passed *****"
+		fi
+		# Increment the level_no for next level...
+		: $(( level_no += 1 ))
 
-
-        # Grepping pattern has to be changed whenever the executable name
-        # changes, ex: syslogtst executable.
-        # This check is neccessary for syslog-ng because /var/log/maillog is
-        # only created after syslogtst
-        if [ -e /var/log/maillog ]; then
-            oldvalue=`grep -c "syslogtst: mail $current test." /var/log/maillog`
-        else
-            oldvalue1=0
-        fi
-
-        # syslogtst has to be called with additional level argument(0-7)
-        syslogtst 2 $level_no 2>/dev/null
-        if [ $? -ne 0 ]; then
-            status_flag=1
-            return
-        fi
-        sleep 2
-
-        # check if /var/log/maillog script exists
-        if ! [ -e /var/log/maillog ]
-        then
-            tst_resm TBROK "/var/log/maillog no such log file"
-            status_flag=1
-            cleanup
-        fi
-
-        newvalue=`grep -c "syslogtst: mail $current test" /var/log/maillog`
-        diff=$(( $newvalue - $oldvalue ))
-        if [ $diff -eq 0 ]; then
-            status_flag=1
-            tst_resm TINFO "***** Level $current failed *****"
-        elif [ $diff -ge 1 ]; then
-            tst_resm TINFO "***** Level $current passed *****"
-        fi
-        # Increment the level_no for next level...
-        : $(( level_no += 1 ))
-    done
+		tst_count_incr
+	done
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
 tst_resm TINFO "Test if messages of all levels are logged."
 tst_resm TINFO "For each level, a separate configuration file is"
 tst_resm TINFO "created and that will be used as syslog.conf file."
 
-
+setup
 syslog_case2
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog03 b/testcases/kernel/syscalls/syslog/syslog03
index 2d3d7b8..8439bd3 100755
--- a/testcases/kernel/syscalls/syslog/syslog03
+++ b/testcases/kernel/syscalls/syslog/syslog03
@@ -18,183 +18,70 @@
 
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#			fixed bugs.
 # 07/27/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#           Made changes to account for the replacement of syslogd
-#           with syslog-ng on SLES
+#		Made changes to account for the replacement of syslogd
+#		with syslog-ng on SLES
 #
 ##################################################################
-# case 3: Do openlog(), log the messages and see whether         #
-#          ident string is prepended to the mesage.              #
-#                                                                #
-# syslog.conf should contain:                                    #
-#        *.crit           /usr/adm/critical                      #
-#         daemon.info        /usr/spool/adm/syslog               #
+# case 3: Do openlog(), log the messages and see whether			#
+# ident string is prepended to the message.			 #
+#								 #
+# syslog.conf should contain:					 #
+# *.crit		/usr/adm/critical			 #
+# daemon.info		/usr/spool/adm/syslog			 #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-    if [ $status_flag -eq 0 ]
-    then
-        tst_resm TPASS "ident string is prepended to the message."
-    else
-        tst_resm TFAIL "ident string is not prepended to the message."
-    fi
-
-    #Restore syslog.conf
-    [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-    #Restart syslog
-    [ -x "$syslog_cmd" ] && {
-        tst_resm TINFO "restart $syslog_cmd"
-        "$syslog_cmd" restart 2>&1 1>/dev/null
-    }
-sleep 2
-
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case3()
 {
-    RSYSLOG_CONFIG=""
-    #set the trap to handle signals.
-    trap '
-        tst_resm TBROK "Testing is terminating due to a signal"
-        status_flag=1
-        cleanup
-    ' 1 2 3 6 11 15
+	# Create the configuration file specific to this test case.
+	case "$CONFIG_FILE" in
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "daemon.info	/var/log/messages" >> $CONFIG_FILE
+		;;
 
-    tst_resm TINFO  "syslog: Testing openlog() with ident strings"
-    
-    # check if syslogd command exits.
-    echo
-    
-    #check to see if syslogd or syslog-ng exists
-    if [ -e /sbin/syslogd  ]
-    then
-        CONFIG_FILE="/etc/syslog.conf"
-        syslog_cmd="/etc/init.d/sysklogd"
-    elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-        CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-        syslog_cmd="/etc/init.d/syslog-ng"
-    elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-        CONFIG_FILE="/etc/rsyslog.conf"
-        syslog_cmd="/etc/init.d/rsyslog"
-        RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-    else
-        tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-        status_flag=0
-        cleanup    
-    fi
-    [ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo "# Added for syslog testcase"  >> $CONFIG_FILE
+		echo "filter f_syslog_daemon { level(info) and facility(daemon); }; " >> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_daemon); destination(syslog-messages);};"  >> $CONFIG_FILE
+		;;
+	esac
 
-    #Back up configuration file
-    if [ ! -e $CONFIG_FILE ]
-    then
-        tst_resm TBROK  "$CONFIG_FILE not found!"
-    else
-    #Pause if another LTP syslog test is running
-        while [ -e $CONFIG_FILE.ltpback ]
-        do
-            : $(( wait_count -= 1 ))
-            if [ $wait_count -gt 0 ]
-            then
-                sleep 1
-            else
-                tst_resm TBROK "Another syslog test appears to be stuck, could not run"
-                status_flag=1
-                exit $status_flag
-            fi
-        done
-        cp $CONFIG_FILE $CONFIG_FILE.ltpback
-    fi
+	restart_syslog_daemon
 
-    echo "Running tests"
-    
-    # check if /etc/init/syslog script exists
-    if ! [ -e "$syslog_cmd" ]
-    then
-        tst_resm TBROK "/etc/init.d/syslog no such script"
-        status_flag=1
-        cleanup
-    fi
+	# Grep for the ident prefix: SYSLOG_CASE3 in the log file.
+	if [ -e /var/log/messages ]; then
+		oldvalue4=`grep -c "SYSLOG_CASE3" /var/log/messages`
+	else
+		oldvalue4=0
+	fi
 
-    
-    # Create the configuration file specific to this test case.
-    case "$CONFIG_FILE" in
-    /etc/syslog.conf|/etc/rsyslog.conf)
-        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-        echo "daemon.info      /var/log/messages" >> $CONFIG_FILE
-        ;;
+	if ! syslogtst 3 2>/dev/null; then
+		cleanup 1
+	fi
+	sleep 2
 
-    /etc/syslog-ng/syslog-ng.conf)
-        echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-          udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-        echo " " >> $CONFIG_FILE
-        echo "# Added for syslog testcase"  >> $CONFIG_FILE
-        echo "filter f_syslog_daemon { level(info)      and facility(daemon); }\
-          ;" >> $CONFIG_FILE
-        echo "destination syslog-messages { file(\"/var/log/messages\");};"\
-          >> $CONFIG_FILE
-        echo "log { source(src); filter(f_syslog_daemon); \
-          destination(syslog-messages);};"  >> $CONFIG_FILE
-        ;;
-    esac
+	# check if /var/log/messages exists
+	if [ ! -e /var/log/messages ]; then
+		tst_resm TBROK "/var/log/messages no such log file"
+		cleanup 1
+	fi
 
-    #Restart syslog
-    $syslog_cmd restart 2>&1 1>/dev/null
-
-    # Grep for the ident prefix: SYSLOG_CASE3 in the log file.
-    if [ -e /var/log/messages ]; then
-        oldvalue4=`grep -c "SYSLOG_CASE3" /var/log/messages`
-    else
-        oldvalue4=0
-    fi
-
-
-    syslogtst 3 2>/dev/null
-    if [ $? -ne 0 ]; then
-        status_flag=1
-        return
-    fi
-    sleep 2
-
-
-    # check if /var/log/messages script exists
-    if ! [ -e /var/log/messages ]
-    then
-        tst_resm TBROK "/var/log/messages no such log file"
-        status_flag=1
-        cleanup
-    fi
-
-    newvalue4=`grep -c "SYSLOG_CASE3" /var/log/messages`
-    diff=$(( $newvalue4 - $oldvalue4 ))
-    if [ $diff -ne 1 ]; then
-        status_flag=1
-    fi
+	newvalue4=`grep -c "SYSLOG_CASE3" /var/log/messages`
+	if [ "x$(( $newvalue4 - $oldvalue4 ))" != 1 ]; then
+		status_flag=1
+	fi
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO "Do openlog(), log the messages and see whether"
 tst_resm TINFO "ident string is prepended to the message."
 
+setup
 syslog_case3
-cleanup
-
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog04 b/testcases/kernel/syscalls/syslog/syslog04
index d5ae04a..f8e809d 100755
--- a/testcases/kernel/syscalls/syslog/syslog04
+++ b/testcases/kernel/syscalls/syslog/syslog04
@@ -29,165 +29,56 @@
 #        Do openlog() with LOG_PID option and see whether pid    #
 #        is logged with message.                                 #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
+. syslog-lib.sh || exit 1
 
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-if [ $status_flag -eq 0 ]
-then
-	tst_resm TPASS "pid is logged with message."
-else
-	tst_resm TFAIL "pid is not logged with message."
-fi
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
-sleep 2
-
-exit $status_flag
-}
 syslog_case4()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-			tst_resm TBROK "Testing is terminating due to a signal"
-			status_flag=1
-			cleanup
-	' 1 2 3 6 11 15
+	tst_resm TINFO "Testing the log option: LOG_PID..."
 
-	tst_resm TINFO "syslog: Testing the log option: LOG_PID..."
-
-#check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-#Back up configuration file
-        if [ ! -e $CONFIG_FILE ]
-        then
-	   tst_resm TBROK  "$CONFIG_FILE not found!"
-        else
-#Pause if another LTP syslog test is running
-           while [ -e $CONFIG_FILE.ltpback ]
-             do
-               if [ $(( wait_count-- )) -gt 0 ]
-               then
-                 sleep 1
-               else
-	        tst_resm TBROK "Another syslog test appears to be \
-                                stuck, could not run"
-                status_flag=1
-	         exit $status_flag
-               fi
-             done
-           cp $CONFIG_FILE $CONFIG_FILE.ltpback
-          fi
-
-         echo "Running tests"
-
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "/etc/init.d/syslog no such script"
-			status_flag=1
-			cleanup
-	fi
-	
 	# Create the configuration file specific to this test case.
 	case "$CONFIG_FILE" in
-		"/etc/syslog.conf" |\
-		"/etc/rsyslog.conf")
-	        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	        echo "user.info        /var/log/messages" >> $CONFIG_FILE;;
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "user.info        /var/log/messages" >> $CONFIG_FILE
+		;;
 
-		"/etc/syslog-ng/syslog-ng.conf")
-			echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-			  udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-			echo " " >> $CONFIG_FILE
-			echo "filter f_syslog_user { level(info)      and facility(user); };"\
-			  >> $CONFIG_FILE
-			echo "destination syslog_messages { file(\"/var/log/messages\");};" \
-                >> $CONFIG_FILE
-			echo "log { source(src); filter(f_syslog_user); \
-			  destination(syslog_messages);};"  >> $CONFIG_FILE;;
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo "filter f_syslog_user { level(info) and facility(user); };" >> $CONFIG_FILE
+		echo "destination syslog_messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_user); destination(syslog_messages);};"  >> $CONFIG_FILE
+		;;
 	esac
 
-
-
-	#Restart syslog
-	tst_resm TINFO "Restart syslog daemon"
-	$syslog_cmd restart 2>&1 1>/dev/null
-
-	sleep 2
+	restart_syslog_daemon
 
 	# Run syslogtst in the background and get the process id.
 	syslogtst 4 2>/dev/null &
 	log_pid=$!
-	wait $log_pid
-	if [ $? -ne 0 ]; then
-			status_flag=1
-			return
+	if ! wait $log_pid; then
+		cleanup 1
 	fi
 
 	sleep 2
 
 	# check if /var/log/messages script exists
-	if ! [ -e /var/log/messages ]
-	then
+	if [ ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-			status_flag=1
-			cleanup
+		cleanup 1
 	fi
 
 	found=`grep -c "\[$log_pid\]: syslogtst: user info test." /var/log/messages`
 	if [ $found -ne 1 ]; then
-			status_flag=1
+		status_flag=1
 	fi
-
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO "case4: Test the logging option: LOG_PID"
 tst_resm TINFO "Do openlog() with LOG_PID option and see whether pid"
 tst_resm TINFO "is logged with message."
 
+setup
 syslog_case4
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog05 b/testcases/kernel/syscalls/syslog/syslog05
index 1f39565..9019035 100755
--- a/testcases/kernel/syscalls/syslog/syslog05
+++ b/testcases/kernel/syscalls/syslog/syslog05
@@ -18,184 +18,72 @@
 
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#	  fixed bugs.
 # 07/27/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#            Made changes to account for the replacement of syslogd
-#            with syslog-ng
+#	   Made changes to account for the replacement of syslogd
+#	   with syslog-ng
 #
 ##################################################################
-# case5: Test the logging option: LOG_CONS                       #
-#                                                                #
-#        o Do openlog() with LOG_CONS option.                    #
-#        o Disable /dev/syslog by moving it to a temporary file  #
-#          name.                                                 #
-#        o Send the syslog message.                              #
-#        o Check whether this is written to the console i.e to   #
-#          the  file /usr/adm/ktlog/<this year>/<this month>/    #
-#          <to_day>                                              #
+# case5: Test the logging option: LOG_CONS			 #
+#	o Do openlog() with LOG_CONS option.		  	 #
+#	o Disable /dev/syslog by moving it to a temporary file	 #
+#	  name.							 #
+#	o Send the syslog message.				 #
+#	o Check whether this is written to the console i.e to	 #
+#	  the file /usr/adm/ktlog/<this year>/<this month>/	 #
+#	  <to_day>						 #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-if [ $status_flag -eq 0 ]
-then
-	tst_resm TPASS "wrote to console"
-else
-	tst_resm TFAIL "write to console failed"
-fi
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
- sleep 2
-
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case5()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-			tst_resm TBROK "Testing is terminating due to a signal"
-			status_flag=1
-			cleanup
-	' 1 2 3 6 11 15
-
 	tst_resm TINFO "syslog: Testing the log option: LOG_CONS..."
 
-	#	# Create the configuration file specific to this test case.
+	# Create the configuration file specific to this test case.
 
-#check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
+	case "$CONFIG_FILE" in
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "user.info	/var/log/messages" >> $CONFIG_FILE
+		;;
 
-#Back up configuration file
-        if [ ! -e $CONFIG_FILE ]
-        then
-	   tst_resm TBROK  "$CONFIG_FILE not found!"
-        else
-#Pause if another LTP syslog test is running
-           while [ -e $CONFIG_FILE.ltpback ]
-             do
-               if [ $(( wait_count-- )) -gt 0 ]
-               then
-                 sleep 1
-               else
-	        tst_resm TBROK "Another syslog test appears to be \
-                                stuck, could not run"
-                status_flag=1
-	         exit $status_flag
-               fi
-             done
-           cp $CONFIG_FILE $CONFIG_FILE.ltpback
-          fi
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo "filter f_syslog_user { level(info)      and facility(user); };" >> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_user); destination(syslog-messages);};" >> $CONFIG_FILE
+		;;
+	esac
 
-         echo "Running tests"
-
-	 case "$CONFIG_FILE" in
-             "/etc/syslog.conf" |\
-	     "/etc/rsyslog.conf")
-	         echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	         echo "user.info        /var/log/messages" >> $CONFIG_FILE;;
-
-             "/etc/syslog-ng/syslog-ng.conf")
-		 echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-		    udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-		 echo "filter f_syslog_user { level(info)      and facility(user); };"\
-		    >> $CONFIG_FILE
-		 echo "destination syslog-messages { file(\"/var/log/messages\");};"\
-		    >> $CONFIG_FILE
-		 echo "log { source(src); filter(f_syslog_user); \
-		    destination(syslog-messages);};" >> $CONFIG_FILE;;
-	 esac
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "/etc/init.d/syslog no such script"
-			status_flag=1
-			cleanup
-	fi
-
-       #Restart syslog
-       $syslog_cmd restart 2>&1 1>/dev/null
-	
-       sleep 2
-
-
-
+	restart_syslog_daemon	
 
 	# check if /var/log/messages script exists
-	if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" ] && ! [ -e /var/log/messages ]
+	if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" -a ! -e /var/log/messages ]
 	then
 		tst_resm TBROK "/var/log/messages no such log file"
-			status_flag=1
-			cleanup
+		cleanup 1
 	fi
 	oldvalue=`grep -c "syslogtst: info to console test." /var/log/messages`
 	# syslogtst does the disabling of /dev/syslog, sends the message and
 	# enables /dev/syslog.
-	syslogtst 5 2>/dev/null
-	if [ $? -ne 0 ]; then
-			status_flag=1
-			return
+	if ! syslogtst 5 2>/dev/null; then
+		cleanup 1
 	fi
 	sleep 2
 
 	# check if /var/log/messages script exists
-	if ! [ -e /var/log/messages ]
-	then
+	if [ ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-			status_flag=1
-			cleanup
+		cleanup 1
 	fi
 	newvalue=`grep -c "syslogtst: info to console test." /var/log/messages`
 
-	diff=$(( $newvalue - $oldvalue ))
-	if [ $diff -ne 1 ]; then
-			status_flag=1
+	if [ "x$(( $newvalue - $oldvalue ))" != "x1" ]; then
+		status_flag=1
 	fi
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO " case5: Test the logging option: LOG_CONS"
 tst_resm TINFO " o Do openlog() with LOG_CONS option."
 tst_resm TINFO " o Disable /dev/syslog by moving it to a temporary file name."
@@ -203,7 +91,6 @@
 tst_resm TINFO " o Check whether this is written to the console i.e to"
 tst_resm TINFO "   the file /usr/adm/ktlog/<this year>/<this month>/<to_day>"
 
-
-
+setup
 syslog_case5
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog06 b/testcases/kernel/syscalls/syslog/syslog06
index 90d0680..5fd2f6e 100755
--- a/testcases/kernel/syscalls/syslog/syslog06
+++ b/testcases/kernel/syscalls/syslog/syslog06
@@ -33,149 +33,36 @@
 #         o open a file and check the returned file descriptor.  #
 #           It should be greater than 3.                         #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-if [ $status_flag -eq 0 ]
-then
-	tst_resm TPASS "file descriptor is greater than 3"
-else
-	tst_resm TFAIL "file descriptor is not greater than 3"
-fi
-
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
-sleep 2
-
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case6()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-			tst_resm TBROK "Testing is terminating due to a signal"
-			status_flag=1
-			cleanup
-	' 1 2 3 6 11 15
-
 	tst_resm TINFO "syslog: Testing the log option: LOG_NDELAY..."
 
-
-	# check if syslogd command exits.
-	echo
-
-
-#check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-#Back up configuration file
-        if [ ! -e $CONFIG_FILE ]
-        then
-	   tst_resm TBROK  "$CONFIG_FILE not found!"
-        else
-#Pause if another LTP syslog test is running
-           while [ -e $CONFIG_FILE.ltpback ]
-             do
-               if [ $(( wait_count-- )) -gt 0 ]
-               then
-                 sleep 1
-               else
-	        tst_resm TBROK "Another syslog test appears to be \
-                                stuck, could not run"
-                status_flag=1
-	         exit $status_flag
-               fi
-             done
-           cp $CONFIG_FILE $CONFIG_FILE.ltpback
-          fi
-
-         echo "Running tests"
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "$syslog_cmd no such script"
-		status_flag=1
-		cleanup
-	fi
-
 	# Create the configuration file specific to this test case.
 	# For this case, it's a dummy one. No use of it.
 	case "$CONFIG_FILE" in
-            "/etc/syslog.conf" |\
-	    "/etc/rsyslog.conf")
-	        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	        echo "user.info        /var/log/messages" >> $CONFIG_FILE;;
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "user.info        /var/log/messages" >> $CONFIG_FILE
+		;;
 
-	    "/etc/syslog-ng/syslog-ng.conf")
-		echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-		  udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-		echo "filter f_syslog_user { level(info)      and facility(user)\
-		  ; };">> $CONFIG_FILE
-		echo "destination syslog-messages { file(\"/var/log/messages\");};"\
-		  >> $CONFIG_FILE
-		echo "log { source(src); filter(f_syslog_user); \
-		  destination(syslog-messages);};" >> $CONFIG_FILE;;
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo "filter f_syslog_user { level(info) and facility(user); };">> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_user); destination(syslog-messages);};" >> $CONFIG_FILE
+		;;
 	esac
 
-	#Restart syslog
-	tst_resm TINFO "Restart syslog daemon"
+	restart_syslog_daemon
 
-	$syslog_cmd restart 2>&1 1>/dev/null
-	sleep 2
-
-	# Just call syslogtst. It will do everything.
-	# It will return 0 to indicate that test has passed.
-
-	syslogtst 6 2>/dev/null
-	if [ $? -ne 0 ]; then
-			status_flag=1
+	if ! syslogtst 6 2>/dev/null; then
+		status_flag=1
 	fi
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO " Test the logging option: LOG_NDELAY"
 tst_resm TINFO " o Do openlog() without LOG_NDELAY option."
 tst_resm TINFO " o open a file and check the returned file descriptor"
@@ -184,6 +71,6 @@
 tst_resm TINFO " o open a file and check the returned file descriptor."
 tst_resm TINFO "   It should be greater than 3."
 
-
+setup
 syslog_case6
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog07 b/testcases/kernel/syscalls/syslog/syslog07
index 730bbc1..a477cce 100755
--- a/testcases/kernel/syscalls/syslog/syslog07
+++ b/testcases/kernel/syscalls/syslog/syslog07
@@ -35,187 +35,70 @@
 #         o Send syslog messages at all levels and see whether   #
 #           higher level messages are logged.                    #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
 
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-
-  if [ $status_flag -eq 0 ]
-  then
-	tst_resm TPASS "$explaination level messages are logged."
-  else
-	tst_resm TFAIL "$explaination level messages are not logged."
-  fi
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
-
-  sleep 2
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case7()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-		tst_resm TBROK "Testing is terminating due to a signal"
-		status_flag=1
-		cleanup
-	' 1 2 3 6 11 15
+	tst_resm TINFO "testing syslog priorities ..."
 
-	echo
-	tst_resm TINFO "syslog: Testing the priorities ..."
-	echo
-
-	# check if syslogd command exits.
-	echo
-
-   #check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	    tst_resm TINFO "o Add lowest prority level i.e debug level entry to"$
-            tst_resm TINFO "  configuration file."
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    tst_resm TINFO "o Ensure all priority levels can be logged"
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    tst_resm TINFO "o Add lowest prority level i.e debug level entry to"
-	    tst_resm TINFO "  configuration file."
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
+	# Adds some clarification of log message when syslog-ng is used
+	if [ $CONFIG_FILE = /etc/syslog.conf ]; then
+		explanation="Higher"
 	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-# Adds some clarification of log message when syslog-ng is used
-        if [ $CONFIG_FILE = /etc/syslog.conf ]; then
-           explaination="Higher"
-        else
-           explaination="All"
-        fi
-
-
-tst_resm TINFO " o Send syslog messages at all levels and see whether"
-tst_resm TINFO "   $explaination level messages are logged."
-
-
-
-#Back up configuration file
-if [ ! -e $CONFIG_FILE ]
-then
-	tst_resm TBROK  "$CONFIG_FILE not found!"
-else
-#Pause if another LTP syslog test is running
-      while [ -e $CONFIG_FILE.ltpback ]
-      do
-          if [ $(( wait_count-- )) -gt 0 ]
-          then
-            sleep 1
-          else
-	    tst_resm TBROK "Another syslog test appears to be stuck, could not run"
-            status_flag=1
-	    exit $status_flag
-           fi
-        done
-        cp $CONFIG_FILE $CONFIG_FILE.ltpback
-fi
-         echo "Running tests"
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "/etc/init.d/syslog no such script"
-		status_flag=1
-		cleanup
+		explanation="All"
 	fi
 
+	tst_resm TINFO " o Send syslog messages at all levels and see whether"
+	tst_resm TINFO "   $explanation level messages are logged."
 
 	# Create the configuration file specific to this test case.
 	case "$CONFIG_FILE" in
-		"/etc/syslog.conf" |\
-		"/etc/rsyslog.conf")
+	/etc/syslog.conf|/etc/rsyslog.conf)
 	        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	        echo "user.debug        /var/log/messages" >> $CONFIG_FILE;;
+	        echo "user.debug /var/log/messages" >> $CONFIG_FILE
+		;;
 
-		"/etc/syslog-ng/syslog-ng.conf")
-			echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-                udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-			echo " " >> $CONFIG_FILE
-			echo " " >> $CONFIG_FILE
-			echo "# Added for syslog testcase"  >> $CONFIG_FILE
-			echo "filter f_syslog_messages {facility(user); };"  >> $CONFIG_FILE
-			echo "destination syslog-messages { file(\"/var/log/messages\");};" \
-				>> $CONFIG_FILE
-			echo "log { source(src); filter(f_syslog_messages); \
-                destination(syslog-messages); };" >> $CONFIG_FILE
-    esac
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo " " >> $CONFIG_FILE
+		echo "# Added for syslog testcase" >> $CONFIG_FILE
+		echo "filter f_syslog_messages {facility(user); };" >> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_messages); destination(syslog-messages); };" >> $CONFIG_FILE
+		;;
+	esac
 
-       #Restart syslog
-       $syslog_cmd restart 2>&1 1>/dev/null
-	sleep 2
+	restart_syslog_daemon
 
-       if [ -e /var/log/messages ]; then
-	emerg_old=`grep -c "syslogtst: emergency log" /var/log/messages`
-	alert_old=`grep -c "syslogtst: alert log" /var/log/messages`
-	crit_old=`grep -c "syslogtst: critical log" /var/log/messages`
-	err_old=`grep -c "syslogtst: error log" /var/log/messages`
-	warning_old=`grep -c "syslogtst: warning log" /var/log/messages`
-	notice_old=`grep -c "syslogtst: notice log" /var/log/messages`
-	info_old=`grep -c "syslogtst: info log" /var/log/messages`
-	debug_old=`grep -c "syslogtst: debug log" /var/log/messages`
-else
-	emerg_old=0
-	alert_old=0
-	crit_old=0
-	err_old=0
-	notice_old=0
-	warning_old=0
-	notice_old=0
-	info_old=0
-	debug_old=0
-fi
+	if [ -e /var/log/messages ]; then
+		emerg_old=`grep -c "syslogtst: emergency log" /var/log/messages`
+		alert_old=`grep -c "syslogtst: alert log" /var/log/messages`
+		crit_old=`grep -c "syslogtst: critical log" /var/log/messages`
+		err_old=`grep -c "syslogtst: error log" /var/log/messages`
+		warning_old=`grep -c "syslogtst: warning log" /var/log/messages`
+		notice_old=`grep -c "syslogtst: notice log" /var/log/messages`
+		info_old=`grep -c "syslogtst: info log" /var/log/messages`
+		debug_old=`grep -c "syslogtst: debug log" /var/log/messages`
+	else
+		emerg_old=0
+		alert_old=0
+		crit_old=0
+		err_old=0
+		notice_old=0
+		warning_old=0
+		notice_old=0
+		info_old=0
+		debug_old=0
+	fi
 
 	# Call syslogtst. It will send the messages of all levels.
-	syslogtst 7 2>/dev/null
-	if [ $? -ne 0 ]; then
-		status_flag=1
-		return
+	if ! syslogtst 7 2>/dev/null; then
+		cleanup 1
 	fi
 	sleep 2
 
-	# check if /var/log/maillog script exists
-#	find /var/log/ |grep maillog 2>&1 1>/dev/null
-#	RC=$?
-#	if [ $RC -ne 0 ]
-#	then
-#		tst_resm TBROK "/var/log/maillog no such log file"
-#		status_flag=1
-#		cleanup
-#	fi
-
 	emerg_new=`grep -c "syslogtst: emergency log" /var/log/messages`
 	alert_new=`grep -c "syslogtst: alert log" /var/log/messages`
 	crit_new=`grep -c "syslogtst: critical log" /var/log/messages`
@@ -233,23 +116,13 @@
 	notice=$(( $notice_new - $notice_old ))
 	info=$(( $info_new - $info_old ))
 
-	if [ $emerg   -ne 1 ] || [ $alert  -ne 1 ] || [ $crit -ne 1 ] || [ $err  -ne 1 ] || \
-	[ $warning -ne 1 ] || [ $notice -ne 1 ] || [ $info -ne 1 ] || [ $info -ne 1 ]; then
+	if [ $emerg -ne 1 -o $alert -ne 1 -o $crit -ne 1 -o $err -ne 1 \
+	     $warning -ne 1 -o $notice -ne 1 -o $info -ne 1 -o \
+	     $info -ne 1 ]; then
 		status_flag=1
 	fi
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
-
-tst_resm TINFO " Test the priorities"
-
-
-
+setup
 syslog_case7
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog08 b/testcases/kernel/syscalls/syslog/syslog08
index f917682..09a4338 100755
--- a/testcases/kernel/syscalls/syslog/syslog08
+++ b/testcases/kernel/syscalls/syslog/syslog08
@@ -18,221 +18,108 @@
 
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#		   fixed bugs.
 # 07/26/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#           Made changes to account for the replacement of syslogd
-#           with syslog-ng
+#		   Made changes to account for the replacement of syslogd
+#		   with syslog-ng
 #
 ##################################################################
-# case 8: Test all the facilities at a particular level.         #
-#                                                                #
-#         Facilities available are: LOG_KERN, LOG_USER, LOG_MAIL #
-#         LOG_DAEMON, LOG_AUTH, LOG_LPR.                         #
-#         Don't know how to send kernel messages from syslog()   #
-#                                                                #
-#         o Create seperate entries in config file for each      #
-#            facility.                                           #
-#         o Send the message and grep for the entry in log file. #
+# case 8: Test all the facilities at a particular level.	 #
+#								 #
+# Facilities available are: LOG_KERN, LOG_USER, LOG_MAIL	 #
+# LOG_DAEMON, LOG_AUTH, LOG_LPR.				 #
+# Don't know how to send kernel messages from syslog()   	 #
+#								 #
+# o Create seperate entries in config file for each facility.	 # 
+# o Send the message and grep for the entry in log file.	 #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-if [ $status_flag -eq 0 ]
-then
-	tst_resm TPASS "all facilities work"
-else
-	tst_resm TPASS "some facilities failed to work"
-fi
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
-sleep 2
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case8()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-		tst_resm TBROK "Testing is terminating due to a signal"
-		status_flag=1
-		cleanup
-	' 1 2 3 6 11 15
+	local facility_no=1
+	local facilities="user mail daemon auth lpr"
 
-	echo
-	tst_resm  TINFO "syslog: Testing all the facilities"
+	tst_resm TINFO "testing all the facilities"
 
- 	# check if syslogd command exits.
-	echo
+	for facility in $facilities; do
 
-	
-#check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-#Back up configuration file
-  if [ ! -e $CONFIG_FILE ]
-  then
-	tst_resm TBROK  "$CONFIG_FILE not found!"
-  else
-    #Pause if another LTP syslog test is running
-    while [ -e $CONFIG_FILE.ltpback ]
-      do
-        if [ $(( wait_count-- )) -gt 0 ]
-        then
-          sleep 1
-        else
-	  tst_resm TBROK "Another syslog test appears to be stuck, could not run"
-          status_flag=1
-	  exit $status_flag
-        fi
-      done
-       cp $CONFIG_FILE $CONFIG_FILE.ltpback
-   fi
-
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "/etc/init.d/syslog no such script"
-		status_flag=1
-		cleanup
-	fi
-
-	facility_no=1
-	facility="user mail daemon auth lpr"
-	for current in $facility
-	do
-		tst_resm TINFO "Doing facility: $current..."
+		tst_resm TINFO "Doing facility: $facility..."
 
 		# Create the configuration file specific to this facility
 		# Level is fixed at info.
 		case "$CONFIG_FILE" in
-			"/etc/syslog.conf" |\
-			"/etc/rsyslog.conf")
-		        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-		        echo "$current.info    /var/log/messages" >> $CONFIG_FILE
-		        echo "$current.info    /var/log/maillog" >> $CONFIG_FILE;;
+		/etc/syslog.conf|/etc/rsyslog.conf)
+			echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+			echo "$facility.info	/var/log/messages" >> $CONFIG_FILE
+			echo "$facility.info	/var/log/maillog" >> $CONFIG_FILE
+			;;
 
-			"/etc/syslog-ng/syslog-ng.conf")
-				echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-                      udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-				echo "filter f_syslog-$current { level(info)      and \
-                      facility($current); };"  >> $CONFIG_FILE
-				echo "destination syslog-messages { file(\"/var/log/messages\");\
-                      };"  >> $CONFIG_FILE
-				echo "destination syslog-mail { file(\"/var/log/maillog\");};" \
-					>> $CONFIG_FILE
-				echo "log { source(src); filter(f_syslog-$current); \
-                      destination(syslog-mail); };"  >> $CONFIG_FILE
-				echo "log { source(src); filter(f_syslog-$current); \
-                      destination(syslog-messages); };"  >> $CONFIG_FILE
+		/etc/syslog-ng/syslog-ng.conf)
+			echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+			echo "filter f_syslog-$facility { level(info) and facility($facility); };" >> $CONFIG_FILE
+			echo "destination syslog-messages { file(\"/var/log/messages\"); };" >> $CONFIG_FILE
+			echo "destination syslog-mail { file(\"/var/log/maillog\");};" >> $CONFIG_FILE
+			echo "log { source(src); filter(f_syslog-$facility); destination(syslog-mail); };"  >> $CONFIG_FILE
+			echo "log { source(src); filter(f_syslog-$facility); destination(syslog-messages); };"  >> $CONFIG_FILE
+			;;
+
 		esac
 
-		#Restart syslog
-		tst_resm TINFO "Restart $syslog_cmd"
-
-		$syslog_cmd restart 2>&1 1>/dev/null
-
-		sleep 2	
+		restart_syslog_daemon
 
 		if [ -e /var/log/messages ]; then
-		    oldvalue=`grep -c "syslogtst: $current info test." \
-                    /var/log/messages`
+			oldvalue=`grep -c "syslogtst: $facility info test." /var/log/messages`
 		else
-		    oldvalue=0
+			oldvalue=0
 		fi
 
-
-	        if [ -e /var/log/maillog ]; then
-		     old_mail_check=`grep -c "syslogtst: $current info test." \
-                                     /var/log/maillog`
+		if [ -e /var/log/maillog ]; then
+			old_mail_check=`grep -c "syslogtst: $facility info test." /var/log/maillog`
 		else
-	             old_mail_check=0
-	        fi
+			old_mail_check=0
+		fi
 
 		# syslogtst has to be called with one more
-                # additional facility argument(1-6)
-		syslogtst 8 $facility_no 2>/dev/null
-		if [ $? -ne 0 ]; then
-				status_flag=1
-				return
+				# additional facility argument(1-6)
+		if ! syslogtst 8 $facility_no 2>/dev/null; then
+			status_flag=1
+			return
 		fi
 		sleep 2
 		# check if /var/log/maillog script exists
 		for logf in messages maillog
 		do
-			if ! [ -e /var/log/$logf ]
-			then
+			if [ ! -e /var/log/$logf ]; then
 				tst_resm TBROK "/var/log/$logf no such log file"
-				status_flag=1
-				cleanup
+				cleanup 1
 			fi
 		done
-		new_mail_check=`grep -c "syslogtst: $current info test."\
-                                /var/log/maillog`
-		newvalue=`grep -c "syslogtst: $current info test." \
-                          /var/log/messages`
+
+		new_mail_check=`grep -c "syslogtst: $facility info test." /var/log/maillog`
+		newvalue=`grep -c "syslogtst: $facility info test." /var/log/messages`
 		diff=$(( $newvalue - $oldvalue ))
 		mail_check=$(( $new_mail_check - $old_mail_check ))
-		if [ $current = "mail" ]; then
-				if [ $mail_check -ne 1 ]; then
-					  status_flag=1
-					  tst_resm TINFO  " Facility $current failed"
-				elif [ $mail_check -eq 1 ]; then
-					   tst_resm TINFO  " Facility $current passed"
-				fi
+
+		if [ $facility = "mail" ]; then
+			if [ $mail_check -ne 1 ]; then
+				tst_resm TFAIL " Facility $facility failed"
+				status_flag=1
+			elif [ $mail_check -eq 1 ]; then
+				tst_resm TPASS " Facility $facility passed"
+			fi
 		elif [ $diff -ne 1 ]; then
-					   status_flag=1
-					   tst_resm TINFO  " Facility $current failed"
-				else
-					    tst_resm TINFO  " Facility $current passed"
+			tst_resm TFAIL " Facility $facility failed"
+			status_flag=1
+		else
+			tst_resm TPASS " Facility $facility passed"
 		fi
 		# Increment the facility_no for next...
-		facility_no=$(($facility_no+1))
+		: $(( facility_no += 1 ))
 	done
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO " Test all the facilities at a particular level."
 tst_resm TINFO " Facilities available are: LOG_KERN, LOG_USER, LOG_MAIL"
 tst_resm TINFO " LOG_DAEMON, LOG_AUTH, LOG_LPR."
@@ -240,7 +127,6 @@
 tst_resm TINFO " o Create seperate entries in config file for each facility."
 tst_resm TINFO " o Send the message and grep for the entry in log file."
 
-
-
+setup
 syslog_case8
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog09 b/testcases/kernel/syscalls/syslog/syslog09
index 9e4c9f1..c8da097 100755
--- a/testcases/kernel/syscalls/syslog/syslog09
+++ b/testcases/kernel/syscalls/syslog/syslog09
@@ -18,194 +18,87 @@
 
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#	   fixed bugs.
 # 07/27/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#           Made changes to account for the replacement of syslogd
-#           with syslog-ng
+#	   Made changes to account for the replacement of syslogd
+#	   with syslog-ng
 #
 ##################################################################
-# case 9: Test setlogmask() with LOG_UPTO macro.                 #
-#                                                                #
-#         o Use setlogmask() with LOG_UPTO macro to set some     #
-#            priority level.                                     #
-#         o Send message which is lower priority than the one    #
-#           set above, which should not be logged.               #
+# case 9: Test setlogmask() with LOG_UPTO macro.		 #
+#								#
+#	 o Use setlogmask() with LOG_UPTO macro to set some     #
+#	    priority level.				     #
+#	 o Send message which is lower priority than the one    #
+#	   set above, which should not be logged.	       #
 ##################################################################
-#number of seconds to wait for another syslog test to complete
-wait_count=60
 
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-if [ $status_flag -eq 0 ]
-then
-	tst_resm TPASS "lower priority message not logged."
-else
-	tst_resm TFAIL "lower priority message is logged."
-fi
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv "$CONFIG_FILE.ltpback" "$CONFIG_FILE"
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      "$syslog_cmd" restart 2>&1 1>/dev/null
-  }
-
-sleep 2
-
-exit $status_flag
-}
-
+. syslog-lib.sh || exit 1
 
 syslog_case9()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-			tst_resm TBROK "Testing is terminating due to a signal"
-			status_flag=1
-			cleanup
-	' 1 2 3 6 11 15
-
-	tst_resm  TINFO "syslog: Testing setlogmask() with LOG_UPTO macro"
-	echo
-
-#check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-#Back up configuration file
-        if [ ! -e $CONFIG_FILE ]
-        then
-	   tst_resm TBROK  "$CONFIG_FILE not found!"
-        else
-#Pause if another LTP syslog test is running
-           while [ -e $CONFIG_FILE.ltpback ]
-             do
-               if [ $(( wait_count-- )) -gt 0 ]
-               then
-                 sleep 1
-               else
-	        tst_resm TBROK "Another syslog test appears to be \
-                                stuck, could not run"
-                status_flag=1
-	         exit $status_flag
-               fi
-             done
-           cp $CONFIG_FILE $CONFIG_FILE.ltpback
-          fi
-
-         echo "Running tests"
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "/etc/init.d/syslog no such script"
-		status_flag=1
-		cleanup
-	fi
+	tst_resm TINFO "syslog: Testing setlogmask() with LOG_UPTO macro"
 
 	# Create the configuration file specific to this test case.
 	case "$CONFIG_FILE" in
-            "/etc/syslog.conf" |\
-	    "/etc/rsyslog.conf")
-	        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	        echo "user.debug       /var/log/messages" >> $CONFIG_FILE;;
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "user.debug       /var/log/messages" >> $CONFIG_FILE
+		;;
 
-            "/etc/syslog-ng/syslog-ng.conf")
-		echo "source src{ internal(); unix-dgram(\"/dev/log\"); \
-		    udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
- #   echo "filter f_syslog_debug { level(debug)      and facility(user); };"\
- #             >> $CONFIG_FILE
-		echo "filter f_syslog_debug { facility(user); };"\
-		    >> $CONFIG_FILE
-		echo "destination syslog-messages { file(\"/var/log/messages\");};"\
-		    >> $CONFIG_FILE
-		echo "log { source(src); filter(f_syslog_debug); \
-		    destination(syslog-messages);};" >> $CONFIG_FILE
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		#echo "filter f_syslog_debug { level(debug) and facility(user); };" >> $CONFIG_FILE
+		echo "filter f_syslog_debug { facility(user); };" >> $CONFIG_FILE
+		echo "destination syslog-messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_debug); destination(syslog-messages);};" >> $CONFIG_FILE
+		;;
 	esac
-      #Restart syslog
-       $syslog_cmd restart 2>&1 1>/dev/null
-       sleep 2
+
+	restart_syslog_daemon
 
 	# check if /var/log/messages script exists
-	if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" ] && ! [ -e /var/log/messages ]
-	then
+	if [ "$CONFIG_FILE" != "/etc/syslog-ng/syslog-ng.conf" -a ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-		status_flag=1
-		cleanup
+		cleanup 1
 	fi
+
 	allow1=`grep -c "syslogtst: error level is logged" /var/log/messages`
 	donot_allow1=`grep -c "syslogtst: warning level not to be logged" /var/log/messages`
 
-	syslogtst 9 2>/dev/null
-	if [ $? -ne 0 ]; then
-			status_flag=1
-			return
+	if ! syslogtst 9 2>/dev/null; then
+		cleanup 1
 	fi
 	sleep 2
 
 	# check if /var/log/messages script exists
-	if ! [ -e /var/log/messages ]
-	then
+	if [ ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-		status_flag=1
-		cleanup
+		cleanup 1
 	fi
+
 	allow2=`grep -c "syslogtst: error level is logged" /var/log/messages`
 	donot_allow2=`grep -c "syslogtst: warning level not to be logged" /var/log/messages`
 
 	diff1=$(( $allow2 - $allow1 ))
 	if [ $diff1 -ne 1 ]; then
-			tst_resm TFAIL "Expected message is not logged...."
-			status_flag=1
-			return
+		tst_resm TFAIL "Expected message was not logged...."
+		status_flag=1
+		return
 	fi
 
 	diff2=$(( $donot_allow2 - $donot_allow1 ))
 	if [ $diff2 -ne 0 ]; then
-			tst_resm TFAIL "Unexpected message is logged..."
-			status_flag=1
+		tst_resm TFAIL "Unexpected message was logged..."
+		status_flag=1
 	fi
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
-
 tst_resm TINFO " Test setlogmask() with LOG_UPTO macro."
 tst_resm TINFO " o Use setlogmask() with LOG_UPTO macro to set some priority"
 tst_resm TINFO "   level."
 tst_resm TINFO " o Send message which is lower priority than the one"
 tst_resm TINFO "   set above, which should not be logged"
 
-
+setup
 syslog_case9
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog10 b/testcases/kernel/syscalls/syslog/syslog10
index 3a19ad3..e8d2266 100755
--- a/testcases/kernel/syscalls/syslog/syslog10
+++ b/testcases/kernel/syscalls/syslog/syslog10
@@ -1,5 +1,4 @@
-#! /bin/sh
-#set -x
+#!/bin/sh
 #  Copyright (c) International Business Machines  Corp., 2002
 #
 #  This program is free software;  you can redistribute it and/or modify
@@ -18,200 +17,89 @@
 #
 # 12/05/02  Port to bash -Robbie Williamson <robbiew@us.ibm.com>
 # 02/05/03  Modified - Manoj Iyer <manjo@mail.utexas.edu> use USCTEST macros
-#           fixed bugs.
+#	   fixed bugs.
 # 07/26/05  Michael Reed  <mreedltp@vnet.ibm.com>
-#           Made changes to account for the replacement of syslogd
-#           with syslog-ng
+#	   Made changes to account for the replacement of syslogd
+#	   with syslog-ng
 #
 ##################################################################
-# case 10: Test setlogmask() with LOG_MASK macro.                #
-#                                                                #
-#         o Use setlogmask() with LOG_MASK macro to set an       #
-#            individual priority level.                          #
-#         o Send the message of above prority and expect it to   #
-#           be logged.                                           #
-#         o Send message which is below the priority level to    #
-#           the one set above, which should not be logged.       #
+# case 10: Test setlogmask() with LOG_MASK macro.		#
+#								#
+#	 o Use setlogmask() with LOG_MASK macro to set an       #
+#		individual priority level.			  #
+#	 o Send the message of above prority and expect it to   #
+#	   be logged.					   #
+#	 o Send message which is below the priority level to    #
+#	   the one set above, which should not be logged.       #
 ##################################################################
 
-#number of seconds to wait for another syslog test to complete
-wait_count=60
-
-#configuration file for syslog or syslog-ng
-CONFIG_FILE=""
-
-#Command for syslog or syslog-ng
-syslog_cmd=""
-
-cleanup()
-{
-  if [ $status_flag -eq 0 ]
-  then
-	tst_resm TPASS " setlogmask() with LOG_MASK macro worked"
-  else
-	tst_resm TFAIL " setlogmask() with LOG_MASK macro failed"
-  fi
-
-
-#Restore syslog.conf
-  [ -f "$CONFIG_FILE.ltpback" ] && mv $CONFIG_FILE.ltpback $CONFIG_FILE
-
-#Restart syslog
-  [ -x "$syslog_cmd" ] && {
-      tst_resm TINFO "restart $syslog_cmd"
-      $syslog_cmd restart 2>&1 1>/dev/null
-  }
-
-  sleep 2
-
-exit $status_flag
-}
+. syslog-lib.sh || exit 1
 
 syslog_case10()
 {
-	RSYSLOG_CONFIG=""
-	#set the trap to handle signals.
-	trap '
-			tst_resm TBROK "Testing is terminating due to a signal"
-			status_flag=1
-			cleanup
-	' 1 2 3 6 11 15
-
-	echo
 	tst_resm TINFO "syslog: Testing setlogmask() with LOG_MASK macro..."
-	echo
-        #check to see if syslogd or syslog-ng exists
-	if [ -e /sbin/syslogd  ]
-	then
-	    CONFIG_FILE="/etc/syslog.conf"
-	    syslog_cmd="/etc/init.d/sysklogd"
-	elif [ -e /sbin/syslog-ng ] || [ -e /usr/sbin/syslog-ng ]
-        then
-	    CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	    syslog_cmd="/etc/init.d/syslog-ng"
-	elif [ -e /sbin/rsyslogd ] || [ -e /usr/sbin/rsyslogd ]
-        then
-	    CONFIG_FILE="/etc/rsyslog.conf"
-	    syslog_cmd="/etc/init.d/rsyslog"
-	    RSYSLOG_CONFIG='$ModLoad imuxsock.so'
-	else
-	    tst_resm TCONF "syslogd, syslog-ng or rsyslogd no such command"
-	    status_flag=0
-	    cleanup	
-	fi
-	[ -x $syslog_cmd ] || syslog_cmd="/etc/init.d/syslog"
-
-#Back up configuration file
-       if [ ! -e $CONFIG_FILE ]
-       then
-	  tst_resm TBROK  "$CONFIG_FILE not found!"
-       else
-          #Pause if another LTP syslog test is running
-          while [ -e $CONFIG_FILE.ltpback ]
-            do
-              if [ $(( wait_count-- )) -gt 0 ]
-              then
-                sleep 1
-              else
-	        tst_resm TBROK "Another syslog test appears to be\
-                                stuck, could not run"
-                status_flag=1
-	        exit $status_flag
-              fi
-           done
-          cp $CONFIG_FILE $CONFIG_FILE.ltpback
-       fi
-
-         echo "Running tests"
-
-
-	# check if /etc/init/syslog script exists
-	if ! [ -e "$syslog_cmd" ]
-	then
-		tst_resm TBROK "$syslog_cmd no such script"
-		status_flag=1
-		cleanup
-	fi
 
 	# Create the configuration file specific to this test case.
 	case "$CONFIG_FILE" in
-		"/etc/syslog.conf" |\
-		"/etc/rsyslog.conf")
-	        echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
-	        echo "user.debug       /var/log/messages" >> $CONFIG_FILE;;
+	/etc/syslog.conf|/etc/rsyslog.conf)
+		echo "$RSYSLOG_CONFIG" > $CONFIG_FILE
+		echo "user.debug       /var/log/messages" >> $CONFIG_FILE
+		;;
 
-		"/etc/syslog-ng/syslog-ng.conf")
-			echo "source src{ internal(); unix-dgram(\"/dev/log\");\
-			     udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
-	        echo "filter f_syslog_debug{ facility(user); };" \
-			    >> $CONFIG_FILE
-	        echo "destination syslog_messages { file(\"/var/log/messages\");};"\
-				>> $CONFIG_FILE
-	        echo "log { source(src); filter(f_syslog_debug); \
-			     destination(syslog_messages); };"  >> $CONFIG_FILE
+	/etc/syslog-ng/syslog-ng.conf)
+		echo "source src{ internal(); unix-dgram(\"/dev/log\"); udp(ip(\"0.0.0.0\") port(514)); };" > $CONFIG_FILE
+		echo "filter f_syslog_debug{ facility(user); };" >> $CONFIG_FILE
+		echo "destination syslog_messages { file(\"/var/log/messages\");};" >> $CONFIG_FILE
+		echo "log { source(src); filter(f_syslog_debug); destination(syslog_messages); };" >> $CONFIG_FILE
+		;;
+
 	esac
 
-       #Restart syslog
-       $syslog_cmd restart 2>&1 1>/dev/null
+	restart_syslog_daemon
 
-       # check if /var/log/messages script exists
-        if ! [ -e /var/log/messages ]
-	then
+	if [ ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-		status_flag=1
-		cleanup
+		cleanup 1
 	fi
 
-    sleep 2
 	if [ -e /var/log/messages ]; then
-	    allow1=`grep -c "syslogtst:10 error level is logged" \
-                   /var/log/messages`
-	    donot_allow1=`grep -c "syslogtst:10 warning level not\
-                          to be logged" /var/log/messages`
+		allow1=`grep -c "syslogtst:10 error level is logged" /var/log/messages`
+		donot_allow1=`grep -c "syslogtst:10 warning level not to be logged" /var/log/messages`
 	else
-	    allow1=0
-	    donot_allow1=0
+		allow1=0
+		donot_allow1=0
 	fi
 
-	syslogtst 10 2>/dev/null
-	if [ $? -ne 0 ]; then
-			status_flag=1
-			return
+	if ! syslogtst 10 2>/dev/null; then
+		status_flag=1
+		return
 	fi
 	sleep 2
 
 	# check if /var/log/messages script exists
-	if ! [ -e /var/log/messages ]
-	then
+	if [ ! -e /var/log/messages ]; then
 		tst_resm TBROK "/var/log/messages no such log file"
-		status_flag=1
-		cleanup
+		cleanup 1
 	fi
+
 	allow2=`grep -c "syslogtst:10 error level is logged" /var/log/messages`
-	donot_allow2=`grep -c "syslogtst:10 warning level not to be logged"\
-                      /var/log/messages`
+	donot_allow2=`grep -c "syslogtst:10 warning level not to be logged" /var/log/messages`
 
 	diff1=$(( $allow2 - $allow1 ))
 	if [ $diff1 -ne 1 ]; then
-			tst_resm TFAIL "Expected message is not logged...."
-			status_flag=1
-			return
+		tst_resm TFAIL "Expected message was not logged...."
+		status_flag=1
+		return
 	fi
 
 	diff2=$(( $donot_allow2 - $donot_allow1 ))
 	if [ $diff2 -ne 0 ]; then
-			tst_resm TFAIL "Unexpected message is logged..."
-			status_flag=1
+		tst_resm TFAIL "Unexpected message was logged..."
+		status_flag=1
 	fi
 
 }
 
-export TST_TOTAL=1
-export TST_COUNT=1
-export TCID=$(basename $0)
-
-RC=0
-status_flag=0
 tst_resm TINFO " Test setlogmask() with LOG_MASK macro."
 tst_resm TINFO " o Use setlogmask() with LOG_MASK macro to set an"
 tst_resm TINFO "   individual priority level."
@@ -220,7 +108,6 @@
 tst_resm TINFO " o Send message which is at other priority level to"
 tst_resm TINFO "   the one set above, which should not be logged."
 
-
-
+setup
 syslog_case10
-cleanup
+cleanup ${status_flag:=0}
diff --git a/testcases/kernel/syscalls/syslog/syslog11.c b/testcases/kernel/syscalls/syslog/syslog11.c
index 836fc24..b4d4560 100644
--- a/testcases/kernel/syscalls/syslog/syslog11.c
+++ b/testcases/kernel/syscalls/syslog/syslog11.c
@@ -123,9 +123,9 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	setup();
 
@@ -167,7 +167,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 int setup1(void)
@@ -185,7 +185,7 @@
 {
 	/* Change effective user id to root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "seteuid failed to set the effective"
+		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
 			 " uid to root");
 	}
 }
@@ -201,13 +201,13 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	/* Check for nobody_uid user id */
 	if ((ltpuser = getpwnam("nobody")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "nobody user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "nobody user id doesn't exist");
+		
 	}
 
 	/* Pause if that option was specified
@@ -232,4 +232,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/syslog/syslog12.c b/testcases/kernel/syscalls/syslog/syslog12.c
index 9641cd5..58a3315 100644
--- a/testcases/kernel/syscalls/syslog/syslog12.c
+++ b/testcases/kernel/syscalls/syslog/syslog12.c
@@ -134,9 +134,9 @@
 	int ret;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -190,7 +190,7 @@
 	}
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }
 
 int setup1(void)
@@ -208,7 +208,7 @@
 {
 	/* Change effective user id to root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK, tst_exit, "seteuid failed to set the effective"
+		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
 			 " uid to root");
 	}
 }
@@ -224,13 +224,13 @@
 
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Must be root for this test!");
-	 /*NOTREACHED*/}
+		tst_brkm(TBROK, NULL, "Must be root for this test!");
+	 }
 
 	/* Check for nobody_uid user id */
 	if ((ltpuser = getpwnam("nobody")) == NULL) {
-		tst_brkm(TBROK, tst_exit, "nobody user id doesn't exist");
-		/* NOTREACHED */
+		tst_brkm(TBROK, NULL, "nobody user id doesn't exist");
+		
 	}
 
 	/* set the expected errnos... */
@@ -258,4 +258,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/tee/tee01.c b/testcases/kernel/syscalls/tee/tee01.c
index 22fb719..6f01ea4 100644
--- a/testcases/kernel/syscalls/tee/tee01.c
+++ b/testcases/kernel/syscalls/tee/tee01.c
@@ -94,7 +94,11 @@
 	 * parse standard options
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/*
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/time/time01.c b/testcases/kernel/syscalls/time/time01.c
index 279c591..848dd3e 100644
--- a/testcases/kernel/syscalls/time/time01.c
+++ b/testcases/kernel/syscalls/time/time01.c
@@ -130,23 +130,14 @@
 	int lc;			/* loop counter */
 	char *msg;		/* message returned from parse_opts */
 
-    /***************************************************************
-     * parse standard options
-     ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-    /***************************************************************
-     * perform global setup for test
-     ***************************************************************/
 	setup();
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
 
-    /***************************************************************
-     * check looping state if -c option given
-     ***************************************************************/
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		/* reset Tst_count in case we are looping. */
@@ -163,9 +154,6 @@
 			tst_resm(TFAIL, "time(0) Failed, errno=%d : %s",
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
-	    /***************************************************************
-	     * only perform functional verification if flag set (-f not given)
-	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "time(0) returned %ld",
@@ -174,12 +162,9 @@
 		}
 	}			/* End for TEST_LOOPING */
 
-    /***************************************************************
-     * cleanup and exit
-     ***************************************************************/
 	cleanup();
 
-	return 0;
+	tst_exit();
 }				/* End main */
 
 /***************************************************************
@@ -207,7 +192,4 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
 }				/* End cleanup() */
diff --git a/testcases/kernel/syscalls/time/time02.c b/testcases/kernel/syscalls/time/time02.c
index 43eadb7..75bc1ba 100644
--- a/testcases/kernel/syscalls/time/time02.c
+++ b/testcases/kernel/syscalls/time/time02.c
@@ -93,7 +93,11 @@
 	time_t tloc;		/* time_t variables for time(2) */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -147,7 +151,7 @@
 
 	/* cleanup and exit */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
index 277bd25..2fef966 100644
--- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
@@ -130,7 +130,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
@@ -160,7 +164,11 @@
 
 		ENTER(0);
                 TEST( syscall(__NR_timer_getoverrun, -1 ));
+<<<<<<< HEAD
+                if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL) {
+=======
                 if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL ) {
+>>>>>>> master
                         tst_resm(TPASS, "Block %d: test %d PASSED", block, Tst_count );
                 } else {
                         tst_resm(TFAIL, "Block %d: test %d FAILED... errno = %d : %s", block, Tst_count,TEST_ERRNO, strerror(TEST_ERRNO) );
diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
index 8b0f26a..85fc49c 100644
--- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
@@ -131,7 +131,6 @@
 	struct sigevent ev;
 	struct itimerspec spec;
 
-	
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -159,15 +158,12 @@
 				    block, Tst_count);
 			}
 
-
-			
 /*
 
 ERRORS
        -EINVAL
 	      An invalid timer_id value was specified.
 */
-
 			ENTER(0);
 			TEST(syscall(__NR_timer_gettime, -1, &spec));
 			if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL) {
diff --git a/testcases/kernel/syscalls/timerfd/timerfd02.c b/testcases/kernel/syscalls/timerfd/timerfd02.c
index c7fd0a1..58183bf 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd02.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd02.c
@@ -142,7 +142,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/timerfd/timerfd03.c b/testcases/kernel/syscalls/timerfd/timerfd03.c
index df0bc3b..9f16683 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd03.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd03.c
@@ -138,7 +138,11 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(argc, argv, NULL, NULL);
+=======
 	msg = parse_opts(argc, argv, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/times/times01.c b/testcases/kernel/syscalls/times/times01.c
index e7f5f5a..2108b39 100644
--- a/testcases/kernel/syscalls/times/times01.c
+++ b/testcases/kernel/syscalls/times/times01.c
@@ -137,7 +137,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/times/times03.c b/testcases/kernel/syscalls/times/times03.c
index fcf0539..b802f40 100644
--- a/testcases/kernel/syscalls/times/times03.c
+++ b/testcases/kernel/syscalls/times/times03.c
@@ -77,9 +77,9 @@
 	struct sigaction sa;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		/*NOT REACHED */
 	}
 
@@ -160,7 +160,7 @@
 			pid2 = FORK_OR_VFORK();
 			if (pid2 < 0) {
 				tst_brkm(TFAIL, cleanup, "Fork failed");
-			 /*NOTREACHED*/} else if (pid2 == 0) {
+			 } else if (pid2 == 0) {
 
 				/* Spend some cycles in userspace */
 
@@ -237,7 +237,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -303,4 +303,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/tkill/tkill01.c b/testcases/kernel/syscalls/tkill/tkill01.c
index 088d515..900a54c 100644
--- a/testcases/kernel/syscalls/tkill/tkill01.c
+++ b/testcases/kernel/syscalls/tkill/tkill01.c
@@ -1,41 +1,41 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007                                   */
-/*                                                                            */
+/* Copyright (c) Crackerjack Project., 2007				   */
+/*									    */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        tkill01.c                                           */
-/*                                                                            */
-/* Description: This tests the tkill() syscall                      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* tkill01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                     */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   tkill01                                             */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* File:	tkill01.c					   */
+/*									    */
+/* Description: This tests the tkill() syscall		      */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* tkill01 [-c n] [-e][-i n] [-I x] [-p x] [-t]		     */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   tkill01					     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 
 #include <stdio.h>
@@ -55,109 +55,99 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "tkill01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 2;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 2;		   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 int sig_count = 0;
 
 void sig_action(int sig)
 {
-        sig_count = 1;
+	sig_count = 1;
 }
 
 int main(int ac, char **av) {
-        int tid;
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
+	int tid;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
 	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-        setup();
+	setup();
 
-        /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-                     TEST(signal(SIGUSR1, &sig_action));     
-                     TEST(tid = syscall( __NR_gettid));     
-		     if (TEST_RETURN == -1) {
-                 	   tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-			   cleanup();
-			   tst_exit();
-                     }
-                     TEST(syscall(__NR_tkill,tid, SIGUSR1));     
-		     if (TEST_RETURN == 0) {
-				if (!sig_count);
-        			tst_resm(TPASS, "tkill call succeeded");
-		     }else{
-                 	   tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-                           cleanup();
-			   tst_exit();
-                     }
-                }
-        }	
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+			TEST(signal(SIGUSR1, &sig_action));     
+			TEST(tid = syscall( __NR_gettid));     
+			if (TEST_RETURN == -1) {
+				tst_resm(TFAIL|TTERRNO, "tkill failed");
+			}
+			TEST(syscall(__NR_tkill,tid, SIGUSR1));     
+			if (TEST_RETURN == 0) {
+				tst_resm(TPASS, "tkill call succeeded");
+			} else {
+				tst_resm(TFAIL|TTERRNO, "tkill failed");
+			}
+		}
+	}	
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
 
diff --git a/testcases/kernel/syscalls/tkill/tkill02.c b/testcases/kernel/syscalls/tkill/tkill02.c
index 2ac2074..130cb75 100644
--- a/testcases/kernel/syscalls/tkill/tkill02.c
+++ b/testcases/kernel/syscalls/tkill/tkill02.c
@@ -1,41 +1,41 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007                                   */
-/*                                                                            */
+/* Copyright (c) Crackerjack Project., 2007				   */
+/*									    */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        tkill02.c                                           */
-/*                                                                            */
-/* Description: This tests the tkill() syscall                      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* tkill02 [-c n] [-e][-i n] [-I x] [-p x] [-t]                     */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   tkill02                                             */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* File:	tkill02.c					   */
+/*									    */
+/* Description: This tests the tkill() syscall		      */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* tkill02 [-c n] [-e][-i n] [-I x] [-p x] [-t]		     */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   tkill02					     */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 
 #include <stdio.h>
@@ -52,121 +52,98 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "tkill02";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 2;                   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
-
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 struct test_case_t {
-        int tid;
-        int exp_errno;
+	int tid;
+	int exp_errno;
 } test_cases[] = {
-        { -1, EINVAL },
-        { 99999, ESRCH }
+	{ -1, EINVAL },
+	{ 99999, ESRCH }
 };
 
+int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
+
 int main(int ac, char **av) {
-        int lc;                 /* loop counter */
-        char *msg;              /* message returned from parse_opts */
-	int i, succeed=0, fail=0;
-	
-        /* parse standard options */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	int lc;		/* loop counter */
+	int i;
 
-        setup();
+	setup();
 
-        /* Check looping state if -i option given */
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (i = 0; i < TST_TOTAL; i++) {
 
-			for (i=0; i<2; i++) {
-		                TEST(syscall(__NR_tkill, test_cases[i].tid, SIGUSR1));
-		     		if (TEST_RETURN == -1) {
-			            	if (TEST_ERRNO == test_cases[i].exp_errno) {
-						tst_resm(TINFO, "%s() call with tid:%d got expected errno:%d", TCID, test_cases[i].tid,TEST_ERRNO);
-						succeed++;
-					}
-					else{
-						tst_resm(TINFO, "%s() call with tif:%d got unexpected errno = %d : %s", TCID, test_cases[i].tid, TEST_ERRNO, strerror(TEST_ERRNO));
-						fail++;
-					}
-				}else{
-					tst_resm(TINFO, "%s() with tid:%d succeed,but should fail", TCID, test_cases[i].tid);
-				}
+		TEST(syscall(__NR_tkill, test_cases[i].tid, SIGUSR1));
+
+		if (TEST_RETURN == -1) {
+		    	if (TEST_ERRNO == test_cases[i].exp_errno) {
+				tst_resm(TINFO|TTERRNO,
+				    "tkill(%d, SIGUSR1) failed as expected",
+				    test_cases[i].tid);
+			} else {
+				tst_brkm(TFAIL|TTERRNO, cleanup,
+				    "tkill(%d, SIGUSR1) failed unexpectedly",
+				    test_cases[i].tid);
 			}
-		
-		if (fail != 0) {
-			tst_resm(TFAIL, "tkill() call FAILED");
-			cleanup();
-			tst_exit();
-        	}
-        	else{
-			tst_resm(TPASS, "tkill() call PASSED");
-	        }
-
-                
-	    }
-     }	
+		} else {
+			tst_brkm(TFAIL, cleanup,
+			    "tkill(%d) succeeded unexpectedly",
+			    test_cases[i].tid);
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
-
diff --git a/testcases/kernel/syscalls/truncate/truncate01.c b/testcases/kernel/syscalls/truncate/truncate01.c
index efa3d4b..8a8b8c9 100644
--- a/testcases/kernel/syscalls/truncate/truncate01.c
+++ b/testcases/kernel/syscalls/truncate/truncate01.c
@@ -101,7 +101,11 @@
 	off_t file_length;	/* test file length */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -145,7 +149,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TESTFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 				stat_buf.st_mode &= ~S_IFREG;
 				file_length = stat_buf.st_size;
 
@@ -172,7 +176,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -213,7 +217,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Write to the file 1k data from the buffer */
 	while (c_total < FILE_SIZE) {
@@ -221,7 +225,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TESTFILE, errno, strerror(errno));
-		 /*NOTREACHED*/} else {
+		 } else {
 			c_total += c;
 		}
 	}
@@ -231,7 +235,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TESTFILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 }				/* End setup() */
 
 /*
diff --git a/testcases/kernel/syscalls/truncate/truncate02.c b/testcases/kernel/syscalls/truncate/truncate02.c
index b4600c5..db619f9 100644
--- a/testcases/kernel/syscalls/truncate/truncate02.c
+++ b/testcases/kernel/syscalls/truncate/truncate02.c
@@ -108,7 +108,11 @@
 	int err_flag = 0;	/* error indicator flag */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -152,7 +156,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed after 1st truncate, "
 						 "error:%d", TESTFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 				file_length1 = stat_buf.st_size;
 
 				/*
@@ -163,7 +167,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek(2) on "
 						 "%s failed after 1st truncate, "
 						 "error:%d", TESTFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/* Read the testfile from the beginning. */
 				while ((rbytes = read(fd, tst_buff,
@@ -195,7 +199,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed after 2nd truncate, "
 						 "error:%d", TESTFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 				file_length2 = stat_buf.st_size;
 
 				/*
@@ -206,7 +210,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek(2) on "
 						 "%s failed after 2nd truncate, "
 						 "error:%d", TESTFILE, errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/* Read the testfile contents till EOF */
 				while ((rbytes = read(fd, tst_buff,
@@ -243,7 +247,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -283,7 +287,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Write to the file 1k data from the buffer */
 	while (write_len < FILE_SIZE) {
diff --git a/testcases/kernel/syscalls/truncate/truncate03.c b/testcases/kernel/syscalls/truncate/truncate03.c
index 854beaa..164b4b2 100644
--- a/testcases/kernel/syscalls/truncate/truncate03.c
+++ b/testcases/kernel/syscalls/truncate/truncate03.c
@@ -149,7 +149,11 @@
 	int ind;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -211,7 +215,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -234,7 +238,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -263,7 +267,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TEST_FILE1, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Write to the file 1k data from the buffer */
 	while (c_total < FILE_SIZE) {
@@ -271,7 +275,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TEST_FILE1, errno, strerror(errno));
-		 /*NOTREACHED*/} else {
+		 } else {
 			c_total += c;
 		}
 	}
@@ -281,7 +285,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 #if !defined(UCLINUX)
 	bad_addr = mmap(0, 1, PROT_NONE,
 			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
@@ -322,7 +326,7 @@
 	/* Change mode permissions on test file */
 	if (chmod(TEST_FILE1, NEW_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", TEST_FILE1);
-	 /*NOTREACHED*/}
+	 }
 
 	return 0;
 }				/* End setup() */
@@ -345,13 +349,13 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	/* Close the file created above */
 	if (close(fildes) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/truncate/truncate04.c b/testcases/kernel/syscalls/truncate/truncate04.c
index e1bc544..0819404 100644
--- a/testcases/kernel/syscalls/truncate/truncate04.c
+++ b/testcases/kernel/syscalls/truncate/truncate04.c
@@ -106,7 +106,11 @@
 	char *file_name;	/* testfile name */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -152,7 +156,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -170,7 +174,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/umask/umask01.c b/testcases/kernel/syscalls/umask/umask01.c
index 0ee73d5..5b981c6 100644
--- a/testcases/kernel/syscalls/umask/umask01.c
+++ b/testcases/kernel/syscalls/umask/umask01.c
@@ -135,7 +135,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/umask/umask02.c b/testcases/kernel/syscalls/umask/umask02.c
index a4543a9..e393fe8 100644
--- a/testcases/kernel/syscalls/umask/umask02.c
+++ b/testcases/kernel/syscalls/umask/umask02.c
@@ -69,10 +69,10 @@
 	int failcnt = 0;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	setup();
 
@@ -95,7 +95,7 @@
 				 "values");
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -129,4 +129,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/umask/umask03.c b/testcases/kernel/syscalls/umask/umask03.c
index 4c509bc..8a127de 100644
--- a/testcases/kernel/syscalls/umask/umask03.c
+++ b/testcases/kernel/syscalls/umask/umask03.c
@@ -75,10 +75,16 @@
 	unsigned low9mode;
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(argc, argv, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL))
 	    != NULL) {
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -106,7 +112,7 @@
 							 "mask didnot take",
 							 low9mode,
 							 (~mskval & 0777));
-					 /*NOTREACHED*/}
+					 }
 				}
 			}
 			close(fildes);
@@ -116,7 +122,7 @@
 				 "previous value for all masks");
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/umount/umount01.c b/testcases/kernel/syscalls/umount/umount01.c
index 66ac1a2..825a17f 100644
--- a/testcases/kernel/syscalls/umount/umount01.c
+++ b/testcases/kernel/syscalls/umount/umount01.c
@@ -178,7 +178,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -193,7 +193,7 @@
 		if (Fstype != NULL) {
 			free(Fstype);
 		}
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* make a temp directory */
diff --git a/testcases/kernel/syscalls/umount/umount02.c b/testcases/kernel/syscalls/umount/umount02.c
index d20711e..349a337 100644
--- a/testcases/kernel/syscalls/umount/umount02.c
+++ b/testcases/kernel/syscalls/umount/umount02.c
@@ -231,7 +231,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -348,7 +348,7 @@
 		if (Type != NULL) {
 			free(Type);
 		}
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* make a temp directory */
diff --git a/testcases/kernel/syscalls/umount/umount03.c b/testcases/kernel/syscalls/umount/umount03.c
index 21fd504..d449af6 100644
--- a/testcases/kernel/syscalls/umount/umount03.c
+++ b/testcases/kernel/syscalls/umount/umount03.c
@@ -182,7 +182,7 @@
 
 			/* Switch to nobody user */
 			if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-				tst_brkm(TBROK, tst_exit, "\"nobody\" user"
+				tst_brkm(TBROK, NULL, "\"nobody\" user"
 					 "not present");
 			}
 			if (setuid(ltpuser->pw_uid) == -1) {
@@ -221,7 +221,7 @@
 	/* cleanup and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -239,7 +239,7 @@
 		if (Type != NULL) {
 			free(Type);
 		}
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 
 	/* Switch to nobody user */
@@ -247,13 +247,13 @@
 		if (Type != NULL) {
 			free(Type);
 		}
-		tst_brkm(TBROK, tst_exit, "\"nobody\" user not present");
+		tst_brkm(TBROK, NULL, "\"nobody\" user not present");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		if (Type != NULL) {
 			free(Type);
 		}
-		tst_brkm(TBROK, tst_exit, "setuid failed to set the "
+		tst_brkm(TBROK, NULL, "setuid failed to set the "
 			 "effective uid to %d", ltpuser->pw_uid);
 	}
 	/* make a temp directory */
diff --git a/testcases/kernel/syscalls/uname/uname01.c b/testcases/kernel/syscalls/uname/uname01.c
index 97b4e8a..fb38f75 100644
--- a/testcases/kernel/syscalls/uname/uname01.c
+++ b/testcases/kernel/syscalls/uname/uname01.c
@@ -136,7 +136,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/uname/uname02.c b/testcases/kernel/syscalls/uname/uname02.c
index a5475a2..7b3fbc0 100644
--- a/testcases/kernel/syscalls/uname/uname02.c
+++ b/testcases/kernel/syscalls/uname/uname02.c
@@ -74,10 +74,16 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -114,7 +120,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/uname/uname03.c b/testcases/kernel/syscalls/uname/uname03.c
index 0802f31..0c6f754 100644
--- a/testcases/kernel/syscalls/uname/uname03.c
+++ b/testcases/kernel/syscalls/uname/uname03.c
@@ -75,8 +75,12 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+>>>>>>> master
+	 }
 
 	setup();		/* global setup */
 
@@ -85,7 +89,7 @@
 	if ((buf = (struct utsname *)malloc((size_t)
 					    sizeof(struct utsname))) == NULL) {
 		tst_brkm(TBROK, cleanup, "malloc failed for buf");
-	 /*NOTREACHED*/}
+	 }
 
 	/* The following loop checks looping state if -i option given */
 
@@ -121,7 +125,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/unlink/unlink05.c b/testcases/kernel/syscalls/unlink/unlink05.c
index 4ac9c3d..545645d 100644
--- a/testcases/kernel/syscalls/unlink/unlink05.c
+++ b/testcases/kernel/syscalls/unlink/unlink05.c
@@ -139,7 +139,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
index 8419fc2..5fb89dc 100644
--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
@@ -105,7 +105,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c
index d41edd1..2a2c968 100644
--- a/testcases/kernel/syscalls/unshare/unshare01.c
+++ b/testcases/kernel/syscalls/unshare/unshare01.c
@@ -173,18 +173,18 @@
 
 			TEST(pid1 = fork());    //call to fork()
 			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-				    "fork() failed.");
+				tst_brkm(TFAIL|TTERRNO, cleanup, "fork failed");
 			} else if (TEST_RETURN == 0) {
-				TEST_RETURN = unshare(CLONE_FS);
+				TEST(unshare(CLONE_FS));
 				if (TEST_RETURN == 0) {
 					printf("unshare with CLONE_FILES call "
 					    "succeeded\n");
 					rval = 0;
 				} else if (TEST_RETURN == -1) {
-					if (errno == ENOSYS) {
+					if (TEST_ERRNO == ENOSYS) {
 						rval = 1;
 					} else {
+						errno = TEST_ERRNO;
 						perror("unshare failed");
 						rval = 2;
 					}
@@ -210,21 +210,21 @@
 				}
 			}
 
-			TEST(pid1 = fork());    //call to fork()
+			pid1 = fork();
 			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-				    "fork() failed.");
-			} else if (TEST_RETURN == 0) {
-				TEST_RETURN = unshare(CLONE_FS);
+				tst_brkm(TFAIL|TERRNO, cleanup,
+				    "fork failed");
+			} else if (pid1 == 0) {
+				TEST(unshare(CLONE_FS));
 				if (TEST_RETURN == 0) {
-					tst_resm(TPASS,
-						"unshare with CLONE_FS call "
-						"succeeded");
+					printf("unshare with CLONE_FS call "
+					    "succeeded\n");
 					rval = 0;
 				} else if (TEST_RETURN == -1) {
-					if (errno == ENOSYS) {
+					if (TEST_ERRNO == ENOSYS) {
 						rval = 1;
 					} else {
+						errno = TEST_ERRNO;
 						perror("unshare failed");
 						rval = 2;
 					}
@@ -250,20 +250,21 @@
 				}
 			}
 
-			TEST(pid1 = fork());    //call to fork()
-			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
+			pid1 = fork();
+			if (pid1 == -1) {
+				tst_brkm(TFAIL|TERRNO, cleanup,
 				    "fork() failed.");
 			} else if (TEST_RETURN == 0) {
-				TEST_RETURN = unshare(CLONE_NEWNS);
+				TEST(unshare(CLONE_NEWNS));
 				if (TEST_RETURN == 0) {
 					printf("unshare call with CLONE_NEWNS "
 					    "succeeded\n");
 					rval = 0;
 				} else if (TEST_RETURN == -1) {
-					if (errno == ENOSYS) {
+					if (TEST_ERRNO == ENOSYS) {
 						rval = 1;
 					} else {
+						errno = TEST_ERRNO;
 						perror("unshare failed");
 						rval = 2;
 					}
diff --git a/testcases/kernel/syscalls/unshare/unshare02.c b/testcases/kernel/syscalls/unshare/unshare02.c
index 332ab50..c97e65b 100644
--- a/testcases/kernel/syscalls/unshare/unshare02.c
+++ b/testcases/kernel/syscalls/unshare/unshare02.c
@@ -146,7 +146,7 @@
 				TEST_RETURN = unshare(-1);
 				if (TEST_RETURN == 0) {
 					printf("Call unexpectedly succeeded\n");
-					exit(1);
+					rval = 1;
 				} else if (TEST_RETURN == -1) {
 					if (errno == EINVAL) {
 						printf("Got EINVAL\n");
diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
index fb5d896..dbb9243 100644
--- a/testcases/kernel/syscalls/ustat/ustat01.c
+++ b/testcases/kernel/syscalls/ustat/ustat01.c
@@ -88,9 +88,15 @@
 	char *msg;
 
 	/*parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(argc, argv, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -131,19 +137,19 @@
 
 	/* Allocate memory for stat and ustat structure variables */
 	if ((buf = (struct stat *)malloc(sizeof(struct stat))) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	if ((ubuf = (struct ustat *)malloc(sizeof(struct ustat))) == NULL) {
 		free(buf);
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	/*Find out device number for a file-system */
 	if (stat("/", buf) != 0) {
 		free(buf);
 		free(ubuf);
-		tst_brkm(TBROK, tst_exit, "Couldn't find device number");
+		tst_brkm(TBROK, NULL, "Couldn't find device number");
 	}
 
 	dev_num = buf->st_dev;
diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
index a954fbf..3741d20 100644
--- a/testcases/kernel/syscalls/ustat/ustat02.c
+++ b/testcases/kernel/syscalls/ustat/ustat02.c
@@ -110,9 +110,15 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
+<<<<<<< HEAD
+	if ((msg = parse_opts(ac, av, NULL, NULL))
+	    != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL))
 	    != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	/* perform global setup for test */
@@ -152,7 +158,7 @@
 	/*Clean up and exit */
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 }				/*End of main */
 
 /* setup() - performs all ONE TIME setup for this test */
@@ -171,19 +177,19 @@
 
 	/* Allocating memory for ustat and stat structure variables */
 	if ((ubuf = (struct ustat *)malloc(sizeof(struct ustat))) == NULL) {
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	if ((buf = (struct stat *)malloc(sizeof(struct stat))) == NULL) {
 		free(ubuf);
-		tst_brkm(TBROK, tst_exit, "Failed to allocate Memory");
+		tst_brkm(TBROK, NULL, "Failed to allocate Memory");
 	}
 
 	/* Finding out a valid device number */
 	if (stat("/", buf) != 0) {
 		free(buf);
 		free(ubuf);
-		tst_brkm(TBROK, tst_exit, "stat(2) failed. Exiting without"
+		tst_brkm(TBROK, NULL, "stat(2) failed. Exiting without"
 			 "invoking ustat(2)");
 	}
 	dev_num[1] = buf->st_dev;
diff --git a/testcases/kernel/syscalls/utils/include_j_h.h b/testcases/kernel/syscalls/utils/include_j_h.h
index 4340c13..ff6aaf4 100644
--- a/testcases/kernel/syscalls/utils/include_j_h.h
+++ b/testcases/kernel/syscalls/utils/include_j_h.h
@@ -60,17 +60,6 @@
 		fprintf(REG_DETAIL_LOG_FP, __VA_ARGS__);	\
 	} while (0)
 
-
-/*
- * DPRINTF : macro to output debug message
- */
-#define DPRINTF(...)						\
-	do {							\
-		if (opt_debug)					\
-			PRINTF("[DEBUG] " __VA_ARGS__);		\
-	} while (0)
-
-
 /*
  * PRINT_XXX : macro to output test result and expect
  */
diff --git a/testcases/kernel/syscalls/utime/utime01.c b/testcases/kernel/syscalls/utime/utime01.c
index 53bee56..55b5d2c 100644
--- a/testcases/kernel/syscalls/utime/utime01.c
+++ b/testcases/kernel/syscalls/utime/utime01.c
@@ -105,7 +105,11 @@
 	time_t pres_time;	/* file modification/access/present time */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -163,7 +167,7 @@
 						 "failed to get present time "
 						 "after utime, error=%d",
 						 errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/*
 				 * Get the modification and access times of
@@ -173,7 +177,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 /*NOTREACHED*/}
+				 }
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -199,7 +203,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -233,20 +237,20 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime02.c b/testcases/kernel/syscalls/utime/utime02.c
index 8ccac0c..cfdbbbe 100644
--- a/testcases/kernel/syscalls/utime/utime02.c
+++ b/testcases/kernel/syscalls/utime/utime02.c
@@ -110,7 +110,11 @@
 	time_t pres_time;	/* file modification/access/present time */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -168,7 +172,7 @@
 						 "failed to get present time "
 						 "after utime, error=%d",
 						 errno);
-				 /*NOTREACHED*/}
+				 }
 
 				/*
 				 * Get the modification and access times of
@@ -178,7 +182,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, errno:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 /*NOTREACHED*/}
+				 }
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -204,7 +208,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -223,7 +227,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
@@ -247,20 +251,20 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime03.c b/testcases/kernel/syscalls/utime/utime03.c
index 40effa5..eb2c1ff 100644
--- a/testcases/kernel/syscalls/utime/utime03.c
+++ b/testcases/kernel/syscalls/utime/utime03.c
@@ -121,7 +121,11 @@
 	pid_t pid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -197,7 +201,7 @@
 							 "present time after "
 							 "utime, error=%d",
 							 errno);
-					 /*NOTREACHED*/}
+					 }
 
 					/*
 					 * Get the modification and access
@@ -209,7 +213,7 @@
 							 "stat(2) of %s failed, "
 							 "error:%d", TEMP_FILE,
 							 TEST_ERRNO);
-					 /*NOTREACHED*/}
+					 }
 					modf_time = stat_buf.st_mtime;
 					access_time = stat_buf.st_atime;
 
@@ -246,7 +250,7 @@
 	}
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -284,7 +288,7 @@
 
 	/* get the name of the temporary directory */
 	if ((tmpd = getcwd(tmpd, 0)) == NULL) {
-		tst_brkm(TBROK, tst_exit, "getcwd failed");
+		tst_brkm(TBROK, NULL, "getcwd failed");
 	}
 
 	/* Creat a temporary file under above directory */
@@ -292,14 +296,14 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Make sure that specified Mode permissions set as
@@ -309,7 +313,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "chmod(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 /*NOTREACHED*/}
+	 }
 
 	if (chmod(tmpd, 0711) != 0) {
 		tst_brkm(TBROK, cleanup, "chmod() failed");
@@ -318,7 +322,7 @@
 	if ((ltpuser = getpwnam(LTPUSER2)) == NULL) {
 		tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 			 LTPUSER2);
-	 /*NOTREACHED*/}
+	 }
 
 	/* get uid/gid of user accordingly */
 	user_uid = ltpuser->pw_uid;
@@ -331,13 +335,13 @@
 	if (chown(TEMP_FILE, user_uid, group_gid) < 0) {
 		tst_brkm(TBROK, cleanup, "chown() of %s failed, error %d",
 			 TEMP_FILE, errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 /*NOTREACHED*/}
+	 }
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime04.c b/testcases/kernel/syscalls/utime/utime04.c
index 691cf66..f9141c1 100644
--- a/testcases/kernel/syscalls/utime/utime04.c
+++ b/testcases/kernel/syscalls/utime/utime04.c
@@ -104,7 +104,11 @@
 	/* file modification/access time */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -148,7 +152,7 @@
 						 "stat(2) of %s failed, "
 						 "error:%d", TEMP_FILE,
 						 TEST_ERRNO);
-				 /*NOTREACHED*/}
+				 }
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -172,7 +176,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
diff --git a/testcases/kernel/syscalls/utime/utime05.c b/testcases/kernel/syscalls/utime/utime05.c
index 6f6aa93..eb41bc1 100644
--- a/testcases/kernel/syscalls/utime/utime05.c
+++ b/testcases/kernel/syscalls/utime/utime05.c
@@ -110,7 +110,11 @@
 	/* file modification/access time */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -153,7 +157,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 /*NOTREACHED*/}
+				 }
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -177,7 +181,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	tst_exit();
 
 }				/* End main */
 
@@ -196,7 +200,7 @@
 
 	/* Switch to nobody user for correct error code collection */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1) {
diff --git a/testcases/kernel/syscalls/utime/utime06.c b/testcases/kernel/syscalls/utime/utime06.c
index 931d166..84acb53 100644
--- a/testcases/kernel/syscalls/utime/utime06.c
+++ b/testcases/kernel/syscalls/utime/utime06.c
@@ -137,7 +137,11 @@
 	int pid;
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -153,11 +157,11 @@
 
 	if (pid == -1) {
 		tst_brkm(TBROK, cleanup, "fork() failed");
-	 /*NOTREACHED*/} else if (pid == 0) {
+	 } else if (pid == 0) {
 		if ((ltpuser = getpwnam(LTPUSER1)) == NULL) {
 			tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 				 LTPUSER1);
-		 /*NOTREACHED*/}
+		 }
 
 		/* get uid of user */
 		user_uid = ltpuser->pw_uid;
@@ -219,7 +223,7 @@
 	}
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }				/* End main */
 
@@ -291,7 +295,7 @@
 	if ((ltpuser = getpwnam(LTPUSER2)) == NULL) {
 		tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 			 LTPUSER2);
-	 /*NOTREACHED*/}
+	 }
 
 	/* get uid/gid of user accordingly */
 	user_uid = ltpuser->pw_uid;
@@ -300,7 +304,7 @@
 	if (chown(TEMP_FILE, user_uid, group_gid) < 0) {
 		tst_brkm(TBROK, cleanup, "chown() of %s failed, error %d",
 			 TEMP_FILE, errno);
-	 /*NOTREACHED*/}
+	 }
 
 	return 0;
 }				/* End of setup1 */
diff --git a/testcases/kernel/syscalls/utimes/utimes01.c b/testcases/kernel/syscalls/utimes/utimes01.c
index 30a9fdd..8377780 100644
--- a/testcases/kernel/syscalls/utimes/utimes01.c
+++ b/testcases/kernel/syscalls/utimes/utimes01.c
@@ -1,47 +1,47 @@
 /******************************************************************************/
-/* Copyright (c) Crackerjack Project., 2007 ,Hitachi, Ltd                     */
-/*          Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
-/*                                                                  	      */
+/* Copyright (c) Crackerjack Project., 2007 ,Hitachi, Ltd		     */
+/*	  Author(s): Takahiro Yasui <takahiro.yasui.mp@hitachi.com>,	      */
+/*								  	      */
 /* This program is free software;  you can redistribute it and/or modify      */
 /* it under the terms of the GNU General Public License as published by       */
-/* the Free Software Foundation; either version 2 of the License, or          */
-/* (at your option) any later version.                                        */
-/*                                                                            */
-/* This program is distributed in the hope that it will be useful,            */
-/* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
-/* the GNU General Public License for more details.                           */
-/*                                                                            */
-/* You should have received a copy of the GNU General Public License          */
-/* along with this program;  if not, write to the Free Software               */
+/* the Free Software Foundation; either version 2 of the License, or	  */
+/* (at your option) any later version.					*/
+/*									    */
+/* This program is distributed in the hope that it will be useful,	    */
+/* but WITHOUT ANY WARRANTY;  without even the implied warranty of	    */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See		  */
+/* the GNU General Public License for more details.			   */
+/*									    */
+/* You should have received a copy of the GNU General Public License	  */
+/* along with this program;  if not, write to the Free Software	       */
 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
-/*                                                                            */
+/*									    */
 /******************************************************************************/
 /******************************************************************************/
-/*                                                                            */
-/* File:        utimes01.c                                                    */
-/*                                                                            */
-/* Description: This tests the utimes() syscall                               */
+/*									    */
+/* File:	utimes01.c						    */
+/*									    */
+/* Description: This tests the utimes() syscall			       */
 /*									      */
 /* 									      */
 /*									      */
 /*									      */
 /*									      */
-/*                                                                            */
-/* Usage:  <for command-line>                                                 */
-/* utimes01 [-c n] [-e][-i n] [-I x] [-p x] [-t]                              */
-/*      where,  -c n : Run n copies concurrently.                             */
-/*              -e   : Turn on errno logging.                                 */
-/*              -i n : Execute test n times.                                  */
-/*              -I x : Execute test for x seconds.                            */
-/*              -P x : Pause for x seconds between iterations.                */
-/*              -t   : Turn on syscall timing.                                */
-/*                                                                            */
-/* Total Tests: 1                                                             */
-/*                                                                            */
-/* Test Name:   utimes01                                                      */
-/* History:     Porting from Crackerjack to LTP is done by                    */
-/*              Manas Kumar Nayak maknayak@in.ibm.com>                        */
+/*									    */
+/* Usage:  <for command-line>						 */
+/* utimes01 [-c n] [-e][-i n] [-I x] [-p x] [-t]			      */
+/*      where,  -c n : Run n copies concurrently.			     */
+/*	      -e   : Turn on errno logging.				 */
+/*	      -i n : Execute test n times.				  */
+/*	      -I x : Execute test for x seconds.			    */
+/*	      -P x : Pause for x seconds between iterations.		*/
+/*	      -t   : Turn on syscall timing.				*/
+/*									    */
+/* Total Tests: 1							     */
+/*									    */
+/* Test Name:   utimes01						      */
+/* History:     Porting from Crackerjack to LTP is done by		    */
+/*	      Manas Kumar Nayak maknayak@in.ibm.com>			*/
 /******************************************************************************/
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -53,8 +53,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <stdio.h>
-#include <libgen.h>
-
 
 #include "../utils/include_j_h.h"
 #include "../utils/common_j_h.c"
@@ -66,66 +64,66 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int Tst_count;           /* counter for tst_xxx routines.         */
-extern char *TESTDIR;           /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;	   /* counter for tst_xxx routines.	 */
+extern char *TESTDIR;	   /* temporary dir created by tst_tmpdir() */
 
 /* Global Variables */
 char *TCID = "utimes01";  /* Test program identifier.*/
 int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    cleanup                                                       */
-/*                                                                            */
+/*									    */
+/* Function:    cleanup						       */
+/*									    */
 /* Description: Performs all one time clean up for this test on successful    */
-/*              completion,  premature exit or  failure. Closes all temporary */
-/*              files, removes all temporary directories exits the test with  */
-/*              appropriate return code by calling tst_exit() function.       */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
+/*	      completion,  premature exit or  failure. Closes all temporary */
+/*	      files, removes all temporary directories exits the test with  */
+/*	      appropriate return code by calling tst_exit() function.       */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
 /* Return:      On failure - Exits calling tst_exit(). Non '0' return code.   */
-/*              On success - Exits calling tst_exit(). With '0' return code.  */
-/*                                                                            */
+/*	      On success - Exits calling tst_exit(). With '0' return code.  */
+/*									    */
 /******************************************************************************/
 extern void cleanup() {
-        /* Remove tmp dir and all files in it */
-        TEST_CLEANUP;
-        tst_rmdir();
+	/* Remove tmp dir and all files in it */
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        /* Exit with appropriate return code. */
-        tst_exit();
+	/* Exit with appropriate return code. */
+	tst_exit();
 }
 
 /* Local  Functions */
 /******************************************************************************/
-/*                                                                            */
-/* Function:    setup                                                         */
-/*                                                                            */
+/*									    */
+/* Function:    setup							 */
+/*									    */
 /* Description: Performs all one time setup for this test. This function is   */
-/*              typically used to capture signals, create temporary dirs      */
-/*              and temporary files that may be used in the course of this    */
-/*              test.                                                         */
-/*                                                                            */
-/* Input:       None.                                                         */
-/*                                                                            */
-/* Output:      None.                                                         */
-/*                                                                            */
-/* Return:      On failure - Exits by calling cleanup().                      */
-/*              On success - returns 0.                                       */
-/*                                                                            */
+/*	      typically used to capture signals, create temporary dirs      */
+/*	      and temporary files that may be used in the course of this    */
+/*	      test.							 */
+/*									    */
+/* Input:       None.							 */
+/*									    */
+/* Output:      None.							 */
+/*									    */
+/* Return:      On failure - Exits by calling cleanup().		      */
+/*	      On success - returns 0.				       */
+/*									    */
 /******************************************************************************/
 void setup() {
-        tst_require_root(tst_exit);
+	tst_require_root(tst_exit);
 
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 
@@ -134,17 +132,10 @@
  */
 #define SYSCALL_NAME    "utimes"
 
-
-/*
- * Global variables
- */
-static int opt_debug;
-static char *progname;
-
 enum test_type {
-		NORMAL,
-		FILE_NOT_EXIST,
-	        NO_FNAME,
+	NORMAL,
+	FILE_NOT_EXIST,
+	NO_FNAME,
 };
 
 
@@ -153,11 +144,11 @@
  */
 struct test_case {
 	int ttype;
-        long a_sec;
-        long m_sec;
-        char *user;
-        int ret;
-        int err;
+	long a_sec;
+	long m_sec;
+	char *user;
+	int ret;
+	int err;
 
 };
 
@@ -166,50 +157,50 @@
  *
  *   test status of errors on man page
  *
- *   EACCES             v (permission denied)
- *   ENOENT             v (file does not exist)
+ *   EACCES	     v (permission denied)
+ *   ENOENT	     v (file does not exist)
  *
  *   test status of errors on man page
  *
- *   EFAULT             v (points to not process address space)
+ *   EFAULT	     v (points to not process address space)
  */
 
 static struct test_case tcase[] = {
 	{ // case00
-                .ttype          = NORMAL,
-                .a_sec          = 0,
-                .m_sec          = 1000,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case01
-                .ttype          = NORMAL,
-                .a_sec          = 1000,
-                .m_sec          = 0,
-                .ret            = 0,
-                .err            = 0,
-        },
-        { // case02
-                .ttype          = NORMAL,
-                .user           = "nobody",
-                .ret            = -1,
-                .err            = EACCES, // RHEL4U1 + 2.6.18 returns EPERM
-        },
-        { // case03
-                .ttype          = FILE_NOT_EXIST,
-                .a_sec          = 1000,
-                .m_sec          = 2000,
-                .ret            = -1,
-                .err            = ENOENT,
-        },
+		.ttype	  = NORMAL,
+		.a_sec	  = 0,
+		.m_sec	  = 1000,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case01
+		.ttype	  = NORMAL,
+		.a_sec	  = 1000,
+		.m_sec	  = 0,
+		.ret	    = 0,
+		.err	    = 0,
+	},
+	{ // case02
+		.ttype	  = NORMAL,
+		.user	   = "nobody",
+		.ret	    = -1,
+		.err	    = EACCES, // RHEL4U1 + 2.6.18 returns EPERM
+	},
+	{ // case03
+		.ttype	  = FILE_NOT_EXIST,
+		.a_sec	  = 1000,
+		.m_sec	  = 2000,
+		.ret	    = -1,
+		.err	    = ENOENT,
+	},
 
 	{ // case04
-                .ttype          = NO_FNAME,
-                .a_sec          = 1000,
-                .m_sec          = 2000,
-                .ret            = -1,
-                .err            = EFAULT,
-        },
+		.ttype	  = NO_FNAME,
+		.a_sec	  = 1000,
+		.m_sec	  = 2000,
+		.ret	    = -1,
+		.err	    = EFAULT,
+	},
 };
 
 /*
@@ -222,34 +213,62 @@
 
 static int do_test(struct test_case *tc)
 {
-        int sys_ret;
-        int sys_errno;
-        int result = RESULT_OK;
+	int sys_ret;
+	int sys_errno;
+	int result = RESULT_OK;
 	struct timeval tv[2];
-        char fpath[PATH_MAX], c = '\0';
-        int rc, len, cmp_ok = 1;
-        struct stat st;
-        uid_t old_uid;
+	char fpath[PATH_MAX], c = '\0';
+	int rc, len, cmp_ok = 1;
+	struct stat st;
+	uid_t old_uid;
 
-        TEST(rc = setup_file(TESTDIR, "test.file", fpath));
-        if (rc < 0)
-                return 1;
+	TEST(rc = setup_file(TESTDIR, "test.file", fpath));
+	if (rc < 0)
+		return 1;
 	/* The test just needs the file, so no need to keep it open. */
 	close(rc);
 
 	/*
-         * Change effective user id
-         */
-        if (tc->user != NULL) {
-                TEST(rc = setup_euid(tc->user, &old_uid));
-                if (rc < 0)
-                        goto EXIT2;
-        }
+	 * Change effective user id
+	 */
+	if (tc->user != NULL) {
+		TEST(rc = setup_euid(tc->user, &old_uid));
+		if (rc < 0)
+			goto EXIT2;
+	}
 
-        /*
-         * Execute system call
-         */
+	/*
+	 * Execute system call
+	 */
 	memset(tv, 0, 2 * sizeof(struct timeval));
+<<<<<<< HEAD
+	tv[0].tv_sec = tc->a_sec;
+	tv[1].tv_sec = tc->m_sec;
+	TEST(len = strlen(fpath));
+	if (tc->ttype == FILE_NOT_EXIST) {
+		c = fpath[len - 1];
+		fpath[len - 1] = '\0';
+	}
+	errno = 0;
+	if (tc->ttype == NO_FNAME) {
+		/**
+		 * Note (garrcoop):
+		 *
+		 * If you do NULL directly, then gcc [4.3] will complain when
+		 * one specifies -Wnonnull in CPPFLAGS. This is a negative
+		 * test, but let's not allow the compiler to complain about
+		 * something trivial like this.
+		 **/
+		const char *dummy = NULL;
+		TEST(sys_ret = utimes(dummy, tv));
+	}
+	else {
+		if (tc->user == NULL)
+			TEST(sys_ret = utimes(fpath, tv));
+		else
+			TEST(sys_ret = utimes(fpath, NULL));
+	}
+=======
         tv[0].tv_sec = tc->a_sec;
         tv[1].tv_sec = tc->m_sec;
         TEST(len = strlen(fpath));
@@ -276,63 +295,48 @@
                 else
                         TEST(sys_ret = utimes(fpath, NULL));
         }
+>>>>>>> master
 	sys_errno = errno;
-        if (tc->ttype == FILE_NOT_EXIST)
-                fpath[len - 1] = c;
-        if (sys_ret < 0)
-                goto TEST_END;
+	if (tc->ttype == FILE_NOT_EXIST)
+		fpath[len - 1] = c;
+	if (sys_ret < 0)
+		goto TEST_END;
 
 	/*
-         * Check test file's time stamp
-         */
-        rc = stat(fpath, &st);
-        if (rc < 0) {
-                EPRINTF("stat failed.\n");
-                result = 1;
-                goto EXIT1;
-        }
-        tst_resm(TINFO,"E:%ld,%ld <=> R:%ld,%ld",tv[0].tv_sec, tv[1].tv_sec, st.st_atime, st.st_mtime);
-        cmp_ok = st.st_atime == tv[0].tv_sec && st.st_mtime == tv[1].tv_sec;
+	 * Check test file's time stamp
+	 */
+	rc = stat(fpath, &st);
+	if (rc < 0) {
+		EPRINTF("stat failed.\n");
+		result = 1;
+		goto EXIT1;
+	}
+	tst_resm(TINFO,"E:%ld,%ld <=> R:%ld,%ld",tv[0].tv_sec, tv[1].tv_sec, st.st_atime, st.st_mtime);
+	cmp_ok = st.st_atime == tv[0].tv_sec && st.st_mtime == tv[1].tv_sec;
 
-        /*
-         * Check results
-         */
+	/*
+	 * Check results
+	 */
 TEST_END:
-        result |= (sys_errno != tc->err) || !cmp_ok;
-        PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	result |= (sys_errno != tc->err) || !cmp_ok;
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
 
-        /*
-         * Restore effective user id
-         */
+	/*
+	 * Restore effective user id
+	 */
 EXIT1:
-        if (tc->user != NULL) {
-                TEST(rc = cleanup_euid(old_uid));
-                if (rc < 0)
-                        return 1;
-        }
+	if (tc->user != NULL) {
+		TEST(rc = cleanup_euid(old_uid));
+		if (rc < 0)
+			return 1;
+	}
 EXIT2:
-        TEST(cleanup_file(fpath));
+	TEST(cleanup_file(fpath));
 
-        return result;
+	return result;
 }
 
 /*
- * usage()
- */
-
-static void usage(const char *progname)
-{
-        tst_resm(TINFO,"usage: %s [options]", progname);
-        tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-        tst_resm(TINFO,"options:");
-        tst_resm(TINFO,"    -d --debug           Show debug messages");
-        tst_resm(TINFO,"    -h --help            Show this message");
-        tst_resm(TINFO,"NG");
-        exit(1);
-}
-
-
-/*
  * main()
  */
 
@@ -340,6 +344,34 @@
 
 int main(int ac, char **av) {
 	int result = RESULT_OK;
+<<<<<<< HEAD
+	int i;
+	int lc;		 /* loop counter */
+	char *msg;	      /* message returned from parse_opts */
+
+	/* parse standard options */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+
+	setup();
+
+	/* Check looping state if -i option given */
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+
+			/*
+			 * Execute test
+	 		 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+				int ret;
+				tst_resm(TINFO, "(case%02d) START", i);
+				ret = do_test(&tcase[i]);
+				tst_resm(TINFO, "(case%02d) END => %s",
+					i, (ret == 0) ? "OK" : "NG");
+				result |= ret;
+			}
+=======
         int c;
         int i;
         int lc;                 /* loop counter */
@@ -374,7 +406,7 @@
                 		        break;
 		                default:
                 		        usage(progname);
-                        		// NOTREACHED
+                        		
                 		}
 		        }
 
@@ -382,7 +414,7 @@
 		if (ac != optind) {
         	        tst_resm(TINFO,"Options are not match.");
                 	usage(progname);
-                	// NOTREACHED
+                	
 	        }
 
 		/*
@@ -395,26 +427,23 @@
 	                tst_resm(TINFO,"(case%02d) END => %s", i, (ret == 0) ? "OK" : "NG");
 	                result |= ret;
         	}
+>>>>>>> master
 		
-		/*
-        	 * Check results
-         	*/
-        	switch(result) {
-	        case RESULT_OK:
-        			tst_resm(TPASS, "utimes call succeeded ");
-		                break;
+			/*
+			 * Check results
+		 	 */
+			switch(result) {
+			case RESULT_OK:
+				tst_resm(TPASS, "utimes call succeeded ");
+				break;
 
-	        default:
-                 	   	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-        		        tst_resm(TINFO,"NG");
-				cleanup();
-				tst_exit();
-		                break;
-        	}
+			default:
+		 	   	tst_brkm(TFAIL|TERRNO, cleanup, "utimes failed");
+				break;
+			}
 
-                }
-        }	
-        cleanup();
+		}
+	}	
+	cleanup();
 	tst_exit();
 }
-
diff --git a/testcases/kernel/syscalls/vfork/vfork01.c b/testcases/kernel/syscalls/vfork/vfork01.c
index ca32611..9ac3b1a 100644
--- a/testcases/kernel/syscalls/vfork/vfork01.c
+++ b/testcases/kernel/syscalls/vfork/vfork01.c
@@ -115,7 +115,11 @@
 	int exit_status;	/* exit status of child process */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
@@ -185,7 +189,7 @@
 				 * Get the pathname of current working
 				 * directory for the child process.
 				 */
-				if ((Ccwd = (char *)getcwd((char *)NULL,
+				if ((Ccwd = (char *)getcwd(NULL,
 							   BUFSIZ)) == NULL) {
 					tst_resm(TFAIL, "getcwd failed for the "
 						 "child process");
@@ -299,7 +303,7 @@
 
 	/* Call cleanup() to undo setup done for the test. */
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }				/* End main */
 
 /*
@@ -340,7 +344,7 @@
 	 * Get the pathname of current working directory of the parent
 	 * process.
 	 */
-	if ((Pcwd = (char *)getcwd((char *)NULL, BUFSIZ)) == NULL) {
+	if ((Pcwd = (char *)getcwd(NULL, BUFSIZ)) == NULL) {
 		tst_brkm(TFAIL, cleanup,
 			 "getcwd failed for the parent process");
 	}
diff --git a/testcases/kernel/syscalls/vfork/vfork02.c b/testcases/kernel/syscalls/vfork/vfork02.c
index 17ad336..386d2f8 100644
--- a/testcases/kernel/syscalls/vfork/vfork02.c
+++ b/testcases/kernel/syscalls/vfork/vfork02.c
@@ -98,7 +98,11 @@
 	sigset_t PendSig;	/* variable to hold pending signal */
 
 	/* Parse standard options given to run the test. */
+<<<<<<< HEAD
+	msg = parse_opts(ac, av, NULL, NULL);
+=======
 	msg = parse_opts(ac, av, (option_t *) NULL, NULL);
+>>>>>>> master
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/vhangup/vhangup01.c b/testcases/kernel/syscalls/vhangup/vhangup01.c
index cf3204d..1ac45fd 100644
--- a/testcases/kernel/syscalls/vhangup/vhangup01.c
+++ b/testcases/kernel/syscalls/vhangup/vhangup01.c
@@ -74,8 +74,8 @@
 	struct passwd *nobody;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -90,7 +90,7 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TFAIL, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid > 0) {	/* parent */
+		 } else if (pid > 0) {	/* parent */
 			waitpid(pid, &status, 0);
 			_exit(0);	/*
 					 * Exit here and let the child clean up.
@@ -105,12 +105,12 @@
 			if (retval < 0) {
 				perror("setreuid");
 				tst_brkm(TFAIL, cleanup, "setreuid failed");
-			 /*NOTREACHED*/}
+			 }
 			TEST(vhangup());
 			if (TEST_RETURN != -1) {
 				tst_brkm(TFAIL, cleanup, "vhangup() failed to "
 					 "fail");
-			 /*NOTREACHED*/} else if (TEST_ERRNO == EPERM) {
+			 } else if (TEST_ERRNO == EPERM) {
 				TEST_ERROR_LOG(TEST_ERRNO);
 				tst_resm(TPASS, "Got EPERM as expected.");
 			} else {
@@ -121,7 +121,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -155,4 +155,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/vhangup/vhangup02.c b/testcases/kernel/syscalls/vhangup/vhangup02.c
index 707ac03..05ab94c 100644
--- a/testcases/kernel/syscalls/vhangup/vhangup02.c
+++ b/testcases/kernel/syscalls/vhangup/vhangup02.c
@@ -66,8 +66,8 @@
 	int status;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -82,14 +82,14 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TFAIL, cleanup, "fork failed");
-		 /*NOTREACHED*/} else if (pid > 0) {	/* parent */
+		 } else if (pid > 0) {	/* parent */
 			waitpid(pid, &status, 0);
 			_exit(0);
 		} else {	/* child */
 			pid1 = setsid();
 			if (pid1 < 0) {
 				tst_brkm(TFAIL, cleanup, "setsid failed");
-			 /*NOTREACHED*/}
+			 }
 			TEST(vhangup());
 			if (TEST_RETURN == -1) {
 				tst_resm(TFAIL, "vhangup() failed, errno:%d",
@@ -100,7 +100,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -131,4 +131,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice01.c b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
index 069fa03..b4690b6 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice01.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
@@ -101,7 +101,11 @@
 	 * parse standard options
 	 ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
 	/***************************************************************
 	 * perform global setup for test
diff --git a/testcases/kernel/syscalls/wait/wait02.c b/testcases/kernel/syscalls/wait/wait02.c
index 4d34e2a..aa21967 100644
--- a/testcases/kernel/syscalls/wait/wait02.c
+++ b/testcases/kernel/syscalls/wait/wait02.c
@@ -139,7 +139,11 @@
      * parse standard options
      ***************************************************************/
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 
     /***************************************************************
      * perform global setup for test
diff --git a/testcases/kernel/syscalls/wait4/wait401.c b/testcases/kernel/syscalls/wait4/wait401.c
index d94ff29..0ff8976 100644
--- a/testcases/kernel/syscalls/wait4/wait401.c
+++ b/testcases/kernel/syscalls/wait4/wait401.c
@@ -81,7 +81,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -155,7 +159,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/wait4/wait402.c b/testcases/kernel/syscalls/wait4/wait402.c
index bf10348..e226f66 100644
--- a/testcases/kernel/syscalls/wait4/wait402.c
+++ b/testcases/kernel/syscalls/wait4/wait402.c
@@ -102,7 +102,11 @@
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 	}
 
 	setup();		/* global setup */
@@ -173,7 +177,7 @@
 
 	cleanup();
 
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
diff --git a/testcases/kernel/syscalls/waitid/waitid01.c b/testcases/kernel/syscalls/waitid/waitid01.c
index 460b699..b1bc831 100644
--- a/testcases/kernel/syscalls/waitid/waitid01.c
+++ b/testcases/kernel/syscalls/waitid/waitid01.c
@@ -131,7 +131,11 @@
 	
         /* parse standard options */
         if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+<<<<<<< HEAD
+             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
              tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
              tst_exit();
            }
 
diff --git a/testcases/kernel/syscalls/waitid/waitid02.c b/testcases/kernel/syscalls/waitid/waitid02.c
index 1e034f9..1d610c2 100644
--- a/testcases/kernel/syscalls/waitid/waitid02.c
+++ b/testcases/kernel/syscalls/waitid/waitid02.c
@@ -124,7 +124,11 @@
         /* parse standard options */
 	msg = parse_opts(ac, av, NULL, NULL);
 	if (msg != NULL) {
+<<<<<<< HEAD
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+=======
 		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+>>>>>>> master
 		tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/waitpid/waitpid01.c b/testcases/kernel/syscalls/waitpid/waitpid01.c
index e0392a3..323bc63 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid01.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid01.c
@@ -68,11 +68,11 @@
 	int exno, nexno, status;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	setup();
 
@@ -135,7 +135,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -169,4 +169,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/waitpid/waitpid02.c b/testcases/kernel/syscalls/waitpid/waitpid02.c
index 4c327af..038a42d 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid02.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid02.c
@@ -74,8 +74,8 @@
 	int exno, nexno, status;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 #ifdef UCLINUX
@@ -153,7 +153,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -197,4 +197,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/waitpid/waitpid03.c b/testcases/kernel/syscalls/waitpid/waitpid03.c
index db1c2c8..15dd98f 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid03.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid03.c
@@ -81,11 +81,11 @@
 	int status, pid[25], ret;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "d", &ikids_uclinux);
 #endif
@@ -162,7 +162,7 @@
 		condition_number++;
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -215,4 +215,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/waitpid/waitpid04.c b/testcases/kernel/syscalls/waitpid/waitpid04.c
index 8d1c30b..f9e4f61 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid04.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid04.c
@@ -73,7 +73,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	setup();
 
@@ -143,7 +143,7 @@
 		condition_number++;
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -177,4 +177,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/waitpid/waitpid05.c b/testcases/kernel/syscalls/waitpid/waitpid05.c
index 7001236..588bc4e 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid05.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid05.c
@@ -86,7 +86,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "d", &sig_uclinux);
 #endif
@@ -209,7 +209,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -279,4 +279,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/waitpid/waitpid06.c b/testcases/kernel/syscalls/waitpid/waitpid06.c
index 7354425..2356455 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid06.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid06.c
@@ -83,11 +83,11 @@
 	int status;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	argv0 = argv[0];
 
@@ -134,7 +134,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -180,7 +180,7 @@
 #else
 			do_exit();
 #endif
-		 /*NOTREACHED*/} else if (ret_val < 0) {
+		 } else if (ret_val < 0) {
 			tst_resm(TFAIL, "Fork kid %d failed. "
 				 "errno = %d", kid_count, errno);
 			exit(ret_val);
@@ -315,7 +315,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid07.c b/testcases/kernel/syscalls/waitpid/waitpid07.c
index 6365366..68fba38 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid07.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid07.c
@@ -84,11 +84,11 @@
 	int pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	argv0 = argv[0];
 
@@ -136,7 +136,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -184,7 +184,7 @@
 #else
 			do_exit();
 #endif
-		 /*NOTREACHED*/}
+		 }
 
 		if (ret_val < 0) {
 			tst_resm(TFAIL, "Fork kid %d failed. "
@@ -327,7 +327,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid08.c b/testcases/kernel/syscalls/waitpid/waitpid08.c
index 1c4a425..06837e2 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid08.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid08.c
@@ -83,11 +83,11 @@
 	int pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	argv0 = argv[0];
 
@@ -219,7 +219,7 @@
 			tst_resm(TFAIL, "Kill of child %d "
 				 "failed, errno = %d", i, errno);
 			tst_exit();
-		 /*NOTREACHED*/}
+		 }
 	}
 
 	/*
@@ -352,7 +352,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid09.c b/testcases/kernel/syscalls/waitpid/waitpid09.c
index 8807781..09a88f5 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid09.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid09.c
@@ -90,11 +90,11 @@
 	int fail, pid, status, ret;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_exit_uclinux, "");
 #endif
@@ -103,7 +103,7 @@
 
 	if ((pid = FORK_OR_VFORK()) < 0) {
 		tst_brkm(TFAIL, cleanup, "Fork Failed");
-	 /*NOTREACHED*/} else if (pid == 0) {
+	 } else if (pid == 0) {
 		/*
 		 * Child:
 		 * Set up to catch SIGINT.  The kids will wait till a
@@ -121,12 +121,12 @@
 			fail = 0;
 			if ((pid = FORK_OR_VFORK()) < 0) {
 				tst_brkm(TFAIL, cleanup, "Fork failed.");
-			 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+			 } else if (pid == 0) {	/* child */
 #ifdef UCLINUX
 				if (self_exec(argv[0], "") < 0) {
 					tst_brkm(TFAIL, cleanup,
 						 "self_exec failed");
-				 /*NOTREACHED*/}
+				 }
 #else
 				do_exit();
 #endif
@@ -183,7 +183,7 @@
 
 			if ((pid = FORK_OR_VFORK()) < 0) {
 				tst_brkm(TFAIL, cleanup, "Second fork failed.");
-			 /*NOTREACHED*/} else if (pid == 0) {	/* child */
+			 } else if (pid == 0) {	/* child */
 				exit(0);
 			} else {	/* parent */
 				/* Give the child time to startup and exit */
@@ -251,13 +251,13 @@
 
 		}
 		cleanup();
-	 /*NOTREACHED*/} else {	/* parent */
+	 } else {	/* parent */
 		/* wait for the child to return */
 		waitpid(pid, &status, 0);
 		if (WEXITSTATUS(status) != 0) {
 			tst_brkm(TBROK, cleanup, "child returned bad "
 				 "status");
-		 /*NOTREACHED*/}
+		 }
 	}
 
 	return 0;
@@ -274,7 +274,7 @@
 		tst_brkm(TFAIL, cleanup, "signal SIGINT failed, errno = %d",
 			 errno);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -307,7 +307,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid10.c b/testcases/kernel/syscalls/waitpid/waitpid10.c
index 854df68..b90601d 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid10.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid10.c
@@ -424,7 +424,7 @@
 		}
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 
 }
 
@@ -458,7 +458,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void alrmhandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid11.c b/testcases/kernel/syscalls/waitpid/waitpid11.c
index 3ffc4be..9b96fdc 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid11.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid11.c
@@ -82,7 +82,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_exit_uclinux, "");
 #endif
@@ -113,9 +113,9 @@
 				tst_resm(TPASS, "%s PASSED", TCID);
 			}
 			cleanup();
-		 /*NOTREACHED*/} else if (pid < 0) {
+		 } else if (pid < 0) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Set up to catch SIGINT.  The kids will wait till a SIGINT
@@ -138,17 +138,17 @@
 					tst_resm(TFAIL, "self_exec kid %d "
 						 "failed", kid_count);
 					tst_exit();
-				 /*NOTREACHED*/}
+				 }
 #else
 				do_exit();
 #endif
-			 /*NOTREACHED*/}
+			 }
 
 			if (ret_val < 0) {
 				tst_resm(TFAIL, "Fork kid %d failed. errno = "
 					 "%d", kid_count, errno);
 				tst_exit();
-			 /*NOTREACHED*/}
+			 }
 
 			/* parent */
 			fork_kid_pid[kid_count] = ret_val;
@@ -167,7 +167,7 @@
 				tst_resm(TFAIL, "Kill of child %d failed, "
 					 "errno = %d", i, errno);
 				tst_exit();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		/*
@@ -316,7 +316,7 @@
 	if ((sig_t) signal(SIGINT, inthandlr) == SIG_ERR) {
 		tst_resm(TFAIL, "signal SIGINT failed, errno = %d", errno);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -346,7 +346,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid12.c b/testcases/kernel/syscalls/waitpid/waitpid12.c
index 88c6fc9..542eb7e 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid12.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid12.c
@@ -80,11 +80,11 @@
 	int pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 #ifdef UCLINUX
 	maybe_run_child(&do_exit_uclinux, "");
 #endif
@@ -114,9 +114,9 @@
 				tst_resm(TPASS, "%s PASSED", TCID);
 			}
 			cleanup();
-		 /*NOTREACHED*/} else if (pid < 0) {
+		 } else if (pid < 0) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Set up to catch SIGINT.  The kids will wait till a SIGINT
@@ -139,17 +139,17 @@
 					tst_resm(TFAIL, "self_exec kid %d "
 						 "failed", kid_count);
 					tst_exit();
-				 /*NOTREACHED*/}
+				 }
 #else
 				do_exit();
 #endif
-			 /*NOTREACHED*/}
+			 }
 
 			if (ret_val < 0) {
 				tst_resm(TFAIL, "Fork kid %d failed. errno = "
 					 "%d", kid_count, errno);
 				tst_exit();
-			 /*NOTREACHED*/}
+			 }
 
 			/* parent */
 			fork_kid_pid[kid_count] = ret_val;
@@ -174,7 +174,7 @@
 				tst_resm(TFAIL, "Kill of child %d failed, "
 					 "errno = %d", i, errno);
 				tst_exit();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		/*
@@ -324,7 +324,7 @@
 	if ((sig_t) signal(SIGINT, inthandlr) == SIG_ERR) {
 		tst_resm(TFAIL, "signal SIGINT failed, errno = %d", errno);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -357,7 +357,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/waitpid/waitpid13.c b/testcases/kernel/syscalls/waitpid/waitpid13.c
index 5b6f93b..37f5dc5 100644
--- a/testcases/kernel/syscalls/waitpid/waitpid13.c
+++ b/testcases/kernel/syscalls/waitpid/waitpid13.c
@@ -111,9 +111,9 @@
 				tst_resm(TPASS, "%s PASSED", TCID);
 			}
 			cleanup();
-		 /*NOTREACHED*/} else if (pid < 0) {
+		 } else if (pid < 0) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * Set up to catch SIGINT.  The kids will wait till a SIGINT
@@ -136,17 +136,17 @@
 					tst_resm(TFAIL, "self_exec kid %d "
 						 "failed", kid_count);
 					tst_exit();
-				 /*NOTREACHED*/}
+				 }
 #else
 				do_exit();
 #endif
-			 /*NOTREACHED*/}
+			 }
 
 			if (ret_val < 0) {
 				tst_resm(TFAIL, "Fork kid %d failed. errno = "
 					 "%d", kid_count, errno);
 				tst_exit();
-			 /*NOTREACHED*/}
+			 }
 
 			/* parent */
 			fork_kid_pid[kid_count] = ret_val;
@@ -377,7 +377,7 @@
 	if ((sig_t) signal(SIGINT, inthandlr) == SIG_ERR) {
 		tst_brkm(TFAIL, cleanup, "signal SIGINT failed, errno = %d",
 			 errno);
-	 /*NOTREACHED*/}
+	 }
 }
 
 /*
@@ -407,7 +407,7 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
 
 void inthandlr()
 {
diff --git a/testcases/kernel/syscalls/write/write02.c b/testcases/kernel/syscalls/write/write02.c
index 3f9e9d4..8eea5b7 100644
--- a/testcases/kernel/syscalls/write/write02.c
+++ b/testcases/kernel/syscalls/write/write02.c
@@ -75,9 +75,9 @@
 	char pwbuf[BUFSIZ + 1];
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL))) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL))) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	setup();		/* global setup for test */
 
@@ -98,7 +98,7 @@
 
 		if ((fild = creat(pfiln, 0777)) == -1) {
 			tst_brkm(TBROK, cleanup, "Can't creat Xwrit");
-		 /*NOTREACHED*/}
+		 }
 		for (iws = BUFSIZ; iws > 0; iws--) {
 			if ((cwrite = write(fild, pwbuf, iws)) != iws) {
 				TEST_ERROR_LOG(errno);
@@ -115,7 +115,7 @@
 		close(fild);
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/write/write03.c b/testcases/kernel/syscalls/write/write03.c
index 4a4b2dd..37d06db 100644
--- a/testcases/kernel/syscalls/write/write03.c
+++ b/testcases/kernel/syscalls/write/write03.c
@@ -80,10 +80,10 @@
 	int fd;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -102,31 +102,31 @@
 		if (fd < 0) {
 			tst_resm(TBROK, "creating a new file failed");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		(void)memset(wbuf, '0', 100);
 
 		if (write(fd, wbuf, 100) == -1) {
 			tst_resm(TFAIL, "failed to write to %s", filename);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (write(fd, bad_addr, 100) != -1) {
 			tst_resm(TFAIL, "write(2) failed to fail");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		TEST_ERROR_LOG(errno);
 		close(fd);
 
 		if ((fd = open(filename, O_RDONLY)) == -1) {
 			tst_resm(TBROK, "open(2) failed, errno: %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (read(fd, rbuf, 100) == -1) {
 			tst_resm(TBROK, "read(2) failed, errno: %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (memcmp(wbuf, rbuf, 100) == 0) {
 			tst_resm(TPASS, "failure of write(2) didnot corrupt "
@@ -139,7 +139,7 @@
 		close(fd);
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 #else
@@ -200,4 +200,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/write/write04.c b/testcases/kernel/syscalls/write/write04.c
index e500bc7..9e4ab2e 100644
--- a/testcases/kernel/syscalls/write/write04.c
+++ b/testcases/kernel/syscalls/write/write04.c
@@ -83,10 +83,10 @@
 	struct sigaction sigptr;	/* set up signal handler */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -101,15 +101,15 @@
 		if (mknod(fifo, S_IFIFO | 0777, 0) < 0) {
 			tst_resm(TBROK, "mknod() failed, errno: %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		if (stat(fifo, &buf) != 0) {
 			tst_resm(TBROK, "stat() failed, errno: %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		if ((buf.st_mode & S_IFIFO) == 0) {
 			tst_resm(TBROK, "Mode does not indicate fifo file");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 #if 0
 		sigset(SIGALRM, alarm_handler);
 #endif
@@ -148,7 +148,7 @@
 		if (sigsetjmp(jmp, 1)) {
 			tst_resm(TBROK, "setjmp() failed");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		(void)alarm(10);	/* set alarm for 10 seconds */
 		wfd = open(fifo, O_WRONLY | O_NONBLOCK);
 		(void)alarm(0);
@@ -207,7 +207,7 @@
 		unlink(fifo);
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 void alarm_handler()
@@ -256,4 +256,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/write/write05.c b/testcases/kernel/syscalls/write/write05.c
index 3be0a73..ece3fbd 100644
--- a/testcases/kernel/syscalls/write/write05.c
+++ b/testcases/kernel/syscalls/write/write05.c
@@ -86,10 +86,10 @@
 	int status, pid;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* global setup */
 	setup();
@@ -119,19 +119,19 @@
 		if (fd < 0) {
 			tst_resm(TFAIL, "creating a new file failed");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 		if (write(fd, bad_addr, 10) != -1) {
 			tst_resm(TFAIL, "write() on an invalid buffer "
 				 "succeeded, but should have failed");
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			TEST_ERROR_LOG(errno);
 			if (errno != EFAULT) {
 				tst_resm(TFAIL, "write() returned illegal "
 					 "errno: expected EFAULT, got %d",
 					 errno);
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 			tst_resm(TPASS, "received EFAULT as expected.");
 		}
 		tst_resm(TINFO, "Exit Block 2");
@@ -180,7 +180,7 @@
 		close(fd);
 	}
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -236,4 +236,4 @@
 
 	/* exit with return code appropriate for results */
 	tst_exit();
- /*NOTREACHED*/}
+ }
diff --git a/testcases/kernel/syscalls/writev/writev01.c b/testcases/kernel/syscalls/writev/writev01.c
index 6bdbb3f..d934052 100644
--- a/testcases/kernel/syscalls/writev/writev01.c
+++ b/testcases/kernel/syscalls/writev/writev01.c
@@ -138,10 +138,10 @@
 	char *msg;		/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
-		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	 }
 
 	/* set "tstdir", and "testfile" vars */
 	setup();
@@ -155,19 +155,19 @@
 		buf_list[0] = buf1;
 		buf_list[1] = buf2;
 		buf_list[2] = buf3;
-		buf_list[3] = (char *)NULL;
+		buf_list[3] = NULL;
 
 		fd[1] = -1;	/* Invalid file descriptor  */
 
 		if (signal(SIGTERM, sighandler) == SIG_ERR) {
 			perror("signal: SIGTERM");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal: SIGPIPE");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		init_buffs(buf_list);
 
@@ -175,24 +175,24 @@
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/} else
+		 } else
 		    if ((nbytes = write(fd[0], buf_list[2], K_1)) != K_1) {
 			tst_resm(TFAIL,
 				 "write failed: nbytes = %d, " "errno = %d",
 				 nbytes, errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno: %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 //block1: /* given vector length -1, writev() return EINVAL. */
 		tst_resm(TINFO, "Enter Block 1");
 		fail = 0;
@@ -443,7 +443,7 @@
 	close(fd[0]);
 	close(fd[1]);
 	cleanup();
-	 /*NOTREACHED*/ return 0;
+	  return 0;
 }
 
 /*
@@ -521,7 +521,7 @@
 		default:
 			tst_resm(TFAIL, "Error detected: init_buffs()");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 	}
 	return 0;
 }
@@ -560,7 +560,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev02.c b/testcases/kernel/syscalls/writev/writev02.c
index a84e6f6..3bd247e 100644
--- a/testcases/kernel/syscalls/writev/writev02.c
+++ b/testcases/kernel/syscalls/writev/writev02.c
@@ -104,11 +104,11 @@
 	int nbytes;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	setup();		/* set "tstdir", and "testfile" vars */
 
@@ -131,37 +131,37 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_WRONLY | O_CREAT, 0666)) < 0) {
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			l_seek(fd[0], K_1, 0);
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 //block1:
 		/*
 		 * In this block we are trying to call writev() with invalid
@@ -303,7 +303,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev03.c b/testcases/kernel/syscalls/writev/writev03.c
index 4a2f5ae..135d650 100644
--- a/testcases/kernel/syscalls/writev/writev03.c
+++ b/testcases/kernel/syscalls/writev/writev03.c
@@ -100,11 +100,11 @@
 	int nbytes;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	/* set "tstdir", and "testfile" vars */
 	setup();
@@ -118,7 +118,7 @@
 		buf_list[0] = buf1;
 		buf_list[1] = buf2;
 		buf_list[2] = buf3;
-		buf_list[3] = (char *)NULL;
+		buf_list[3] = NULL;
 
 		fd[1] = -1;	/* Invalid file descriptor */
 
@@ -126,13 +126,13 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		memset(buf_list[0], 0, K_1);
 		memset(buf_list[1], 0, K_1);
@@ -141,24 +141,24 @@
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 //block1:
 		tst_resm(TINFO, "Enter block 1");
 		fail = 0;
@@ -352,7 +352,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev04.c b/testcases/kernel/syscalls/writev/writev04.c
index 2463670..2ca07af 100644
--- a/testcases/kernel/syscalls/writev/writev04.c
+++ b/testcases/kernel/syscalls/writev/writev04.c
@@ -100,11 +100,11 @@
 	int nbytes;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 /*NOTREACHED*/}
+	 }
 
 	setup();		/* set "tstdir", and "testfile" vars */
 
@@ -117,7 +117,7 @@
 		buf_list[0] = buf1;
 		buf_list[1] = buf2;
 		buf_list[2] = buf3;
-		buf_list[3] = (char *)NULL;
+		buf_list[3] = NULL;
 
 		fd[1] = -1;	/* Invalid file descriptor */
 
@@ -125,13 +125,13 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		memset(buf_list[0], 0, K_1);
 		memset(buf_list[1], 0, K_1);
@@ -140,24 +140,24 @@
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-			 /*NOTREACHED*/ return 0;
+			  return 0;
 		}
 //block1:
 		tst_resm(TINFO, "Enter block 1");
@@ -361,7 +361,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev05.c b/testcases/kernel/syscalls/writev/writev05.c
index e9c878f..c4908e7 100644
--- a/testcases/kernel/syscalls/writev/writev05.c
+++ b/testcases/kernel/syscalls/writev/writev05.c
@@ -99,10 +99,10 @@
 	int nbytes;
 
 	/* parse standard options */
-	if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
+	    NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 /*NOTREACHED*/}
+	 }
 
 	setup();		/* set "tstdir", and "testfile" vars */
 
@@ -121,13 +121,13 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/* Fill the buf_list[0] and buf_list[1] with 0 zeros */
 		memset(buf_list[0], 0, K_1);
@@ -137,24 +137,24 @@
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/} else {
+		 } else {
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 /*NOTREACHED*/}
+			 }
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 /*NOTREACHED*/}
+		 }
 
 		/*
 		 * In this block we are trying to call writev() with invalid
@@ -290,7 +290,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 /*NOTREACHED*/}
+	 }
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev06.c b/testcases/kernel/syscalls/writev/writev06.c
index d40e711..2165c3d 100644
--- a/testcases/kernel/syscalls/writev/writev06.c
+++ b/testcases/kernel/syscalls/writev/writev06.c
@@ -88,7 +88,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-		/* NOTREACHED */
+		
 	}
 
 	setup();		/* set "tstdir", and "testfile" vars */
@@ -105,21 +105,21 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-			/* NOTREACHED */
+			
 		}
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-			/* NOTREACHED */
+			
 		}
 
 		if ((fd[0] = open(f_name, O_WRONLY | O_CREAT, 0666)) < 0) {
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-			/* NOTREACHED */
+			
 		}
 
 		/*
@@ -261,7 +261,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-		/* NOTREACHED */
+		
 	}
 	exit(sig);
 }
diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime02.c b/testcases/kernel/timers/clock_gettime/clock_gettime02.c
index c761df2..3862e22 100755
--- a/testcases/kernel/timers/clock_gettime/clock_gettime02.c
+++ b/testcases/kernel/timers/clock_gettime/clock_gettime02.c
@@ -72,7 +72,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 
 char *TCID = "clock_gettime02";	/* Test program identifier.    */
 int TST_TOTAL;			/* Total number of test cases. */
@@ -87,10 +87,8 @@
 	clockid_t clocks[2] = {CLOCK_REALTIME, CLOCK_MONOTONIC};
 
 	/* parse standard options */
-	if ((msg = parse_opts (ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts (ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	TST_TOTAL = sizeof(clocks) / sizeof(clocks[0]);
 
@@ -110,27 +108,26 @@
 		}	/* End of TEST CASE LOOPING */
 	}		/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	CLEANUP();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, CLEANUP);
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * CLEANUP() - Performs one time CLEANUP for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -138,4 +135,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-}	/* End CLEANUP() */
+}
diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime03.c b/testcases/kernel/timers/clock_gettime/clock_gettime03.c
index ff7c18e..53b31f5 100755
--- a/testcases/kernel/timers/clock_gettime/clock_gettime03.c
+++ b/testcases/kernel/timers/clock_gettime/clock_gettime03.c
@@ -76,7 +76,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 
 char *TCID = "clock_gettime03"; /* Test program identifier.    */
 int TST_TOTAL;		/* Total number of test cases. */
@@ -93,7 +93,7 @@
 int
 main(int ac, char **av)
 {
-	int lc, i;	/* loop counter */
+	int i, lc;	/* loop counter */
 	char *msg;	/* message returned from parse_opts */
 	struct timespec spec, *temp;
 
@@ -107,14 +107,13 @@
 	};
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL))
-		!= NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	TST_TOTAL = sizeof(testcase) / sizeof(testcase[0]);
 
-	/* PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on
+	/* 
+	 * PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on
 	 * kernel versions lower than 2.6.12
 	 */
 	if ((tst_kvercmp(2, 6, 12)) < 0) {
@@ -166,14 +165,13 @@
 
 	}	/*End for TEST_LOOPING*/
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -183,13 +181,13 @@
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -197,4 +195,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/clock_settime/clock_settime02.c b/testcases/kernel/timers/clock_settime/clock_settime02.c
index 9570bfc..d793e0e 100755
--- a/testcases/kernel/timers/clock_settime/clock_settime02.c
+++ b/testcases/kernel/timers/clock_settime/clock_settime02.c
@@ -73,7 +73,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 
 char *TCID = "clock_settime02";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
@@ -88,10 +88,8 @@
 	struct timespec spec;	/* Used to specify time for test */
 
 	/* parse standard options */
-	if ((msg = parse_opts (ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts (ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -111,36 +109,35 @@
 			(TEST_RETURN == 0 ? "passed" : "failed"));
 	}		/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Check whether we are root */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 	}
 	/* Save the current time specifications */
 	if (syscall(__NR_clock_gettime, CLOCK_REALTIME, &saved) < 0)
-		tst_brkm(TBROK, tst_exit, "Could not save the current time");
+		tst_brkm(TBROK, NULL, "Could not save the current time");
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
 
-static void
+void
 cleanup(void)
 {
 	/* Set the saved time */
@@ -154,4 +151,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c b/testcases/kernel/timers/clock_settime/clock_settime03.c
index 22c92b6..664da83 100755
--- a/testcases/kernel/timers/clock_settime/clock_settime03.c
+++ b/testcases/kernel/timers/clock_settime/clock_settime03.c
@@ -79,7 +79,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 static int setup_test(int option);
 
 char *TCID = "clock_settime03"; /* Test program identifier.	*/
@@ -119,10 +119,8 @@
 	char *msg;	/* message returned from parse_opts */
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL))
-		!= NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	TST_TOTAL = sizeof(testcase) / sizeof(testcase[0]);
 
@@ -188,7 +186,6 @@
 
 	}	/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
@@ -219,8 +216,8 @@
 		/* change the User to non-root */
 		spec.tv_nsec = 0;
 		if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
-			tst_resm(TWARN, "\"nobody\" user not present."
-					" skipping test");
+			tst_resm(TWARN, "user \"nobody\" not present; "
+					"skipping test");
 			return -1;
 		}
 		if (seteuid(ltpuser->pw_uid) == -1) {
@@ -241,18 +238,18 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Check whether we are root*/
 	if (geteuid() != 0)
-		tst_brkm(TBROK, tst_exit, "Test must be run as root");
+		tst_brkm(TBROK, NULL, "Test must be run as root");
 
 	if (syscall(__NR_clock_gettime, CLOCK_REALTIME, &saved) < 0)
-		tst_brkm(TBROK, tst_exit, "Clock gettime failed");
+		tst_brkm(TBROK, NULL, "Clock gettime failed");
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -261,14 +258,14 @@
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
 
-static void
+void
 cleanup(void)
 {
 	/*
@@ -276,5 +273,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
index 8d07f57..1303ca1 100755
--- a/testcases/kernel/timers/timer_create/timer_create02.c
+++ b/testcases/kernel/timers/timer_create/timer_create02.c
@@ -73,8 +73,8 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
-static void setup_test(int option);
+void setup(void);
+void setup_test(int option);
 
 char *TCID = "timer_create02";	/* Test program identifier.    */
 int TST_TOTAL = 3;		/* Total number of test cases. */
@@ -95,10 +95,8 @@
 	const char *mrstr = "MONOTONIC_RAW";
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	/* perform global setup for test */
 	setup();
@@ -145,13 +143,12 @@
 		}	/* End of TEST CASE LOOPING */
 	}		/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup_test() - sets up individual test */
-static void
+void
 setup_test(int option)
 {
 	switch (option) {
@@ -174,21 +171,21 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -196,5 +193,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
index a46f442..837a77d 100755
--- a/testcases/kernel/timers/timer_create/timer_create03.c
+++ b/testcases/kernel/timers/timer_create/timer_create03.c
@@ -73,8 +73,8 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
-static void setup_test(int option);
+void setup(void);
+void setup_test(int option);
 
 char *TCID = "timer_create03";	/* Test program identifier. */
 int TST_TOTAL = 3;		/* Total number of test cases. */
@@ -85,7 +85,7 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -110,7 +110,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
 			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -137,13 +137,12 @@
 
 	}		/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup_test() - sets up individual test */
-static void
+void
 setup_test(int option)
 {
 	switch (option) {
@@ -166,12 +165,12 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
diff --git a/testcases/kernel/timers/timer_create/timer_create04.c b/testcases/kernel/timers/timer_create/timer_create04.c
index e98883d..ca07968 100755
--- a/testcases/kernel/timers/timer_create/timer_create04.c
+++ b/testcases/kernel/timers/timer_create/timer_create04.c
@@ -76,7 +76,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 
 char *TCID = "timer_create04"; 	/* Test program identifier.    */
 int TST_TOTAL;			/* Total number of test cases. */
@@ -95,7 +95,7 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -124,10 +124,8 @@
 	};
 
 	/* parse standard options */
-	if ((msg = parse_opts(ac, av, NULL, NULL))
-		!= NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
-	}
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	TST_TOTAL = sizeof(testcase) / sizeof(testcase[0]);
 
@@ -193,14 +191,13 @@
 
 	}	/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -210,4 +207,4 @@
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
diff --git a/testcases/kernel/timers/timer_delete/timer_delete02.c b/testcases/kernel/timers/timer_delete/timer_delete02.c
index 3730d91..07c7ae7 100755
--- a/testcases/kernel/timers/timer_delete/timer_delete02.c
+++ b/testcases/kernel/timers/timer_delete/timer_delete02.c
@@ -73,7 +73,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 
 char *TCID = "timer_delete02";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
@@ -89,7 +89,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts (ac, av, (option_t *) NULL, NULL)) !=
 			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -114,27 +114,26 @@
 			(TEST_RETURN == 0 ? "passed" : "failed"));
 	}	/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -142,5 +141,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/timer_delete/timer_delete03.c b/testcases/kernel/timers/timer_delete/timer_delete03.c
index 90b23ba..f59f4b9 100755
--- a/testcases/kernel/timers/timer_delete/timer_delete03.c
+++ b/testcases/kernel/timers/timer_delete/timer_delete03.c
@@ -75,7 +75,7 @@
 
 #define INVALID_ID ((kernel_timer_t)-1)
 
-static void setup();
+void setup(void);
 
 char *TCID = "timer_delete03"; 	/* Test program identifier.    */
 int TST_TOTAL;		       	/* Total number of test cases. */
@@ -96,7 +96,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL))
 		!= NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	TST_TOTAL = sizeof(testcase) / sizeof(testcase[0]);
@@ -130,15 +130,13 @@
 
 	}	/* End for TEST_LOOPING*/
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
-
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -148,13 +146,13 @@
 
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -162,4 +160,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/timer_settime/timer_settime02.c b/testcases/kernel/timers/timer_settime/timer_settime02.c
index 157a960..77ac21d 100755
--- a/testcases/kernel/timers/timer_settime/timer_settime02.c
+++ b/testcases/kernel/timers/timer_settime/timer_settime02.c
@@ -73,7 +73,7 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
+void setup(void);
 static int setup_test(int option);
 
 char *TCID = "timer_settime02";	/* Test program identifier.    */
@@ -92,7 +92,7 @@
 
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
 			(char *) NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -121,7 +121,6 @@
 		}	/* End of TEST CASE LOOPING */
 	}		/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
@@ -184,8 +183,8 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -194,14 +193,14 @@
 	TEST_PAUSE;
 
 	if (syscall(__NR_timer_create, CLOCK_REALTIME, NULL, &timer) < 0)
-		tst_brkm(TBROK, tst_exit, "timer_create failed");
-}	/* End setup() */
+		tst_brkm(TBROK, NULL, "timer_create failed");
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -209,7 +208,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-
-	/* exit with return code appropriate for results */
-	tst_exit();
-}	/* End cleanup() */
+}
diff --git a/testcases/kernel/timers/timer_settime/timer_settime03.c b/testcases/kernel/timers/timer_settime/timer_settime03.c
index 6b8254c..9d2f491 100755
--- a/testcases/kernel/timers/timer_settime/timer_settime03.c
+++ b/testcases/kernel/timers/timer_settime/timer_settime03.c
@@ -73,8 +73,8 @@
 #include "usctest.h"
 #include "common_timers.h"
 
-static void setup();
-static void setup_test(int option);
+void setup(void);
+void setup_test(int option);
 
 char *TCID = "timer_settime03"; 	/* Test program identifier.    */
 int TST_TOTAL;				/* Total number of test cases. */
@@ -103,7 +103,7 @@
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, NULL, NULL))
 		!= NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	/* perform global setup for test */
@@ -138,13 +138,12 @@
 
 	}	/* End for TEST_LOOPING */
 
-	/* Clean up and exit */
 	cleanup();
 	tst_exit();
 }
 
 /* This function sets up individual tests */
-static void
+void
 setup_test(int option)
 {
 	switch (option) {
@@ -185,14 +184,14 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-static void
-setup()
+void
+setup(void)
 {
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	if (syscall(__NR_timer_create, CLOCK_REALTIME, NULL, &timer) < 0) {
-		tst_brkm(TBROK, tst_exit, "Timer create failed. Cannot"
+		tst_brkm(TBROK, NULL, "Timer create failed. Cannot"
 				" setup test");
 	}
 
@@ -200,14 +199,13 @@
 	TEST_EXP_ENOS(exp_enos);
 	/* Pause if that option was specified */
 	TEST_PAUSE;
-
-}	/* End setup() */
+}
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-static void
+void
 cleanup(void)
 {
 	/*
@@ -215,5 +213,4 @@
 	* print errno log if that option was specified.
 	*/
 	TEST_CLEANUP;
-
-}	/* End cleanup() */
+}
diff --git a/testcases/mce-test/tsrc/tinjpage.c b/testcases/mce-test/tsrc/tinjpage.c
new file mode 100644
index 0000000..3c41402
--- /dev/null
+++ b/testcases/mce-test/tsrc/tinjpage.c
@@ -0,0 +1,529 @@
+/*
+ * Test program for Linux poison memory error recovery.
+ * This injects poison into various mapping cases and triggers the poison
+ * handling.  Requires special injection support in the kernel.
+ * Author: Andi Kleen
+ */
+#define _GNU_SOURCE 1
+#include <stdio.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sys/fcntl.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <setjmp.h>
+#include <errno.h>
+#include <string.h>
+#include <time.h>
+#include <pthread.h>
+
+#ifndef MADV_POISON
+#define MADV_POISON 100
+#endif
+
+#define TMPDIR "./"
+#define PATHBUFLEN 100
+
+#define err(x) perror(x),exit(1)
+#define Perror(x) failure++, perror(x)
+#define PAIR(x) x, sizeof(x)-1
+#define mb() asm volatile("" ::: "memory")
+#if defined(__i386__) || defined(__x86_64__)
+#define cpu_relax() asm volatile("rep ; nop" ::: "memory")
+#else
+#define cpu_relax() mb()
+#endif
+
+int PS;
+int failure;
+int unexpected;
+int early_kill;
+
+void *checked_mmap(void *start, size_t length, int prot, int flags,
+                   int fd, off_t offset)
+{
+	void *map = mmap(start, length, prot, flags, fd, offset);
+	if (map == (void*)-1L)
+		err("mmap");
+	return map;
+}
+
+void munmap_reserve(void *page, int size)
+{
+	munmap(page, size);
+	mmap(page, size, PROT_NONE, MAP_PRIVATE|MAP_FIXED, 0, 0);
+}
+
+void *xmalloc(size_t s)
+{
+	void *p = malloc(s);
+	if (!p)
+		exit(ENOMEM);
+	return p;
+}
+
+int recovercount;
+sigjmp_buf recover_ctx;
+sigjmp_buf early_recover_ctx;
+void *expected_addr;
+
+void sighandler(int sig, siginfo_t *si, void *arg)
+{
+	if (si->si_addr != expected_addr) {
+		printf("XXX: Unexpected address in signal %p (expected %p)\n", si->si_addr,
+			expected_addr);
+		failure++;
+	}
+
+	printf("signal %d code %d addr %p\n", sig, si->si_code, si->si_addr);
+
+	if (--recovercount == 0) {
+		write(1, PAIR("I seem to be in a signal loop. bailing out.\n"));
+		exit(1);
+	}
+
+	if (si->si_code == 4)
+		siglongjmp(recover_ctx, 1);
+	else
+		siglongjmp(early_recover_ctx, 1);
+}
+
+enum rmode {
+	MREAD = 0,
+	MWRITE = 1,
+	MREAD_OK = 2,
+	MWRITE_OK = 3,
+	MNOTHING = -1,
+};
+
+void poison(char *msg, char *page, enum rmode mode)
+{
+	expected_addr = page;
+	recovercount = 5;
+
+	if (sigsetjmp(early_recover_ctx, 1) == 0) {
+
+		if (madvise(page, PS, MADV_POISON) != 0) {
+			if (errno == EINVAL) {
+				printf("Kernel doesn't support poison injection\n");
+				exit(0);
+			}
+			Perror("madvise");
+			return;
+		}
+
+		if (early_kill && (mode == MWRITE || mode == MREAD)) {
+			printf("XXX: %s: process is not early killed\n", msg);
+			failure++;
+		}
+
+		return;
+	}
+
+	if (early_kill) {
+		if (mode == MREAD_OK || mode == MWRITE_OK) {
+			printf("XXX: %s: killed\n", msg);
+			failure++;
+		} else
+			printf("recovered\n");
+	}
+}
+
+void recover(char *msg, char *page, enum rmode mode)
+{
+	expected_addr = page;
+	recovercount = 5;
+
+	if (sigsetjmp(recover_ctx, 1) == 0) {
+		switch (mode) {
+		case MWRITE:
+			printf("writing 2\n");
+			*page = 2;
+			break;
+		case MWRITE_OK:
+			printf("writing 4\n");
+			*page = 4;
+			return;
+		case MREAD:
+			printf("%x\n", *(unsigned char *)page);
+			break;
+		case MREAD_OK:
+			printf("%x\n", *(unsigned char *)page);
+			return;
+		case MNOTHING:
+			return;
+		}
+		/* signal or kill should have happened */
+		printf("XXX: %s: page not poisoned after injection\n", msg);
+		failure++;
+		return;
+	}
+	if (mode == MREAD_OK || mode == MWRITE_OK) {
+		printf("XXX: %s: killed\n", msg);
+		failure++;
+	} else
+		printf("recovered\n");
+}
+
+void testmem(char *msg, char *page, enum rmode mode)
+{
+	printf("%s page %p\n", msg, page);
+	poison(msg, page, mode);
+	recover(msg, page, mode);
+}
+
+void expecterr(char *msg, int err)
+{
+	if (err) {
+		printf("expected error %d on %s\n", errno, msg);
+	} else {
+		failure++;
+		printf("XXX: unexpected no error on %s\n", msg);
+	}
+}
+
+void optionalerr(char *msg, int err)
+{
+	if (err) {
+		printf("expected optional error %d on %s\n", errno, msg);
+	} else {
+		unexpected++;
+		printf("XXX: expected likely incorrect no error on %s\n", msg);
+	}
+}
+
+static int tmpcount;
+int tempfd(void)
+{
+	int fd;
+	char buf[PATHBUFLEN];
+	snprintf(buf, sizeof buf, TMPDIR "poison%d",tmpcount++);
+	fd = open(buf, O_CREAT|O_RDWR, 0600);
+	if (fd >= 0)
+		unlink(buf);
+	if (fd < 0)
+		err("opening temporary file in " TMPDIR);
+	return fd;
+}
+
+int playfile(char *buf)
+{
+	int fd;
+	if (buf[0] == 0)
+		snprintf(buf, PATHBUFLEN, TMPDIR "poison%d", tmpcount++);
+	fd = open(buf, O_CREAT|O_RDWR|O_TRUNC, 0600);
+	if (fd < 0)
+		err("opening temporary file in " TMPDIR);
+
+	const int NPAGES = 5;
+	char *tmp = xmalloc(PS * NPAGES);
+	int i;
+	for (i = 0; i < PS*NPAGES; i++)
+		tmp[i] = i;
+	write(fd, tmp, PS*NPAGES);
+
+	lseek(fd, 0, SEEK_SET);
+	return fd;
+}
+
+static void dirty_anonymous(void)
+{
+	char *page;
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, 0, 0);
+	testmem("dirty", page, MWRITE);
+}
+
+static void dirty_anonymous_unmap(void)
+{
+	char *page;
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, 0, 0);
+	testmem("dirty", page, MWRITE);
+	munmap_reserve(page, PS);
+}
+
+static void mlocked_anonymous(void)
+{
+	char *page;
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0);
+	testmem("mlocked", page, MWRITE);
+}
+
+static void file_clean(void)
+{
+	char *page;
+	char fn[30];
+	snprintf(fn, 30, TMPDIR "test%d", tmpcount++);
+	int fd = open(fn, O_RDWR|O_TRUNC|O_CREAT);
+	if (fd < 0)
+		err("open temp file");
+	write(fd, fn, 4);
+	fsync(fd);
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+	close(fd);
+	testmem("file clean", page, MREAD_OK);
+	printf("%x\n", *(unsigned char *)page); /* reread page from disk */
+	testmem("file clean", page, MWRITE_OK);
+}
+
+static void file_dirty(void)
+{
+	char *page;
+	char fn[PATHBUFLEN];
+	fn[0] = 0;
+	int fd = playfile(fn);
+
+	page = checked_mmap(NULL, PS, PROT_READ, MAP_SHARED|MAP_POPULATE, fd, 0);
+	testmem("dirty file initial", page, MREAD);
+	expecterr("msync expect error", msync(page, PS, MS_SYNC) < 0);
+	close(fd);
+	munmap_reserve(page, PS);
+
+	fd = open(fn, O_RDONLY);
+	if (fd < 0) err("reopening temp file");
+	page = checked_mmap(NULL, PS, PROT_READ, MAP_SHARED|MAP_POPULATE, fd, 0);
+	recover("dirty file populated", page, MREAD_OK);
+	close(fd);
+	munmap_reserve(page, PS);
+
+	fd = open(fn, O_RDONLY);
+	if (fd < 0) err("reopening temp file");
+	page = checked_mmap(NULL, PS, PROT_READ, MAP_SHARED, fd, 0);
+	recover("dirty file fault", page, MREAD_OK);
+	close(fd);
+	munmap_reserve(page, PS);
+
+	fd = open(fn, O_RDWR);
+	char buf[128];
+	expecterr("explicit read after poison", read(fd, buf, sizeof buf) < 0);
+	expecterr("explicit write after poison", write(fd, "foobar", 6) < 0);
+	optionalerr("fsync expect error", fsync(fd) < 0);
+	close(fd);
+
+	/* should unlink return an error here? */
+	if (unlink(fn) < 0)
+		perror("unlink");
+}
+
+/* TBD */
+static void file_hole(void)
+{
+	int fd = tempfd();
+	char *page;
+
+	ftruncate(fd, PS);
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+	*page = 1;
+	testmem("hole file dirty", page, MREAD);
+	expecterr("hole fsync expect error", fsync(fd) < 0);
+	optionalerr("hole msync expect error", msync(page, PS, MS_SYNC) < 0);
+	close(fd);
+}
+
+static void nonlinear(void)
+{
+	int fd;
+	const int NPAGES = 10;
+	int i;
+	char *page;
+	char *tmp;
+
+	fd = tempfd();
+	tmp = xmalloc(PS);
+	for (i = 0; i < NPAGES; i++)  {
+		memset(tmp, i, PS);
+		write(fd, tmp, PS);
+	}
+	free(tmp);
+	page = checked_mmap(NULL, PS*NPAGES, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+	int k = NPAGES - 1;
+	for (i = 0; i < NPAGES; i++, k--) {
+		if (remap_file_pages(page + i*PS, PS, 0, k, 0))
+			perror("remap_file_pages");
+	}
+	*page = 1;
+	testmem("rfp file dirty", page, MREAD);
+	expecterr("rfp fsync expect error", fsync(fd) < 0);
+	optionalerr("rfp msync expect error", msync(page, PS, MS_SYNC) < 0);
+	close(fd);
+}
+
+/*
+ * This is quite timing dependent. The sniper might hit the page
+ * before it is dirtied. If that happens tweak the delay
+ * (should auto tune)
+ */
+enum {
+	DELAY_NS = 30,
+};
+
+volatile enum sstate { START, WAITING, SNIPE } sstate;
+
+void waitfor (enum sstate w, enum sstate s)
+{
+	sstate = w;
+	mb();
+	while (sstate != s)
+		cpu_relax();
+}
+
+struct poison_arg {
+	char *msg;
+	char *page;
+	enum rmode mode;
+};
+
+void *sniper(void *p)
+{
+	struct poison_arg *arg = p;
+
+	waitfor (START, WAITING);
+	nanosleep(&((struct timespec) { .tv_nsec = DELAY_NS }), NULL);
+	poison(arg->msg, arg->page, arg->mode);
+	return NULL;
+}
+
+int setup_sniper(struct poison_arg *arg)
+{
+	if (sysconf(_SC_NPROCESSORS_ONLN) < 2)  {
+		printf("%s: Need at least two CPUs. Not tested\n", arg->msg);
+		return -1;
+	}
+	sstate = START;
+	mb();
+	pthread_t thr;
+	if (pthread_create(&thr, NULL, sniper, arg) < 0)
+		err("pthread_create");
+	pthread_detach(thr);
+	return 0;
+}
+
+static void under_io_dirty(void)
+{
+	struct poison_arg arg;
+	int fd = tempfd();
+	char *page;
+
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, fd, 0);
+
+	arg.page = page;
+	arg.msg  = "under io dirty";
+	arg.mode = MWRITE;
+	if (setup_sniper(&arg) < 0)
+		return;
+
+	write(fd, "xyz", 3);
+	waitfor (WAITING, WAITING);
+	expecterr("write under io", fsync(fd) < 0);
+	close(fd);
+}
+
+static void under_io_clean(void)
+{
+	struct poison_arg arg;
+	char fn[PATHBUFLEN];
+	int fd;
+	char *page;
+	char buf[10];
+
+ 	fd = playfile(fn);
+	page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, fd, 0);
+	madvise(page, PS, MADV_DONTNEED);
+
+	arg.page = page;
+	arg.msg  = "under io clean";
+	arg.mode = MREAD_OK;
+	if (setup_sniper(&arg) < 0)
+		return;
+
+	waitfor (WAITING, WAITING);
+	// what is correct here?
+	if (pread(fd, buf, 10, 0) != 0)
+		perror("pread under io clean");
+	close(fd);
+}
+
+
+struct testcase {
+	void (*f)(void);
+	char *name;
+	int survivable;
+} cases[] = {
+	{ dirty_anonymous, "dirty anonymous" },
+	{ dirty_anonymous_unmap, "dirty anonymous unmap" },
+	{ mlocked_anonymous, "mlocked anonymous" },
+	{ file_clean, "file clean", 1 },
+	{ file_dirty, "file dirty" },
+	{ file_hole, "file hole" },
+	{ nonlinear, "nonlinear" },
+	/* { under_io_dirty, "under io dirty" }, */
+	/* { under_io_clean, "under io clean" }, */
+	{}
+};
+
+
+int main(void)
+{
+	PS = getpagesize();
+
+	/* don't kill me at poison time, but possibly at page fault time */
+	early_kill = 0;
+	system("sysctl -w vm.memory_failure_early_kill=0");
+
+	struct sigaction sa = {
+		.sa_sigaction = sighandler,
+		.sa_flags = SA_SIGINFO
+	};
+
+	struct testcase *t;
+	/* catch signals */
+	sigaction(SIGBUS, &sa, NULL);
+	for (t = cases; t->f; t++)
+		t->f();
+
+	/* suicide version */
+	for (t = cases; t->f; t++) {
+		pid_t child = fork();
+		if (child == 0) {
+			signal(SIGBUS, SIG_DFL);
+			t->f();
+			if (t->survivable)
+				_exit(2);
+			write(1, t->name, strlen(t->name));
+			write(1, PAIR(" didn't kill itself?\n"));
+			_exit(1);
+		} else {
+			siginfo_t sig;
+			if (waitid(P_PID, child, &sig, WEXITED) < 0)
+				perror("waitid");
+			else {
+				if (t->survivable) {
+					if (sig.si_code != CLD_EXITED) {
+						printf("XXX: %s: child not survived\n", t->name);
+						failure++;
+					}
+				} else {
+					if (sig.si_code != CLD_KILLED || sig.si_status != SIGBUS) {
+						printf("XXX: %s: child not killed by SIGBUS\n", t->name);
+						failure++;
+					}
+				}
+			}
+		}
+	}
+
+	/* early kill version */
+	early_kill = 1;
+	system("sysctl -w vm.memory_failure_early_kill=1");
+
+	sigaction(SIGBUS, &sa, NULL);
+	for (t = cases; t->f; t++)
+		t->f();
+
+	if (failure > 0) {
+		printf("FAILURE -- %d cases broken!\n", failure);
+		return 1;
+	}
+	printf("SUCCESS\n");
+	return 0;
+}
diff --git a/testcases/misc/math/float/exp_log/genmodf.c b/testcases/misc/math/float/exp_log/genmodf.c
index 7d3b1a6..9baac40 100644
--- a/testcases/misc/math/float/exp_log/genmodf.c
+++ b/testcases/misc/math/float/exp_log/genmodf.c
@@ -63,7 +63,11 @@
 		TestInputValue = ((Inc*i) + Inc);
 		tabR[i] = modf(TestInputValue, &tabRI[i]);
 		// tabR[i] = modf( ((Inc*i) + Inc), &tabRI[i]);
+<<<<<<< HEAD
+		if ((TestChkSum = tabR[i] + tabRI[i]) != TestInputValue)
+=======
 		if ( (TestChkSum = tabR[i] + tabRI[i]) != TestInputValue)
+>>>>>>> master
 		  {
 		    return -1;
 		  }
diff --git a/testcases/misc/math/float/main.c b/testcases/misc/math/float/main.c
index 9ad0ef5d..6f423d1 100644
--- a/testcases/misc/math/float/main.c
+++ b/testcases/misc/math/float/main.c
@@ -286,7 +286,11 @@
 
 		/* test the result in TH_DATA : communication buffer */
 		pcom = * tabcour++; 
+<<<<<<< HEAD
+		if (pcom->th_result !=0) {
+=======
 		if (pcom->th_result !=0 ) {
+>>>>>>> master
 	           error++;
                    tst_resm(TFAIL, "thread %d (%s) terminated unsuccessfully %d errors/%d loops", th_num,pcom->th_func.fident,pcom->th_nerror,pcom->th_nloop);
                    tst_resm(TFAIL, "%s", pcom->detail_data);
diff --git a/testcases/network/lib6/asapi_01.c b/testcases/network/lib6/asapi_01.c
index 1be9102..3a8f3af 100644
--- a/testcases/network/lib6/asapi_01.c
+++ b/testcases/network/lib6/asapi_01.c
@@ -229,7 +229,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -260,7 +260,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/network/lib6/asapi_02.c b/testcases/network/lib6/asapi_02.c
index fc3afe9..69c5748 100644
--- a/testcases/network/lib6/asapi_02.c
+++ b/testcases/network/lib6/asapi_02.c
@@ -331,7 +331,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -362,7 +362,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/network/lib6/asapi_03.c b/testcases/network/lib6/asapi_03.c
index 6a02e1b..476af3a 100644
--- a/testcases/network/lib6/asapi_03.c
+++ b/testcases/network/lib6/asapi_03.c
@@ -210,7 +210,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -241,7 +241,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/network/lib6/asapi_04.c b/testcases/network/lib6/asapi_04.c
index 8859fac..21c7e0c 100644
--- a/testcases/network/lib6/asapi_04.c
+++ b/testcases/network/lib6/asapi_04.c
@@ -87,7 +87,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, 0, 0);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	pid = getpid();
@@ -98,7 +98,7 @@
 		do_tests();
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return(0);
 }	/* End main */
 
diff --git a/testcases/network/lib6/asapi_05.c b/testcases/network/lib6/asapi_05.c
index 8e3c47e..881b301 100644
--- a/testcases/network/lib6/asapi_05.c
+++ b/testcases/network/lib6/asapi_05.c
@@ -66,7 +66,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -77,7 +77,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/network/lib6/asapi_06.c b/testcases/network/lib6/asapi_06.c
index 9061012..b833f64 100644
--- a/testcases/network/lib6/asapi_06.c
+++ b/testcases/network/lib6/asapi_06.c
@@ -87,7 +87,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, 0, 0);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	pid = getpid();
@@ -98,7 +98,7 @@
 		do_tests();
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return(0);
 }	/* End main */
 
diff --git a/testcases/network/lib6/asapi_07.c b/testcases/network/lib6/asapi_07.c
index cee4db2..788f237 100644
--- a/testcases/network/lib6/asapi_07.c
+++ b/testcases/network/lib6/asapi_07.c
@@ -65,7 +65,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -75,7 +75,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return 0;
 }
 
diff --git a/testcases/network/lib6/getaddrinfo_01.c b/testcases/network/lib6/getaddrinfo_01.c
index 3f1af64..4b506e8 100644
--- a/testcases/network/lib6/getaddrinfo_01.c
+++ b/testcases/network/lib6/getaddrinfo_01.c
@@ -78,7 +78,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -90,7 +90,7 @@
 	}
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return(0);
 }	/* End main */
 
@@ -108,7 +108,7 @@
 	char *p;
 
 	if (gethostname(hostname, sizeof(hostname)) < 0)
-		tst_brkm(TBROK, tst_exit, "gethostname failed - %s",
+		tst_brkm(TBROK, NULL, "gethostname failed - %s",
 			strerror(errno));
 	strncpy(shortname, hostname, MAXHOSTNAMELEN);
 	shortname[MAXHOSTNAMELEN] = '\0';
@@ -514,7 +514,7 @@
 	char *p;
 
 	if (gethostname(hostname, sizeof(hostname)) < 0)
-		tst_brkm(TBROK, tst_exit, "gethostname failed - %s",
+		tst_brkm(TBROK, NULL, "gethostname failed - %s",
 			strerror(errno));
 	strncpy(shortname, hostname, MAXHOSTNAMELEN);
 	shortname[MAXHOSTNAMELEN] = '\0';
diff --git a/testcases/network/lib6/in6_01.c b/testcases/network/lib6/in6_01.c
index 762ff58..6c6d179 100644
--- a/testcases/network/lib6/in6_01.c
+++ b/testcases/network/lib6/in6_01.c
@@ -94,7 +94,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -182,7 +182,7 @@
 	}
 
 	cleanup();
-	/* NOTREACHED */
+	
 	return(0);
 }	/* End main */
 
diff --git a/testcases/network/lib6/in6_02.c b/testcases/network/lib6/in6_02.c
index 2aacdf6..bae846f 100644
--- a/testcases/network/lib6/in6_02.c
+++ b/testcases/network/lib6/in6_02.c
@@ -85,7 +85,7 @@
 	/* Parse standard options given to run the test. */
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL) {
-		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -98,7 +98,7 @@
 	}
 	cleanup();
 
-	/* NOTREACHED */
+	
 	return(0);
 }	/* End main */
 
diff --git a/testcases/network/nfs/nfs_fsstress/fsstress.c b/testcases/network/nfs/nfs_fsstress/fsstress.c
index 0723d78..fdc02db 100644
--- a/testcases/network/nfs/nfs_fsstress/fsstress.c
+++ b/testcases/network/nfs/nfs_fsstress/fsstress.c
@@ -522,7 +522,7 @@
 		fprintf(stderr, "fsstress: append_pathname failure\n");
 		chdir(homedir);
 		abort();
-		/* NOTREACHED */
+		
 	}
 #endif
 	name->path = realloc(name->path, name->len + 1 + len);
@@ -604,7 +604,7 @@
 	chdir(homedir);
 	fprintf(stderr, "fsstress: check_cwd failure\n");
 	abort();
-	/* NOTREACHED */
+	
 #endif
 }
 
@@ -865,7 +865,7 @@
 	abort();
 #endif
         return -1;
-	/* NOTREACHED */
+	
 }
 
 void
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c b/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
index b0fd259..b810c4b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
@@ -128,7 +128,7 @@
 	/* accept() TEST1: Bad socket descriptor EBADF, Expected error */
         error = accept(-1, (struct sockaddr *) &acpt_addr, &len);
         if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "accept with a bad socket descriptor"
+		tst_brkm(TBROK, NULL, "accept with a bad socket descriptor"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with a bad socket descriptor - EBADF");
@@ -136,7 +136,7 @@
         /*accept() TEST2: Invalid socket ENOTSOCK, Expected error*/
         error = accept(0, (struct sockaddr *) &acpt_addr, &len);
         if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "accept with invalid socket"
+		tst_brkm(TBROK, NULL, "accept with invalid socket"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid socket - ENOTSOCK");
@@ -144,7 +144,7 @@
         /*accept() TEST3: Invalid address EFAULT, Expected error*/
         error = accept(lstn_sk, (struct sockaddr *) -1, &len);
         if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "accept with invalid address"
+		tst_brkm(TBROK, NULL, "accept with invalid address"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid address - EFAULT");
@@ -154,7 +154,7 @@
         /*accept() TEST4: on a non-listening socket EINVAL, Expected error*/
         error = accept(sk, (struct sockaddr *) &acpt_addr, &len);
         if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "accept on a non-listening socket"
+		tst_brkm(TBROK, NULL, "accept on a non-listening socket"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on a non-listening socket - EINVAL");
@@ -167,7 +167,7 @@
 	/*accept() TEST5: On a established socket EINVAL, Expected error*/
 	error = accept(acpt_sk, (struct sockaddr *) &acpt_addr, &len);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "accept on an established socket"
+		tst_brkm(TBROK, NULL, "accept on an established socket"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on an established socket - EINVAL");
@@ -180,7 +180,7 @@
 	/*accept() TEST6: On the CLOSED association should succeed*/
 	acpt_sk = accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len);
         if (acpt_sk < 0)
-		tst_brkm(TBROK, tst_exit, "accept a closed association"
+		tst_brkm(TBROK, NULL, "accept a closed association"
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() a closed association - SUCCESS");
@@ -202,7 +202,7 @@
         /*close() TEST8: Bad socket descriptor, EBADF Expected error*/
 	error = close(-1);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "close with a bad socket descriptor "
+		tst_brkm(TBROK, NULL, "close with a bad socket descriptor "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a bad socket descriptor - EBADF");
@@ -210,7 +210,7 @@
 	/*close() TEST9: valid socket descriptor should succeed*/
 	error = close(sk);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "close with a valid socket descriptor"
+		tst_brkm(TBROK, NULL, "close with a valid socket descriptor"
                          " error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a valid socket descriptor - SUCCESS");
@@ -218,7 +218,7 @@
 	/*close() TEST10: closed socket descriptor, EBADF Expected error*/
         error = close(sk);
         if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "close with a closed socket "
+		tst_brkm(TBROK, NULL, "close with a closed socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a closed socket descriptor - EBADF");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_addrs.c b/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
index fdd9694..55aa701 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
@@ -177,7 +177,7 @@
 	/*sctp_getladdrs() TEST1: Bad socket descriptor, EBADF Expected error*/
 	error = sctp_getladdrs(-1, 0, &laddrs);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "sctp_getladdrs with a bad socket "
+		tst_brkm(TBROK, NULL, "sctp_getladdrs with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getladdrs() with a bad socket descriptor - "
@@ -186,7 +186,7 @@
 	/*sctp_getladdrs() TEST2: Invalid socket, ENOTSOCK Expected error*/
 	error = sctp_getladdrs(0, 0, &laddrs);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "sctp_getladdrs with invalid socket "
+		tst_brkm(TBROK, NULL, "sctp_getladdrs with invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getladdrs() with invalid socket - ENOTSOCK");
@@ -196,7 +196,7 @@
         sk1 = socket(pf_class, SOCK_STREAM, IPPROTO_IP);
 	error = sctp_getladdrs(sk1, 0, &laddrs);
 	if (error != -1 || errno != EOPNOTSUPP)
-		tst_brkm(TBROK, tst_exit, "sctp_getladdrs with socket of "
+		tst_brkm(TBROK, NULL, "sctp_getladdrs with socket of "
 			 "different protocol error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getladdrs() with socket of different protocol - "
@@ -205,20 +205,20 @@
 	/*sctp_getladdrs() TEST4: Getting the local addresses*/
 	error = sctp_getladdrs(lstn_sk, 0, &laddrs);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "sctp_getladdrs with valid socket "
+		tst_brkm(TBROK, NULL, "sctp_getladdrs with valid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	addr = (struct sockaddr_in *)laddrs;
 	if (addr->sin_port != lstn_addr.sin_port || 
 	    addr->sin_family != lstn_addr.sin_family || 
 	    addr->sin_addr.s_addr != lstn_addr.sin_addr.s_addr)
-		tst_brkm(TBROK, tst_exit, "sctp_getladdrs comparision failed");
+		tst_brkm(TBROK, NULL, "sctp_getladdrs comparision failed");
 
 	tst_resm(TPASS, "sctp_getladdrs() - SUCCESS");
 
 	/*sctp_freealddrs() TEST5: freeing the local address*/
 	if ((sctp_freeladdrs(laddrs)) < 0)
-		tst_brkm(TBROK, tst_exit, "sctp_freeladdrs "
+		tst_brkm(TBROK, NULL, "sctp_freeladdrs "
 			 "error:%d, errno:%d", error, errno);
 		
 	tst_resm(TPASS, "sctp_freeladdrs() - SUCCESS");
@@ -226,7 +226,7 @@
 	/*sctp_getpaddrs() TEST6: Bad socket descriptor, EBADF Expected error*/
 	error = sctp_getpaddrs(-1, 0, &paddrs);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs with a bad socket "
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getpaddrs() with a bad socket descriptor - "
@@ -235,7 +235,7 @@
 	/*sctp_getpaddrs() TEST7: Invalid socket, ENOTSOCK Expected error*/
 	error = sctp_getpaddrs(0, 0, &paddrs);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs with invalid socket "
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs with invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getpaddrs() with invalid socket - ENOTSOCK");
@@ -244,7 +244,7 @@
 	EOPNOTSUPP Expected error*/
 	error = sctp_getpaddrs(sk1, 0, &laddrs);
 	if (error != -1 || errno != EOPNOTSUPP)
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs with socket of "
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs with socket of "
 			 "different protocol error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_getpaddrs() with socket of different protocol - "
@@ -253,20 +253,20 @@
 	/*sctp_getpaddrs() TEST9: Getting the peer addresses*/
 	error = sctp_getpaddrs(acpt_sk, 0, &paddrs);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs with valid socket "
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs with valid socket "
 			 "error:%d, errno:%d", error, errno);
 	
 	addr = (struct sockaddr_in *)paddrs;
 	if (addr->sin_port != acpt_addr.sin_port ||
             addr->sin_family != acpt_addr.sin_family || 
             addr->sin_addr.s_addr != acpt_addr.sin_addr.s_addr)
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs comparision failed");
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs comparision failed");
 
 	tst_resm(TPASS, "sctp_getpaddrs() - SUCCESS");
 
 	/*sctp_freeapddrs() TEST10: freeing the peer address*/
 	if ((sctp_freepaddrs(paddrs)) < 0)
-		tst_brkm(TBROK, tst_exit, "sctp_freepaddrs "
+		tst_brkm(TBROK, NULL, "sctp_freepaddrs "
 			 "error:%d, errno:%d", error, errno);
 		
 	tst_resm(TPASS, "sctp_freepaddrs() - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_connect.c b/testcases/network/sctp/func_tests/test_1_to_1_connect.c
index 4decfca..e91d863 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_connect.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_connect.c
@@ -114,7 +114,7 @@
 	len = sizeof(struct sockaddr_in);
 	error = connect(-1, (const struct sockaddr *) &conn_addr, len);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "connect with bad socket "
+		tst_brkm(TBROK, NULL, "connect with bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with bad socket descriptor - EBADF");
@@ -122,7 +122,7 @@
 	/*connect () TEST2: Invalid socket, ENOTSOCK Expected error*/
 	error = connect(0, (const struct sockaddr *) &conn_addr, len);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "connect with invalid socket "
+		tst_brkm(TBROK, NULL, "connect with invalid socket "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid socket - ENOTSOCK");
@@ -130,7 +130,7 @@
 	/*connect () TEST3: Invalid address, EFAULT Expected error*/
 	error = connect(sk, (const struct sockaddr *) -1, len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "connect with invalid address "
+		tst_brkm(TBROK, NULL, "connect with invalid address "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address - EFAULT");
@@ -138,7 +138,7 @@
 	/*connect () TEST4: Invalid address length, EINVAL Expected error*/
 	error = connect(sk, (const struct sockaddr *) &conn_addr, (len - 3));
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "connect with invalid address length "
+		tst_brkm(TBROK, NULL, "connect with invalid address length "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address length - EINVAL");
@@ -147,7 +147,7 @@
 	conn_addr.sin_family = 9090; /*Assigning invalid address family*/
         error = connect(sk, (const struct sockaddr *) &conn_addr, len);
         if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "connect with invalid address family "
+		tst_brkm(TBROK, NULL, "connect with invalid address family "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address family - EINVAL");
@@ -161,7 +161,7 @@
 		error = connect(clnt_sk[i], (const struct sockaddr *)&conn_addr,
 			      len);
 		if (error < 0)
-			tst_brkm(TBROK, tst_exit, "valid blocking connect "
+			tst_brkm(TBROK, NULL, "valid blocking connect "
 				 "error:%d, errno:%d", error, errno);
 	}
 
@@ -172,7 +172,7 @@
 	/*Now that accept queue is full, the below connect should fail*/
 	error = connect(clnt2_sk, (const struct sockaddr *) &conn_addr, len);
 	if (error != -1 || errno != ECONNREFUSED)
-		tst_brkm(TBROK, tst_exit, "connect when accept queue is full "
+		tst_brkm(TBROK, NULL, "connect when accept queue is full "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() when accept queue is full - ECONNREFUSED");
@@ -185,7 +185,7 @@
 	/*connect () TEST8: from a listening socket, EISCONN Expect error*/
 	error = connect(lstn_sk, (const struct sockaddr *) &lstn_addr, len);
 	if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, tst_exit, "connect on a listening socket "
+		tst_brkm(TBROK, NULL, "connect on a listening socket "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on a listening socket - EISCONN");
@@ -194,7 +194,7 @@
 	i=0;
 	error = connect(acpt_sk[i], (const struct sockaddr *) &lstn_addr, len);
         if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, tst_exit, "connect on an established socket "
+		tst_brkm(TBROK, NULL, "connect on an established socket "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on an established socket - EISCONN");
@@ -209,7 +209,7 @@
 	 */
 	error = connect(sk1, (const struct sockaddr *)&conn_addr, len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "Re-establish an association that "
+		tst_brkm(TBROK, NULL, "Re-establish an association that "
 				 "is closed error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() to re-establish a closed association - "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_connectx.c b/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
index ef8736f..abd785e 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
@@ -115,7 +115,7 @@
 	len = sizeof(struct sockaddr_in);
 	error = sctp_connectx(-1, (struct sockaddr *) &conn_addr, 1);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx with bad socket "
+		tst_brkm(TBROK, NULL, "sctp_connectx with bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with bad socket descriptor - EBADF");
@@ -123,7 +123,7 @@
 	/*sctp_connectx () TEST2: Invalid socket, ENOTSOCK Expected error*/
 	error = sctp_connectx(0, (struct sockaddr *) &conn_addr, 1);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx with invalid socket "
+		tst_brkm(TBROK, NULL, "sctp_connectx with invalid socket "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid socket - ENOTSOCK");
@@ -133,7 +133,7 @@
 	tmp_addr->sa_family = AF_INET;
 	error = sctp_connectx(sk, tmp_addr, 1);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx with invalid address "
+		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address - EINVAL");
@@ -141,7 +141,7 @@
 	/*sctp_connectx () TEST4: Invalid address length, EINVAL Expected error*/
 	error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 0);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx with invalid address length "
+		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address length "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address length - EINVAL");
@@ -150,7 +150,7 @@
 	conn_addr.sin_family = 9090; /*Assigning invalid address family*/
 	error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 1);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx with invalid address family "
+		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address family "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address family - EINVAL");
@@ -164,7 +164,7 @@
 		error = sctp_connectx(clnt_sk[i], (struct sockaddr *)&conn_addr,
 			      1);
 		if (error < 0)
-			tst_brkm(TBROK, tst_exit, "valid blocking sctp_connectx "
+			tst_brkm(TBROK, NULL, "valid blocking sctp_connectx "
 				 "error:%d, errno:%d", error, errno);
 	}
 
@@ -175,7 +175,7 @@
 	/*Now that accept queue is full, the below sctp_connectx should fail*/
 	error = sctp_connectx(clnt2_sk, (struct sockaddr *) &conn_addr, 1);
 	if (error != -1 || errno != ECONNREFUSED)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx when accept queue is full "
+		tst_brkm(TBROK, NULL, "sctp_connectx when accept queue is full "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() when accept queue is full - ECONNREFUSED");
@@ -188,7 +188,7 @@
 	/*sctp_connectx () TEST8: from a listening socket, EISCONN Expect error*/
 	error = sctp_connectx(lstn_sk, (struct sockaddr *) &lstn_addr, 1);
 	if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx on a listening socket "
+		tst_brkm(TBROK, NULL, "sctp_connectx on a listening socket "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() on a listening socket - EISCONN");
@@ -197,7 +197,7 @@
 	i=0;
 	error = sctp_connectx(acpt_sk[i], (struct sockaddr *) &lstn_addr, 1);
 	if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, tst_exit, "sctp_connectx on an established socket "
+		tst_brkm(TBROK, NULL, "sctp_connectx on an established socket "
 	                 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() on an established socket - EISCONN");
@@ -212,7 +212,7 @@
 	 */
 	error = sctp_connectx(sk1, (struct sockaddr *)&conn_addr, 1);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "Re-establish an association that "
+		tst_brkm(TBROK, NULL, "Re-establish an association that "
 				 "is closed error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() to re-establish a closed association - "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c b/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
index cb9ecce..d436b36 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
@@ -114,18 +114,18 @@
 	/*Setting server socket non-blocking*/
 	sflag = fcntl(lstn_sk, F_GETFL, 0);
 	if (sflag < 0)
-		tst_brkm(TBROK, tst_exit, "fcnt F_GETFL failed "
+		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
                          "sflag:%d, errno:%d", sflag, errno);
 
 	error = fcntl(lstn_sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "fcnt F_SETFL failed "
+		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
                          "error:%d, errno:%d", error, errno);
 
 	/* TEST1: accept should return EAGAIN instead blocking. */
 	error = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (error != -1 || errno != EAGAIN)
-		tst_brkm(TBROK, tst_exit, "non-blocking accept "
+		tst_brkm(TBROK, NULL, "non-blocking accept "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking accept() - EAGAIN");
@@ -134,17 +134,17 @@
 	/*Set client socket as non-blocking*/
 	cflag = fcntl(sk, F_GETFL, 0);
 	if (cflag < 0)
-		tst_brkm(TBROK, tst_exit, "fcnt F_GETFL failed "
+		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
                          "cflag:%d, errno:%d", cflag, errno);
 
 	error = fcntl(sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "fcnt F_SETFL failed "
+		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
                          "error:%d, errno:%d", error, errno);
 
 	error = connect(sk, (const struct sockaddr *) &conn_addr, len);
 	if (error != -1 || errno != EINPROGRESS)
-		tst_brkm(TBROK, tst_exit, "non-blocking connect "
+		tst_brkm(TBROK, NULL, "non-blocking connect "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connect() - EINPROGRESS");
@@ -152,7 +152,7 @@
 	/* TEST3: Now that connect() called, accept will succeed */
 	acpt_sk = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (acpt_sk < 0)
-		tst_brkm(TBROK, tst_exit, "accept after a non-blocking connect "
+		tst_brkm(TBROK, NULL, "accept after a non-blocking connect "
                          "error:%d, errno:%d", error, errno);
 	
 	tst_resm(TPASS, "accept() after a non-blocking connect - SUCCESS");
@@ -197,7 +197,7 @@
 	/* TEST4: recvmsg() should return EAGAIN instead blocking */
 	error = recvmsg(sk, &inmessage, MSG_WAITALL);
 	if (error != -1 || errno != EAGAIN)
-		tst_brkm(TBROK, tst_exit, "non-blocking recvmsg "
+		tst_brkm(TBROK, NULL, "non-blocking recvmsg "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking recvmsg() - EAGAIN");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c b/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
index 120fe39..74cf46f 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
@@ -116,7 +116,7 @@
 	count = recvfrom(-1, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "recvfrom with a bad socket "
+		tst_brkm(TBROK, NULL, "recvfrom with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with a bad socket descriptor - EBADF");
@@ -125,7 +125,7 @@
 	count = recvfrom(0, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "recvfrom with invalid socket "
+		tst_brkm(TBROK, NULL, "recvfrom with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with invalid socket - ENOTSOCK");
@@ -134,7 +134,7 @@
 	count = recvfrom(acpt_sk, (char *)-1, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "recvfrom with invalid message "
+		tst_brkm(TBROK, NULL, "recvfrom with invalid message "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with invalid message ptr - EFAULT");
@@ -143,7 +143,7 @@
 	count = recvfrom(lstn_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, tst_exit, "recvfrom on listening socket "
+		tst_brkm(TBROK, NULL, "recvfrom on listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() on listening socket - ENOTCONN");
@@ -156,7 +156,7 @@
 	count = recvfrom(acpt_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
-		tst_brkm(TBROK, tst_exit, "recvfrom on a socket that has "
+		tst_brkm(TBROK, NULL, "recvfrom on a socket that has "
 			 "received shutdown count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() on a socket that has received shutdown - "
@@ -167,7 +167,7 @@
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
-		tst_brkm(TBROK, tst_exit, "recvfrom on a socket with pending "
+		tst_brkm(TBROK, NULL, "recvfrom on a socket with pending "
 			 "message that has sent shutdown count:%d, errno:%d",
 			 count, errno);
 
@@ -179,7 +179,7 @@
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, tst_exit, "recvfrom on a socket with no "
+		tst_brkm(TBROK, NULL, "recvfrom on a socket with no "
 			 "pending messages and has sent shutdown count:%d, "
 			 "errno:%d", count, errno);
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c b/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
index 83da25a..9c6e877 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
@@ -123,7 +123,7 @@
 	/*recvmsg () TEST1: Bad socket descriptor, EBADF Expected error*/
 	count = recvmsg(-1, &inmessage, flag);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "recvmsg with a bad socket "
+		tst_brkm(TBROK, NULL, "recvmsg with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with a bad socket descriptor - EBADF");
@@ -131,7 +131,7 @@
 	/*recvmsg () TEST2: Invalid socket , ENOTSOCK Expected error*/
 	count = recvmsg(0, &inmessage, flag);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "recvmsg with invalid socket "
+		tst_brkm(TBROK, NULL, "recvmsg with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid socket - ENOTSOCK");
@@ -140,7 +140,7 @@
 	inmessage.msg_iov = (struct iovec *)-1;
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "recvmsg with invalid iovec "
+		tst_brkm(TBROK, NULL, "recvmsg with invalid iovec "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid iovec ptr - EFAULT");
@@ -150,7 +150,7 @@
 	/*recvmsg () TEST4: Invalid msghdr pointer EFAULT, Expected error*/
 	count = recvmsg(acpt_sk, (struct msghdr *)-1, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "recvmsg with invalid msghdr "
+		tst_brkm(TBROK, NULL, "recvmsg with invalid msghdr "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid msghdr ptr - EFAULT");
@@ -158,7 +158,7 @@
 	/*recvmsg () TEST5:recvmsg on listening socket,ENOTCONN Expected error*/
 	count = recvmsg(lstn_sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, tst_exit, "recvmsg on listening socket "
+		tst_brkm(TBROK, NULL, "recvmsg on listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() on listening socket - ENOTCONN");
@@ -171,7 +171,7 @@
 	/*recvmsg () TEST6:reading on a socket that received SHUTDOWN*/
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count < 0)
-		tst_brkm(TBROK, tst_exit, "recvmsg on a socket that has "
+		tst_brkm(TBROK, NULL, "recvmsg on a socket that has "
 			 "received shutdown count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() on a socket that has received shutdown - "
@@ -181,7 +181,7 @@
 	SHUTDOWN*/
 	count = recvmsg(sk, &inmessage, flag);
 	if (count < 0)
-		tst_brkm(TBROK, tst_exit, "recvmsg on a socket with pending "
+		tst_brkm(TBROK, NULL, "recvmsg on a socket with pending "
 			 "message that has sent shutdown count:%d, errno:%d",
 			 count, errno);
 
@@ -192,7 +192,7 @@
 	ENOTCONN Expected error*/
 	count = recvmsg(sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, tst_exit, "recvmsg on a socket with no "
+		tst_brkm(TBROK, NULL, "recvmsg on a socket with no "
 			 "pending messages and has sent shutdown count:%d, "
 			 "errno:%d", count, errno);
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c b/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
index b1e2625..777304e 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
@@ -73,7 +73,7 @@
 	/*TEST1 Getting the default values using getsockopt()*/
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_RTOINFO - SUCCESS");
@@ -87,7 +87,7 @@
 	ret = setsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &srtoinfo, 
 		sizeof(struct sctp_rtoinfo));
 	if (ret < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, NULL, "setsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	tst_resm(TPASS, "setsockopt() SCTP_RTOINFO - SUCCESS");
@@ -95,14 +95,14 @@
 	/*Getting the values which are set using setsockopt()*/
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	/* TEST3 Compare the get values with the set values. */ 
 	if (srtoinfo.srto_initial != grtoinfo.srto_initial &&
             srtoinfo.srto_max != grtoinfo.srto_max &&
             srtoinfo.srto_min != grtoinfo.srto_min)
-		tst_brkm(TBROK, tst_exit, "setsockopt/getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SCTP_RTOINFO "
 			 "compare failed");
 
 	tst_resm(TPASS, "setsockopt()/getsockopt SCTP_RTOINFO compare - "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_send.c b/testcases/network/sctp/func_tests/test_1_to_1_send.c
index 35d38a4..d3d0916 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_send.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_send.c
@@ -112,7 +112,7 @@
 	/*send () TEST1: Bad socket descriptor, EBADF Expected error*/
 	count = send(-1, message, len_snd, flag);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "send with a bad socket "
+		tst_brkm(TBROK, NULL, "send with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with a bad socket descriptor - EBADF");
@@ -120,7 +120,7 @@
 	/*send () TEST2: Invalid socket, ENOTSOCK Expected error*/
 	count = send(0, message, len_snd, flag);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "send with invalid socket "
+		tst_brkm(TBROK, NULL, "send with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with invalid socket - ENOTSOCK");
@@ -128,7 +128,7 @@
 	/*send () TEST3: send on listening socket, EPIPE Expected error*/
 	count = send(lstn_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, tst_exit, "send on a listening socket "
+		tst_brkm(TBROK, NULL, "send on a listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() on a listening socket - EPIPE");
@@ -137,7 +137,7 @@
        /* FIXME this test should pass. Don't catch why...  */
 	count = send(sk, (char *)0x1, len_snd, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "send with invalid message "
+		tst_brkm(TBROK, NULL, "send with invalid message "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with invalid message ptr - EFAULT");
@@ -154,7 +154,7 @@
 	/*send () TEST5: send on closed association, EPIPE Expected error*/
 	count = send(acpt1_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, tst_exit, "send on a closed association "
+		tst_brkm(TBROK, NULL, "send on a closed association "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() on a closed association - EPIPE");
@@ -190,7 +190,7 @@
 	/*send() TEST6: Sending data from client socket to server socket*/
 	count = send(sk, message, msg_count, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "send from client to server "
+		tst_brkm(TBROK, NULL, "send from client to server "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from client to server - SUCCESS");
@@ -202,7 +202,7 @@
 	/*send() TEST7: Sending data from accept socket to client socket*/
 	count = send(acpt_sk, message, msg_count, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "send from accept socket to client "
+		tst_brkm(TBROK, NULL, "send from accept socket to client "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from accept socket to client - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c b/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
index 0c5970e..7bdc9f0 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
@@ -153,7 +153,7 @@
 	/*sendmsg () TEST1: Bad socket descriptor, EBADF Expected error*/
 	count = sendmsg(-1, &outmessage, flag);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "sendmsg with a bad socket "
+		tst_brkm(TBROK, NULL, "sendmsg with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with a bad socket descriptor - EBADF");
@@ -161,7 +161,7 @@
 	/*sendmsg () TEST2: Invalid socket, ENOTSOCK Expected error*/
 	count = sendmsg(0, &outmessage, flag);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "sendmsg with invalid socket "
+		tst_brkm(TBROK, NULL, "sendmsg with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with invalid socket - ENOTSOCK");
@@ -169,7 +169,7 @@
 	/*sendmsg () TEST3: sendmsg on listening socket, EPIPE Expected error*/
 	count = sendmsg(lstn_sk, &outmessage, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, tst_exit, "sendmsg on a listening socket "
+		tst_brkm(TBROK, NULL, "sendmsg on a listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() on a listening socket - EPIPE");
@@ -178,7 +178,7 @@
 	outmessage.msg_iov = (struct iovec *)-1;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "sendmsg with invalid iovec "
+		tst_brkm(TBROK, NULL, "sendmsg with invalid iovec "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with invalid iovec ptr - EFAULT");
@@ -189,7 +189,7 @@
         outmessage.msg_iovlen = 0;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sendmsg with invalid iovec "
+		tst_brkm(TBROK, NULL, "sendmsg with invalid iovec "
 			 "length count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with invalid iovec length - EINVAL");
@@ -199,7 +199,7 @@
 	/*sendmsg () TEST6: Invalid msghdr pointer EFAULT, Expected error*/
 	count = sendmsg(sk, (struct msghdr *)-1, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "sendmsg with invalid msghdr "
+		tst_brkm(TBROK, NULL, "sendmsg with invalid msghdr "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with invalid msghdr ptr - EFAULT");
@@ -208,7 +208,7 @@
 	sinfo->sinfo_flags = 999;
 	count = sendmsg(sk, &outmessage, -1);
 	if (count != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sendmsg with invalid sinfo "
+		tst_brkm(TBROK, NULL, "sendmsg with invalid sinfo "
 			 "flags count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with invalid sinfo flags - EINVAL");
@@ -217,7 +217,7 @@
 	sinfo->sinfo_flags = SCTP_EOF;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sendmsg with SCTP_EOF flag "
+		tst_brkm(TBROK, NULL, "sendmsg with SCTP_EOF flag "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with SCTP_EOF flag - EINVAL");
@@ -226,7 +226,7 @@
 	sinfo->sinfo_flags = SCTP_ABORT;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "sendmsg with SCTP_ABORT flag "
+		tst_brkm(TBROK, NULL, "sendmsg with SCTP_ABORT flag "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() with SCTP_ABORT flag - EINVAL");
@@ -243,7 +243,7 @@
 	/*sendmsg () TEST10:sendmsg on closed association, EPIPE Expected error*/
 	count = sendmsg(acpt1_sk, &outmessage, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, tst_exit, "sendmsg on a closed association "
+		tst_brkm(TBROK, NULL, "sendmsg on a closed association "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() on a closed association - EPIPE");
@@ -317,7 +317,7 @@
 	/*sendmsg() TEST11: Sending data from server socket to client socket*/
 	count = sendmsg(acpt_sk, &outmessage, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendmsg from accept socket to "
+		tst_brkm(TBROK, NULL, "sendmsg from accept socket to "
 			 "client count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() from accept socket to client - SUCCESS");
@@ -330,7 +330,7 @@
 	/*sendmsg() TEST12: Sending data from client socket to server socket*/
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendmsg from client to server "
+		tst_brkm(TBROK, NULL, "sendmsg from client to server "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() from client to server - SUCCESS");
@@ -348,7 +348,7 @@
 	server socket*/
 	count = sendmsg(sk1, &outmessage, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendmsg from unconnected client to "
+		tst_brkm(TBROK, NULL, "sendmsg from unconnected client to "
 			 "server count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() from unconnected clt to server - SUCCESS");
@@ -363,7 +363,7 @@
 	/*sendmsg() TEST14: Sending a message on SHUT_RD socket*/
 	count = sendmsg(sk1, &outmessage, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendmsg on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "sendmsg on a SHUT_RD socket "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() on a SHUT_RD socket - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sendto.c b/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
index 4c5e2df..0f648fa 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
@@ -109,7 +109,7 @@
 	count = sendto(sk, message, msg_count, flag,
 		       (const struct sockaddr *) &conn_addr, len);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendto from client to server "
+		tst_brkm(TBROK, NULL, "sendto from client to server "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from client to server - SUCCESS");
@@ -122,7 +122,7 @@
 	count = sendto(acpt_sk, message, msg_count, flag,
 		       (const struct sockaddr *) &svr_addr, len);
 	if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendto from accept socket to client "
+		tst_brkm(TBROK, NULL, "sendto from accept socket to client "
                          "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from accept socket to client - SUCCESS");
@@ -139,7 +139,7 @@
         count = sendto(sk1, message, msg_count, flag,
 		       (const struct sockaddr *) &conn_addr, len);
         if (count != msg_count)
-		tst_brkm(TBROK, tst_exit, "sendto from unconnected client to "
+		tst_brkm(TBROK, NULL, "sendto from unconnected client to "
 			 "server count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from unconnected client to server - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c b/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
index e51f950..66815ec 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
@@ -106,7 +106,7 @@
 	/*shutdown() TEST1: Bad socket descriptor, EBADF Expected error*/
 	error = shutdown(-1, SHUT_WR);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "shutdown with a bad socket "
+		tst_brkm(TBROK, NULL, "shutdown with a bad socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with a bad socket descriptor - EBADF");
@@ -114,7 +114,7 @@
 	/*shutdown() TEST2: Invalid socket, ENOTSOCK Expected error*/
         error = shutdown(0, SHUT_WR);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "shutdown with an invalid socket "
+		tst_brkm(TBROK, NULL, "shutdown with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with an invalid socket - ENOTSOCK");
@@ -126,7 +126,7 @@
 	/*shutdown() TEST3: shutdown with SHUT_WR flag to disable new send*/
 	error = shutdown(clnt_sk[0], SHUT_WR);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "shutdown with SHUT_WR flag "
+		tst_brkm(TBROK, NULL, "shutdown with SHUT_WR flag "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Reading on a socket that has received SHUTDOWN should return 0 
@@ -134,7 +134,7 @@
 	 */
 	error = recv(acpt_sk[0], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN received socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN received socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Read the pending message on clnt_sk[0] that was received before
@@ -145,7 +145,7 @@
 	/* No more messages and the association is SHUTDOWN, should fail. */
 	error = recv(clnt_sk[0], msgbuf, 100, 0);
 	if ((error != -1) || (errno != ENOTCONN))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_WR socket with no "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_WR socket with no "
 			 "messages error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_WR flag - SUCCESS");
@@ -157,13 +157,13 @@
 
 	error = recv(clnt_sk[1], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Sending a message on SHUT_RD socket. */
 	error = test_send(clnt_sk[1], message, strlen(message), 0);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "send on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "send on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Receive the message sent on SHUT_RD socket. */
@@ -175,7 +175,7 @@
 	/* We should not receive the message as the socket is SHUT_RD */ 
 	error = recv(clnt_sk[1], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_RD flag - SUCCESS");
@@ -186,12 +186,12 @@
 
 	error = recv(acpt_sk[2], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN received socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN received socket "
 			 "error:%d, errno:%d", error, errno);
 
 	error = recv(clnt_sk[2], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RDWR socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RDWR socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_RDWR flag - SUCCESS");
@@ -199,7 +199,7 @@
 	/*shutdown() TEST6: Unconnected socket, ENOTCONN Expected error*/
 	error = shutdown(sk, SHUT_RD);
 	if ((error != -1) || (errno != ENOTCONN))
-		tst_brkm(TBROK, tst_exit, "shutdown on an unconnected socket "
+		tst_brkm(TBROK, NULL, "shutdown on an unconnected socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() on an unconnected socket - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c b/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
index cce43ff..292f620 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
@@ -99,7 +99,7 @@
         /* socket() TEST1: Invalid domain, EAFNOSUPPORT Expected error */
         sk = socket(-1, SOCK_STREAM, IPPROTO_SCTP);
         if (sk != -1 || errno != EAFNOSUPPORT)
-		tst_brkm(TBROK, tst_exit, "socket() with invalid domain "
+		tst_brkm(TBROK, NULL, "socket() with invalid domain "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid domain - EAFNOSUPPORT");
@@ -107,7 +107,7 @@
 	/*socket() TEST2 : Invalid type, EINVAL Expected error*/
         sk = socket(pf_class, -1, IPPROTO_SCTP);
         if (sk != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "socket() with invalid type "
+		tst_brkm(TBROK, NULL, "socket() with invalid type "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid type - EINVAL");
@@ -115,7 +115,7 @@
 	/*socket() TEST3: opening a socket*/
         sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
         if (sk < 0)
-		tst_brkm(TBROK, tst_exit, "valid socket() call "
+		tst_brkm(TBROK, NULL, "valid socket() call "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() - SUCCESS");
@@ -123,7 +123,7 @@
 	/*bind() TEST4: Invalid structure, EFAULT Expected error */
         error = bind(sk, (struct sockaddr *)-1, sizeof(struct sockaddr_in));
         if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "bind() with invalid address ptr "
+		tst_brkm(TBROK, NULL, "bind() with invalid address ptr "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address ptr - EFAULT");
@@ -135,7 +135,7 @@
 
 	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr)-2);
         if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "bind() with invalid address length "
+		tst_brkm(TBROK, NULL, "bind() with invalid address length "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address length - EINVAL");
@@ -143,7 +143,7 @@
 	/*bind() TEST6: Invalid socket descriptor, ENOTSOCK Expect Error*/
 	error = bind(0, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "bind() with invalid socket "
+		tst_brkm(TBROK, NULL, "bind() with invalid socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid socket descriptor - ENOTSOCK");
@@ -153,7 +153,7 @@
 	bind_addr.sin_addr.s_addr = inet_addr(SCTP_INV_LOOPBACK);
 	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
         if (error != -1 || errno != EADDRNOTAVAIL)
-		tst_brkm(TBROK, tst_exit, "bind() with invalid local "
+		tst_brkm(TBROK, NULL, "bind() with invalid local "
 			 "address error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid local address - EADDRNOTAVAIL");
@@ -166,7 +166,7 @@
 
 	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, tst_exit, "bind() on an already bound socket "
+		tst_brkm(TBROK, NULL, "bind() on an already bound socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() on an already bound socket - EINVAL");
@@ -185,7 +185,7 @@
 		error = bind(sk, (struct sockaddr *) &bind_addr,
 			     sizeof(bind_addr));
 		if (error != -1 || errno != EACCES)
-			tst_brkm(TBROK, tst_exit, "bind() on reserverd port "
+			tst_brkm(TBROK, NULL, "bind() on reserverd port "
 			 "error:%d, errno:%d", error, errno);
 
 		tst_resm(TPASS, "bind() on reserved port - EACCESS");
@@ -197,7 +197,7 @@
         bind_addr.sin_port = htons(SCTP_TESTPORT_1);
 	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "bind() with INADDR_ANY address and "
+		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
 			 "non-zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with INADDR_ANY address and non-zero port - "
@@ -214,7 +214,7 @@
         bind_addr.sin_port = 0;
 	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "bind() with INADDR_ANY address and "
+		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
 			 "zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with INADDR_ANY address and zero port - "
@@ -232,7 +232,7 @@
         bind_addr.sin_port = 0;
 	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "bind() with local address and "
+		tst_brkm(TBROK, NULL, "bind() with local address and "
 			 "zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with local address and zero port - "
@@ -241,7 +241,7 @@
 	/*listen() TEST13: Bad socket descriptor EBADF, Expected error*/
 	error = listen(-1, 3);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "listen() with bad socket descriptor "
+		tst_brkm(TBROK, NULL, "listen() with bad socket descriptor "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() with bad socket descriptor - EBADF");
@@ -249,7 +249,7 @@
 	/*listen() TEST14: Invalid socket ENOTSOCK, Expected error*/
 	error = listen(0, 3);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "listen() with invalid socket "
+		tst_brkm(TBROK, NULL, "listen() with invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() with invalid socket - ENOTSOCK");
@@ -257,7 +257,7 @@
 	/*listen() TEST15:listen on a bound socket, should succeed*/
 	error = listen(sk, 3);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "listen() on a bound socket "
+		tst_brkm(TBROK, NULL, "listen() on a bound socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() on a bound socket - SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c b/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
index 01ec2a3..856617d 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
@@ -112,7 +112,7 @@
 	/*setsockopt() TEST1: Bad socket descriptor EBADF, Expected error*/
         error = setsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "setsockopt with a bad socket "
+		tst_brkm(TBROK, NULL, "setsockopt with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with a bad socket descriptor - EBADF");
@@ -120,7 +120,7 @@
 	/*setsockopt() TEST2: Invalid socket ENOTSOCK, Expected error*/
         error = setsockopt(0, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "setsockopt with an invalid socket "
+		tst_brkm(TBROK, NULL, "setsockopt with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with an invalid socket - ENOTSOCK");
@@ -128,7 +128,7 @@
 	/*setsockopt() TEST3: Invalid level ENOPROTOOPT, Expected error*/
         error = setsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
 	if (error != -1 || errno != ENOPROTOOPT)
-		tst_brkm(TBROK, tst_exit, "setsockopt with invalid level "
+		tst_brkm(TBROK, NULL, "setsockopt with invalid level "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with an invalid level - ENOPROTOOPT");
@@ -137,7 +137,7 @@
         error = setsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, 
 		(const struct sctp_rtoinfo *)-1, sizeof(struct sctp_rtoinfo));
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "setsockopt with invalid option "
+		tst_brkm(TBROK, NULL, "setsockopt with invalid option "
 			 "buffer error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with invalid option buffer - EFAULT");
@@ -145,7 +145,7 @@
 	/*setsockopt() TEST5: Invalid option Name EOPNOTSUPP, Expected error*/
         error = setsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, 0, 0);
 	if (error != -1 || errno != EOPNOTSUPP)
-		tst_brkm(TBROK, tst_exit, "setsockopt with invalid option "
+		tst_brkm(TBROK, NULL, "setsockopt with invalid option "
 			 "name error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with invalid option name - EOPNOTSUPP");
@@ -153,7 +153,7 @@
 	/*getsockopt() TEST6: Bad socket descriptor EBADF, Expected error*/
         error = getsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "getsockopt with a bad socket "
+		tst_brkm(TBROK, NULL, "getsockopt with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with a bad socket descriptor - EBADF");
@@ -161,7 +161,7 @@
 	/*getsockopt() TEST7: Invalid socket ENOTSOCK, Expected error*/
         error = getsockopt(0, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "getsockopt with an invalid socket "
+		tst_brkm(TBROK, NULL, "getsockopt with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with an invalid socket - ENOTSOCK");
@@ -173,7 +173,7 @@
 	
         error = getsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
 	if (error != -1 || errno != ENOPROTOOPT)
-		tst_brkm(TBROK, tst_exit, "getsockopt with invalid level "
+		tst_brkm(TBROK, NULL, "getsockopt with invalid level "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with an invalid level - ENOPROTOOPT");
@@ -184,7 +184,7 @@
         error = getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, 
 			   (struct sctp_rtoinfo *)-1, &len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "getsockopt with invalid option "
+		tst_brkm(TBROK, NULL, "getsockopt with invalid option "
 			 "buffer error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with invalid option buffer - EFAULT");
@@ -192,7 +192,7 @@
 	/*getsockopt() TEST9: Invalid option Name EOPNOTSUPP, Expected error*/
         error = getsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, &grtinfo, &len);
 	if (error != -1 || errno != EOPNOTSUPP)
-		tst_brkm(TBROK, tst_exit, "getsockopt with invalid option "
+		tst_brkm(TBROK, NULL, "getsockopt with invalid option "
 			 "name error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with invalid option name - EOPNOTSUPP");
@@ -230,7 +230,7 @@
 	    sinmsg.sinit_max_instreams != ginmsg.sinit_max_instreams &&
 	    sinmsg.sinit_max_attempts != ginmsg.sinit_max_attempts &&
 	    sinmsg.sinit_max_init_timeo != ginmsg.sinit_max_init_timeo)
-		tst_brkm(TBROK, tst_exit, "setsockopt/getsockopt SCTP_INITMSG "
+		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SCTP_INITMSG "
 			 "compare failed");
 
 	tst_resm(TPASS, "setsockopt() SCTP_INITMSG - SUCCESS");
@@ -243,7 +243,7 @@
 	    sinmsg.sinit_max_instreams == ginmsg.sinit_max_instreams &&
 	    sinmsg.sinit_max_attempts == ginmsg.sinit_max_attempts &&
 	    sinmsg.sinit_max_init_timeo == ginmsg.sinit_max_init_timeo)
-		tst_brkm(TBROK, tst_exit, "setsockopt/getsockopt SCTP_INITMSG "
+		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SCTP_INITMSG "
 			 "unexpected compare success");
 
 	/* SO_LINGER Test with l_onff = 0 and l_linger = 0 */
@@ -260,7 +260,7 @@
 	/* TEST12: Test case for setsockopt SO_LINGER */
 	error = setsockopt(sk2, SOL_SOCKET, SO_LINGER, &slinger, len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SO_LINGER "
+		tst_brkm(TBROK, NULL, "setsockopt SO_LINGER "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_LINGER - SUCCESS");
@@ -268,14 +268,14 @@
 	/* TEST13: Test case for getsockopt SO_LINGER */
 	error = getsockopt(sk2, SOL_SOCKET, SO_LINGER, &glinger, &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SO_LINGER "
+		tst_brkm(TBROK, NULL, "getsockopt SO_LINGER "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_LINGER - SUCCESS");
 
 	if (slinger.l_onoff != glinger.l_onoff || 
 	    slinger.l_linger != glinger.l_linger)
-		tst_brkm(TBROK, tst_exit, "setsockopt/getsockopt SO_LINGER "
+		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SO_LINGER "
 			 "compare failed");
 	
 	/*First gets the default SO_RCVBUF value and comapres with the
@@ -284,7 +284,7 @@
 	/* TEST14: Test case for getsockopt SO_RCVBUF */
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_get, &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SO_RCVBUF "
+		tst_brkm(TBROK, NULL, "getsockopt SO_RCVBUF "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_RCVBUF - SUCCESS");
@@ -293,7 +293,7 @@
 	/* TEST15: Test case for getsockopt SCTP_STATUS */
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_STATUS "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_STATUS "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_STATUS - SUCCESS");
@@ -305,18 +305,18 @@
 	/* TEST16: Test case for setsockopt SO_RCVBUF */
 	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_set, len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SO_RCVBUF "
+		tst_brkm(TBROK, NULL, "setsockopt SO_RCVBUF "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_RCVBUF - SUCCESS");
 
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_get, &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SO_RCVBUF "
+		tst_brkm(TBROK, NULL, "getsockopt SO_RCVBUF "
                          "error:%d, errno:%d", error, errno);
 
 	if ((2 * rcvbuf_val_set) != rcvbuf_val_get)
-		tst_brkm(TBROK, tst_exit, "Comparison failed:Set value and "
+		tst_brkm(TBROK, NULL, "Comparison failed:Set value and "
 			 "got value differs Set Value=%d Get Value=%d",
 			 (2*rcvbuf_val_set), rcvbuf_val_get);
 
@@ -324,7 +324,7 @@
 	/* TEST17: Test case for setsockopt SO_SNDBUF */
 	error = setsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_set, len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SO_SNDBUF "
+		tst_brkm(TBROK, NULL, "setsockopt SO_SNDBUF "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_SNDBUF - SUCCESS");
@@ -332,13 +332,13 @@
 	/* TEST18: Test case for getsockopt SO_SNDBUF */
 	error = getsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_get, &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SO_SNDBUF "
+		tst_brkm(TBROK, NULL, "getsockopt SO_SNDBUF "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_SNDBUF - SUCCESS");
 
 	if ((2 * sndbuf_val_set) != sndbuf_val_get)
-		tst_brkm(TBROK, tst_exit, "Comparison failed:Set value and "
+		tst_brkm(TBROK, NULL, "Comparison failed:Set value and "
 			 "got value differs Set Value=%d Get Value=%d\n",
 			 (2*sndbuf_val_set), sndbuf_val_get);
 
@@ -349,7 +349,7 @@
 	error = getsockopt(sk2,IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &gprimaddr,
 			   &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_PRIMARY_ADDR "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_PRIMARY_ADDR "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_PRIMARY_ADDR - SUCCESS");
@@ -358,7 +358,7 @@
 	if (htons(gaddr->sin_port) != lstn_addr.sin_port &&
 	   gaddr->sin_family != lstn_addr.sin_family &&
 	   gaddr->sin_addr.s_addr != lstn_addr.sin_addr.s_addr)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_PRIMARY_ADDR value "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_PRIMARY_ADDR value "
 			 "mismatch");
 
 	memcpy(&sprimaddr, &gprimaddr, sizeof(struct sctp_prim));
@@ -367,7 +367,7 @@
 	error = setsockopt(sk2,IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &sprimaddr,
 			   len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SCTP_PRIMARY_ADDR "
+		tst_brkm(TBROK, NULL, "setsockopt SCTP_PRIMARY_ADDR "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SCTP_PRIMARY_ADDR - SUCCESS");
@@ -378,7 +378,7 @@
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &gassocparams,
 			   &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_ASSOCINFO "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_ASSOCINFO "
                          "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_ASSOCINFO - SUCCESS");
@@ -391,18 +391,18 @@
 	error = setsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &sassocparams,
 			   len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "setsockopt SCTP_ASSOCINFO "
+		tst_brkm(TBROK, NULL, "setsockopt SCTP_ASSOCINFO "
                          "error:%d, errno:%d", error, errno);
 
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &gassocparams,
 			   &len);
 	if (error < 0)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_ASSOCINFO "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_ASSOCINFO "
                          "error:%d, errno:%d", error, errno);
 
 	if (sassocparams.sasoc_asocmaxrxt != gassocparams.sasoc_asocmaxrxt ||
 	    sassocparams.sasoc_cookie_life != gassocparams.sasoc_cookie_life)
-		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_ASSOCINFO value "
+		tst_brkm(TBROK, NULL, "getsockopt SCTP_ASSOCINFO value "
 			 "mismatch");
 	tst_resm(TPASS, "setsockopt() SCTP_ASSOCINFO - SUCCESS");
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_threads.c b/testcases/network/sctp/func_tests/test_1_to_1_threads.c
index 083c537..86ebed1 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_threads.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_threads.c
@@ -178,7 +178,7 @@
 			status = pthread_create(&thread[cnt], &attr,
 						relay, (void*)(uintptr_t)cnt);
 			if (status)
-				tst_brkm(TBROK, tst_exit, "pthread_create "
+				tst_brkm(TBROK, NULL, "pthread_create "
                          		 "failed status:%d, errno:%d", status,
 					 errno);
 		}
@@ -187,7 +187,7 @@
 		for (cnt = 1; cnt < THREADS ; cnt++) {
 			exit_status = pthread_join (thread[cnt], &result);
 			if (exit_status == -1)
-				tst_brkm(TBROK, tst_exit, "pthread_join "
+				tst_brkm(TBROK, NULL, "pthread_join "
                          		 "Thread #%d exited with status:%d",
 					 cnt, exit_status);
 		}
diff --git a/testcases/network/sctp/func_tests/test_assoc_abort.c b/testcases/network/sctp/func_tests/test_assoc_abort.c
index a332bf2..8077603 100644
--- a/testcases/network/sctp/func_tests/test_assoc_abort.c
+++ b/testcases/network/sctp/func_tests/test_assoc_abort.c
@@ -204,7 +204,7 @@
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if (error)
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS): %s",
 				 strerror(errno));
 
@@ -218,7 +218,7 @@
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS, 
 				   &status, &status_len);
 		if ((error != -1) && (errno != EINVAL))
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS) "
 				 "error:%d errno:%d", error, errno);
 	}
@@ -239,5 +239,5 @@
 	tst_resm(TPASS, "ABORT an association using SCTP_ABORT"); 
 
         /* Indicate successful completion.  */
-        return 0;
+      tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_assoc_shutdown.c b/testcases/network/sctp/func_tests/test_assoc_shutdown.c
index c5be461..84698f7 100644
--- a/testcases/network/sctp/func_tests/test_assoc_shutdown.c
+++ b/testcases/network/sctp/func_tests/test_assoc_shutdown.c
@@ -205,7 +205,7 @@
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if (error)
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS): %s",
 				 strerror(errno));
 
@@ -219,7 +219,7 @@
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS, 
 				   &status, &status_len);
 		if ((error != -1) && (errno != EINVAL))
-			tst_brkm(TBROK, tst_exit,
+			tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS) "
 				 "error:%d errno:%d", error, errno);
 	}
@@ -241,5 +241,5 @@
 	tst_resm(TPASS, "Graceful shutdown of associations using SCTP_EOF"); 
 
         /* Indicate successful completion.  */
-        return 0;
+      tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_basic.c b/testcases/network/sctp/func_tests/test_basic.c
index 85b32c1..ce20a8e 100644
--- a/testcases/network/sctp/func_tests/test_basic.c
+++ b/testcases/network/sctp/func_tests/test_basic.c
@@ -151,7 +151,7 @@
         inmessage.msg_controllen = sizeof(incmsg);
         error = recvmsg(sk2, &inmessage, MSG_WAITALL);
         if (error > 0)
-                tst_brkm(TBROK, tst_exit, "recvmsg on a socket neither"
+                tst_brkm(TBROK, NULL, "recvmsg on a socket neither"
 			 "listening nor established error: %d", error);
 
 	tst_resm(TPASS, "recvmsg on a socket neither listening nor "
@@ -302,7 +302,7 @@
 	outmessage.msg_namelen = 0;
 	bytes_sent = sendmsg(sk1, &outmessage, MSG_NOSIGNAL);
 	if ((bytes_sent > 0) || (EPIPE != errno))
-		tst_brkm(TBROK, tst_exit, "sendmsg with NULL associd and "
+		tst_brkm(TBROK, NULL, "sendmsg with NULL associd and "
 			 "NULL msg_name error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with NULL associd and NULL msg_name");
@@ -311,7 +311,7 @@
 	sinfo->sinfo_assoc_id = associd2;
 	bytes_sent = sendmsg(sk1, &outmessage, MSG_NOSIGNAL);
 	if ((bytes_sent > 0) || (EPIPE != errno))
-		tst_brkm(TBROK, tst_exit, "sendmsg with incorrect associd "
+		tst_brkm(TBROK, NULL, "sendmsg with incorrect associd "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with incorrect associd");
@@ -344,7 +344,7 @@
 
 	n_laddrs = sctp_getladdrs(sk1, associd1, &laddrs); 
 	if (n_laddrs <= 0)
-                tst_brkm(TBROK, tst_exit, "sctp_getladdrs: %s",
+                tst_brkm(TBROK, NULL, "sctp_getladdrs: %s",
 			 strerror(errno));
 
 	tst_resm(TPASS, "sctp_getladdrs");
@@ -374,7 +374,7 @@
 
 	n_paddrs = sctp_getpaddrs(sk1, associd1, &paddrs); 
 	if (n_paddrs <= 0)
-                tst_brkm(TBROK, tst_exit, "sctp_getpaddrs: %s",
+                tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s",
 			 strerror(errno));
 
 	tst_resm(TPASS, "sctp_getpaddrs");
diff --git a/testcases/network/sctp/func_tests/test_connect.c b/testcases/network/sctp/func_tests/test_connect.c
index 56dbc27..e4e8c74 100644
--- a/testcases/network/sctp/func_tests/test_connect.c
+++ b/testcases/network/sctp/func_tests/test_connect.c
@@ -107,15 +107,15 @@
 	/* Set clt_sk1 as non-blocking. */
 	flags = fcntl(clt_sk1, F_GETFL, 0);
 	if (flags < 0)
-		tst_brkm(TBROK, tst_exit, "fcntl F_GETFL: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "fcntl F_GETFL: %s", strerror(errno));
 	if (fcntl(clt_sk1, F_SETFL, flags | O_NONBLOCK) < 0)
-		tst_brkm(TBROK, tst_exit, "fcntl F_SETFL: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "fcntl F_SETFL: %s", strerror(errno));
 
 	/* Do a non-blocking connect from clt_sk1 to svr_sk */      
 	error = connect(clt_sk1, &svr_loop.sa, sizeof(svr_loop));
 	/* Non-blocking connect should return immediately with EINPROGRESS. */
 	if ((error != -1) || (EINPROGRESS != errno))
-		tst_brkm(TBROK, tst_exit, "non-blocking connect error: %d"
+		tst_brkm(TBROK, NULL, "non-blocking connect error: %d"
 			 "errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connect");
@@ -125,7 +125,7 @@
 	 */
 	error = connect(clt_sk1, &svr_loop.sa, sizeof(svr_loop));
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connect on a socket to create an "
+		tst_brkm(TBROK, NULL, "connect on a socket to create an "
 			 "assoc that is already established error:%d errno:%d",
 			 error, errno);
 
@@ -186,7 +186,7 @@
 	/* Doing a connect on a peeled off socket should fail. */
 	error = connect(peeloff_sk, &clt_loop3.sa, sizeof(clt_loop3));
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connect on a peeled off socket "
+		tst_brkm(TBROK, NULL, "connect on a peeled off socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect on a peeled off socket");
@@ -196,7 +196,7 @@
 	 */
 	error = connect(svr_sk, &clt_loop1.sa, sizeof(clt_loop1));
 	if ((error != -1) || (EADDRNOTAVAIL != errno))
-		tst_brkm(TBROK, tst_exit, "connect to create an assoc that "
+		tst_brkm(TBROK, NULL, "connect to create an assoc that "
 			 "matches a peeled off assoc error:%d errno:%d",
 			 error, errno);
 
diff --git a/testcases/network/sctp/func_tests/test_connectx.c b/testcases/network/sctp/func_tests/test_connectx.c
index 36030f8..05a1d17 100644
--- a/testcases/network/sctp/func_tests/test_connectx.c
+++ b/testcases/network/sctp/func_tests/test_connectx.c
@@ -143,15 +143,15 @@
 	/* Set clt_sk1 as non-blocking. */
 	flags = fcntl(clt_sk1, F_GETFL, 0);
 	if (flags < 0)
-		tst_brkm(TBROK, tst_exit, "fcntl F_GETFL: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "fcntl F_GETFL: %s", strerror(errno));
 	if (fcntl(clt_sk1, F_SETFL, flags | O_NONBLOCK) < 0)
-		tst_brkm(TBROK, tst_exit, "fcntl F_SETFL: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "fcntl F_SETFL: %s", strerror(errno));
 
 	/* Do a non-blocking connectx from clt_sk1 to svr_sk */      
 	error = sctp_connectx(clt_sk1, (struct sockaddr *)svr_try, NUMADDR);
 	/* Non-blocking connectx should return immediately with EINPROGRESS. */
 	if ((error != -1) || (EINPROGRESS != errno))
-		tst_brkm(TBROK, tst_exit, "non-blocking connectx error: %d"
+		tst_brkm(TBROK, NULL, "non-blocking connectx error: %d"
 			 "errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connectx");
@@ -161,7 +161,7 @@
 	 */
 	error = sctp_connectx(clt_sk1, (struct sockaddr *)svr_try, NUMADDR);
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connectx on a socket to create an "
+		tst_brkm(TBROK, NULL, "connectx on a socket to create an "
 			 "assoc that is already established error:%d errno:%d",
 			 error, errno);
 
@@ -222,7 +222,7 @@
 	/* Doing a connectx on a peeled off socket should fail. */
 	error = sctp_connectx(peeloff_sk, (struct sockaddr *)clt_loop3, NUMADDR);
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connectx on a peeled off socket "
+		tst_brkm(TBROK, NULL, "connectx on a peeled off socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connectx on a peeled off socket");
@@ -232,7 +232,7 @@
 	 */
 	error = sctp_connectx(svr_sk, (struct sockaddr *)clt_loop1, NUMADDR);
 	if ((error != -1) || (EADDRNOTAVAIL != errno))
-		tst_brkm(TBROK, tst_exit, "connectx to create an assoc that "
+		tst_brkm(TBROK, NULL, "connectx to create an assoc that "
 			 "matches a peeled off assoc error:%d errno:%d",
 			 error, errno);
 
diff --git a/testcases/network/sctp/func_tests/test_fragments.c b/testcases/network/sctp/func_tests/test_fragments.c
index 968208e..bc43917 100644
--- a/testcases/network/sctp/func_tests/test_fragments.c
+++ b/testcases/network/sctp/func_tests/test_fragments.c
@@ -214,7 +214,7 @@
 	error = test_getsockopt(sk1, SCTP_DISABLE_FRAGMENTS, &disable_frag,
 				&optlen);
 	if ((error != 0) && (disable_frag != 1))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DISABLE_FRAGMENTS) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DISABLE_FRAGMENTS) "
 			 "error:%d errno:%d disable_frag:%d",
 			 error, errno, disable_frag);
 
@@ -229,7 +229,7 @@
 	outmessage.msg_iov->iov_len = msg_len;
 	error = sendmsg(sk1, &outmessage, 0);
 	if ((error != -1) || (errno != EMSGSIZE))
-       		tst_brkm(TBROK, tst_exit, "Send a message that exceeds "
+       		tst_brkm(TBROK, NULL, "Send a message that exceeds "
 			 "assoc frag point error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "Send a message that exceeds assoc frag point");
diff --git a/testcases/network/sctp/func_tests/test_getname.c b/testcases/network/sctp/func_tests/test_getname.c
index afa31a6..1bfc33c 100644
--- a/testcases/network/sctp/func_tests/test_getname.c
+++ b/testcases/network/sctp/func_tests/test_getname.c
@@ -94,7 +94,7 @@
 	/* Verify that getsockname() on an unconnected socket works fine. */
 	error = getsockname(svr_sk, (struct sockaddr *)&svr_local_addr, &len);
 	if (0 != error)
-		tst_brkm(TBROK, tst_exit, "getsockname: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "getsockname: %s", strerror(errno));
 
 	tst_resm(TPASS, "getsockname on an unconnected socket");
 
@@ -103,7 +103,7 @@
 	/* Verify that getpeername() on an unconnected socket fails. */
 	error = getpeername(svr_sk, (struct sockaddr *)&svr_peer_addr, &len);
 	if ((-1 != error) || (ENOTCONN != errno))
-		tst_brkm(TBROK, tst_exit, "getpeername on an unconnected "
+		tst_brkm(TBROK, NULL, "getpeername on an unconnected "
 			 "socket error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getpeername on an unconnected socket");
@@ -127,7 +127,7 @@
 	/* Get the client's local address. */
 	error = getsockname(clt_sk, (struct sockaddr *)&clt_local_addr, &len);
 	if (0 != error)
-		tst_brkm(TBROK, tst_exit, "getsockname on a connected client "
+		tst_brkm(TBROK, NULL, "getsockname on a connected client "
 			 "socket: %s", strerror(errno));
 
 	tst_resm(TPASS, "getsockname on a connected client socket");
@@ -137,7 +137,7 @@
 	/* Get the client's peer address. */
 	error = getpeername(clt_sk, (struct sockaddr *)&clt_peer_addr, &len);
 	if (0 != error)
-		tst_brkm(TBROK, tst_exit, "getpeername on a connected client "
+		tst_brkm(TBROK, NULL, "getpeername on a connected client "
 			 "socket: %s", strerror(errno));
 
 	tst_resm(TPASS, "getpeername on a connected client socket");
@@ -152,7 +152,7 @@
 	error = getsockname(accept_sk, (struct sockaddr *)&svr_local_addr,
 				&len);
 	if (0 != error)
-		tst_brkm(TBROK, tst_exit, "getsockname on a connected server "
+		tst_brkm(TBROK, NULL, "getsockname on a connected server "
 			 "socket: %s", strerror(errno));
 
 	tst_resm(TPASS, "getsockname on a connected server socket");
@@ -163,36 +163,36 @@
 	error = getpeername(accept_sk, (struct sockaddr *)&svr_peer_addr,
 				&len);
 	if (0 != error)
-		tst_brkm(TBROK, tst_exit, "getpeername on a connected server "
+		tst_brkm(TBROK, NULL, "getpeername on a connected server "
 			 "socket: %s", strerror(errno));
 
 	tst_resm(TPASS, "getpeername on a connected server socket");
 
 	if (svr_local_addr.v4.sin_port != clt_peer_addr.v4.sin_port)
-		tst_brkm(TBROK, tst_exit, "Server's local port(%d) doesn't "
+		tst_brkm(TBROK, NULL, "Server's local port(%d) doesn't "
 			 "match Client's peer port(%d)\n",
 			 svr_local_addr.v4.sin_port, clt_peer_addr.v4.sin_port);
 
 	if (svr_peer_addr.v4.sin_port != clt_local_addr.v4.sin_port)
-		tst_brkm(TBROK, tst_exit, "Server's peer port(%d) doesn't "
+		tst_brkm(TBROK, NULL, "Server's peer port(%d) doesn't "
 			 "match Client's local port(%d)\n",
 			 svr_peer_addr.v4.sin_port, clt_local_addr.v4.sin_port);
 #if TEST_V6
 	if (memcmp(&svr_local_addr, &clt_peer_addr, len) != 0)
-		tst_brkm(TBROK, tst_exit, "Server's local address and client's "
+		tst_brkm(TBROK, NULL, "Server's local address and client's "
 			 "peer addresses do not match\n");
 
 	if (memcmp(&svr_peer_addr, &clt_local_addr, len) != 0)
-		tst_brkm(TBROK, tst_exit, "Server's peer address and client's "
+		tst_brkm(TBROK, NULL, "Server's peer address and client's "
 			 "local addresses do not match\n");
 #else
 	if (svr_local_addr.v4.sin_addr.s_addr !=
 		 		clt_peer_addr.v4.sin_addr.s_addr)
-		tst_brkm(TBROK, tst_exit, "Server's local address and client's "
+		tst_brkm(TBROK, NULL, "Server's local address and client's "
 			 "peer addresses do not match\n");
 	if (svr_peer_addr.v4.sin_addr.s_addr !=
 		 		clt_local_addr.v4.sin_addr.s_addr)
-		tst_brkm(TBROK, tst_exit, "Server's peer address and client's "
+		tst_brkm(TBROK, NULL, "Server's peer address and client's "
 			 "local addresses do not match\n");
 #endif
 	tst_resm(TPASS, "getsockname/getpeername server/client match");
@@ -202,7 +202,7 @@
 	/*getsockname():  Bad socket descriptor, EBADF expected error*/
 	error = getsockname(-1, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "getsockname on a bad socket "
+		tst_brkm(TBROK, NULL, "getsockname on a bad socket "
 			 "descriptor. error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockname on a bad socket descriptor - EBADF");
@@ -210,7 +210,7 @@
 	/*getsockname(): Invalid socket, ENOTSOCK expected error*/
 	error = getsockname(0, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "getsockname on an invalid socket "
+		tst_brkm(TBROK, NULL, "getsockname on an invalid socket "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockname on an invalid socket - ENOTSOCK");
@@ -218,7 +218,7 @@
 	/*getsockname(): Invalid structure, EFAULT expected error*/
 	error = getsockname(clt_sk, (struct sockaddr *)-1, &len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "getsockname with invalid buffer "
+		tst_brkm(TBROK, NULL, "getsockname with invalid buffer "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockname with invalid buffer - EFAULT");
@@ -228,7 +228,7 @@
 	/*getpeername():  Bad socket descriptor, EBADF expected error*/
 	error = getpeername(-1, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, tst_exit, "getpeername on a bad socket "
+		tst_brkm(TBROK, NULL, "getpeername on a bad socket "
 			 "descriptor. error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getpeername on a bad socket descriptor - EBADF");
@@ -236,7 +236,7 @@
 	/*getpeername(): Invalid socket, ENOTSOCK expected error*/
 	error = getpeername(0, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, tst_exit, "getpeername on an invalid socket "
+		tst_brkm(TBROK, NULL, "getpeername on an invalid socket "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getpeername on an invalid socket - ENOTSOCK");
@@ -244,7 +244,7 @@
 	/*getpeername(): Invalid structure, EFAULT expected error*/
 	error = getpeername(clt_sk, (struct sockaddr *)-1, &len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, tst_exit, "getpeername with invalid buffer "
+		tst_brkm(TBROK, NULL, "getpeername with invalid buffer "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getpeername with invalid buffer - EFAULT");
diff --git a/testcases/network/sctp/func_tests/test_inaddr_any.c b/testcases/network/sctp/func_tests/test_inaddr_any.c
index 365fd2a..b529f02 100644
--- a/testcases/network/sctp/func_tests/test_inaddr_any.c
+++ b/testcases/network/sctp/func_tests/test_inaddr_any.c
@@ -135,12 +135,12 @@
 	namelen = sizeof(loop);
 	error = getsockname(sk1, &loop.sa, &namelen);
 	if (error != 0)
-		tst_brkm(TBROK, tst_exit, "getsockname: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "getsockname: %s", strerror(errno));
 
 	namelen = sizeof(anyaddr);
 	error = getsockname(sk2, &anyaddr.sa, &namelen);
 	if (error != 0)
-		tst_brkm(TBROK, tst_exit, "getsockname: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "getsockname: %s", strerror(errno));
         
 #if TEST_V6
 	loop.v6.sin6_port = anyaddr.v6.sin6_port;
@@ -249,5 +249,5 @@
 	tst_resm(TPASS, "send msgs from a socket with INADDR_ANY bind address");
 
         /* Indicate successful completion.  */
-        return 0;
+      tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_peeloff.c b/testcases/network/sctp/func_tests/test_peeloff.c
index 1ba3057..903cea8 100644
--- a/testcases/network/sctp/func_tests/test_peeloff.c
+++ b/testcases/network/sctp/func_tests/test_peeloff.c
@@ -202,7 +202,7 @@
 	/* Verify that a peeled off socket is not allowed to do a listen().  */
 	error = listen(peeloff_sk[0], 1);
 	if (error != -1)
-		tst_brkm(TBROK, tst_exit, "listen on a peeled off socket "
+		tst_brkm(TBROK, NULL, "listen on a peeled off socket "
 			 "error: %d, errno: %d", error, errno); 
 
 	tst_resm(TPASS, "listen on a peeled off socket");
@@ -213,7 +213,7 @@
 	 */
 	if ((-1 != sctp_peeloff(peeloff_sk[0], svr_associd[0])) ||
 	    (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "sctp_peeloff on a peeled off "
+		tst_brkm(TBROK, NULL, "sctp_peeloff on a peeled off "
 			 "socket error:%d, errno:%d",
 			 error, errno);
 
diff --git a/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c b/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
index f90c4bd..5d3113c 100644
--- a/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
+++ b/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
@@ -150,14 +150,14 @@
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &oldlen, &len);
        
 	if (error)
-		tst_brkm(TBROK, tst_exit, "can't get rcvbuf size: %s",
+		tst_brkm(TBROK, NULL, "can't get rcvbuf size: %s",
 			 strerror(errno));
 
 	len = SMALL_RCVBUF; /* Really becomes 2xlen when set. */
 
 	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len));
 	if (error)
-		tst_brkm(TBROK, tst_exit, "setsockopt(SO_RCVBUF): %s",
+		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			 strerror(errno));
 
        /* Mark sk2 as being able to accept new associations.  */
@@ -190,7 +190,7 @@
 			   sizeof(oldlen));
 
 	if (error)
-		tst_brkm(TBROK, tst_exit, "setsockopt(SO_RCVBUF): %s",
+		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			 strerror(errno));
 
 	/* Get the communication up message on sk1.  */
@@ -224,7 +224,7 @@
 	error = getsockopt(sk1, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 
 	if (error)
-		tst_brkm(TBROK, tst_exit, "can't get rwnd size: %s",
+		tst_brkm(TBROK, NULL, "can't get rwnd size: %s",
 			strerror(errno));
 	tst_resm(TINFO, "creating a fillmsg of size %d",
 		gstatus.sstat_rwnd+RWND_SLOP);
@@ -284,7 +284,7 @@
 	test_check_buf_data(big_buffer, error, msg_flags, &sinfo,
 			    strlen(nottlmsg) + 1, MSG_EOR, stream, ppid); 
 	if (0 != strncmp(big_buffer, nottlmsg, strlen(nottlmsg)))
-		tst_brkm(TBROK, tst_exit, "sctp_recvmsg: Wrong Message !!!");
+		tst_brkm(TBROK, NULL, "sctp_recvmsg: Wrong Message !!!");
 
 	tst_resm(TPASS, "sctp_recvmsg msg with zero ttl");
 
@@ -302,7 +302,7 @@
 				    SCTP_SEND_FAILED, 0);
 	ssf = (struct sctp_send_failed *)big_buffer;
 	if (0 != strncmp(ttlmsg, (char *)ssf->ssf_data, strlen(ttlmsg) + 1))
-		tst_brkm(TBROK, tst_exit, "SEND_FAILED data mismatch");
+		tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 
 	tst_resm(TPASS, "sctp_recvmsg SEND_FAILED for message with ttl");
 
@@ -324,7 +324,7 @@
 		ssf = (struct sctp_send_failed *)big_buffer;
 		if (0 != strncmp(&ttlfrag[offset], (char *)ssf->ssf_data,
 				 SMALL_MAXSEG))
-			tst_brkm(TBROK, tst_exit, "SEND_FAILED data mismatch");
+			tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 		offset += SMALL_MAXSEG;
 	} while (!(ssf->ssf_info.sinfo_flags & 0x01)); /* LAST FRAG */
 
diff --git a/testcases/network/sctp/func_tests/test_sockopt.c b/testcases/network/sctp/func_tests/test_sockopt.c
index da9b03d..231b6d7 100644
--- a/testcases/network/sctp/func_tests/test_sockopt.c
+++ b/testcases/network/sctp/func_tests/test_sockopt.c
@@ -168,7 +168,7 @@
 	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status,
 			   &optlen);
 	if ((error != -1) && (errno != EINVAL))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_STATUS) on a "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) on a "
 			 "socket with no assoc error:%d errno:%d",
 			 error, errno);
 
@@ -245,7 +245,7 @@
 	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_STATUS, &status,
 			   &optlen); 
 	if ((error != -1) && (errno != EINVAL))
-        	tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_STATUS) with "
+        	tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
 			 "associd error: %d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_STATUS) with invalid associd");
@@ -257,7 +257,7 @@
 	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status,
 			   &optlen);
 	if ((error != -1) && (errno != EINVAL))
-        	tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_STATUS) with "
+        	tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
 			 "NULL associd error: %d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_STATUS) with NULL associd");
@@ -332,7 +332,7 @@
 			    MSG_EOR, 0, 0);
 	/* Verify that we received the msg without any ancillary data. */
 	if (inmessage.msg_controllen != 0)
-		tst_brkm(TBROK, tst_exit, "Receive unexpected ancillary"
+		tst_brkm(TBROK, NULL, "Receive unexpected ancillary"
 			 "data");
 
 	/* Enable SCTP_SHUTDOWN_EVENTs on udp_svr_sk. */
@@ -418,7 +418,7 @@
 		error = sctp_opt_info(udp_clt_sk,udp_clt_associd,SCTP_STATUS,
 				(char *)&status1, &optlen);
 		if (error != 0)
-	                tst_brkm(TBROK, tst_exit,
+	                tst_brkm(TBROK, NULL,
 				 "sctp_opt_info(SCTP_STATUS): %s", 
 				 strerror(errno));
 
@@ -426,11 +426,11 @@
 		error = getsockopt(udp_clt_sk, IPPROTO_SCTP, SCTP_STATUS,
                 		(char *)&status2, &optlen);
 		if (error != 0)
-	                tst_brkm(TBROK, tst_exit,
+	                tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS): %s", 
 				 strerror(errno));
 		if (strncmp((char *)&status1, (char *)&status2, optlen))
-	                tst_brkm(TBROK, tst_exit, "sctp_opt_info(SCTP_STAUS)"
+	                tst_brkm(TBROK, NULL, "sctp_opt_info(SCTP_STAUS)"
 			       "doesn't match getsockopt(SCTP_STATUS)");
 
                 tst_resm(TPASS, "sctp_opt_info(SCTP_STATUS)");
@@ -519,7 +519,7 @@
 	/* Verify that the get param matches set param. */
 	if (set_udp_sk_dflt_param.sinfo_ppid !=
 			get_udp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	/* Get default send parameters on the unconnected UDP-style socket. */
@@ -531,7 +531,7 @@
 	/* Verify that the get param matches set param. */
 	if (set_udp_sk_dflt_param.sinfo_ppid !=
 			get_udp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -548,7 +548,7 @@
 			   &set_udp_sk_dflt_param,
 			   sizeof(set_udp_sk_dflt_param));
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "invalid associd error:%d, errno:%d\n",
 			 error, errno);
 
@@ -585,7 +585,7 @@
 			   &set_udp_assoc_dflt_param,
 			   sizeof(set_udp_assoc_dflt_param));
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "associd belonging to another socket "
 			 "error:%d, errno:%d", error, errno);
 
@@ -617,7 +617,7 @@
 	/* Verify that the get param matches the set param. */
 	if (get_udp_assoc_dflt_param.sinfo_ppid !=
 			set_udp_assoc_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -636,7 +636,7 @@
 	/* Verify that the get param matches the socket-wide set param. */
 	if (get_udp_sk_dflt_param.sinfo_ppid !=
 			set_udp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -658,7 +658,7 @@
 	/* Verify that the get param matches the association's set param. */
 	if (get_peeloff_assoc_dflt_param.sinfo_ppid !=
 			set_udp_assoc_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -694,7 +694,7 @@
 	/* Verify that the get param matches set param. */
 	if (set_tcp_sk_dflt_param.sinfo_ppid !=
 			get_tcp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	/* Get default send parameters on the unconnected TCP-style socket. */
@@ -706,7 +706,7 @@
 	/* Verify that the get param matches set param. */
 	if (set_tcp_sk_dflt_param.sinfo_ppid !=
 			get_tcp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -738,7 +738,7 @@
 
 	if (set_tcp_assoc_dflt_param.sinfo_ppid !=
 			get_tcp_assoc_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	/* Get default send parameters on the connected TCP-style socket.  */ 
@@ -754,7 +754,7 @@
 			set_tcp_sk_dflt_param.sinfo_ppid) ||
 	    (get_tcp_sk_dflt_param.sinfo_ppid !=
 	    		set_tcp_assoc_dflt_param.sinfo_ppid))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	/* Get default send parameters on the listening TCP-style socket.  */ 
@@ -768,7 +768,7 @@
 	 */
 	if (get_tcp_sk_dflt_param.sinfo_ppid !=
 			set_tcp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -791,7 +791,7 @@
 	 */
 	if (get_tcp_sk_dflt_param.sinfo_ppid !=
 			set_tcp_sk_dflt_param.sinfo_ppid)
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
 	tst_resm(TPASS, "getsockopt(SCTP_DEFAULT_SEND_PARAM) - "
@@ -804,7 +804,7 @@
 	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_GET_PEER_ADDR_INFO,
 			   &pinfo, &optlen);			   
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "null associd, null addr error:%d, errno:%d\n",
 			error, errno);
 
@@ -818,7 +818,7 @@
 	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_GET_PEER_ADDR_INFO,
 			   &pinfo, &optlen);			   
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "valid associd, null addr error:%d, errno:%d\n",
 			error, errno);
 
@@ -833,7 +833,7 @@
 	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_GET_PEER_ADDR_INFO,
 			   &pinfo, &optlen);			   
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "valid associd, invalid addr error:%d, errno:%d\n",
 			error, errno);
 
@@ -879,5 +879,5 @@
 	close(peeloff_sk);
 
         /* Indicate successful completion.  */
-        return 0;
+      tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_tcp_style.c b/testcases/network/sctp/func_tests/test_tcp_style.c
index cfd561e..e19d945 100644
--- a/testcases/network/sctp/func_tests/test_tcp_style.c
+++ b/testcases/network/sctp/func_tests/test_tcp_style.c
@@ -134,7 +134,7 @@
 	/* Try to do accept on a non-listening socket. It should fail. */
 	error = accept(clt_sk[0], &accept_loop.sa, &addrlen);
 	if ((-1 != error) && (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "accept on non-listening socket "
+		tst_brkm(TBROK, NULL, "accept on non-listening socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept on non-listening socket");
@@ -143,7 +143,7 @@
 	error = connect(listen_sk, (struct sockaddr *)&clt_loop[0],
 			sizeof(clt_loop[0]));
 	if ((-1 != error) && (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connect to non-listening socket "
+		tst_brkm(TBROK, NULL, "connect to non-listening socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect to non-listening socket");
@@ -159,7 +159,7 @@
 	 */
 	error = connect(clt2_sk, &svr_loop.sa, sizeof(svr_loop));
 	if ((-1 != error) && (ECONNREFUSED != errno))
-		tst_brkm(TBROK, tst_exit, "connect after max backlog "
+		tst_brkm(TBROK, NULL, "connect after max backlog "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect after max backlog");
@@ -171,7 +171,7 @@
 		poll_fd.revents = 0;
 		error = poll(&poll_fd, 1, -1);
 		if ((1 != error) && (1 != poll_fd.revents))
-			tst_brkm(TBROK, tst_exit, "Unexpected return value "
+			tst_brkm(TBROK, NULL, "Unexpected return value "
 				 "with poll, error:%d errno:%d, revents:%d",
 				 error, errno, poll_fd.revents);
 
@@ -185,7 +185,7 @@
 	/* Try to do a connect on an established socket. It should fail. */
 	error = connect(accept_sk[0], &clt_loop[0].sa, sizeof(clt_loop[0]));
 	if ((-1 != error) || (EISCONN != errno))
-		tst_brkm(TBROK, tst_exit, "connect on an established socket "
+		tst_brkm(TBROK, NULL, "connect on an established socket "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect on an established socket");
@@ -193,12 +193,12 @@
 	/* Try to do accept on an established socket. It should fail. */
 	error = accept(accept_sk[0], &accept_loop.sa, &addrlen);
 	if ((-1 != error) && (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "accept on an established socket "
+		tst_brkm(TBROK, NULL, "accept on an established socket "
 			 "error:%d errno:%d", error, errno);
 
 	error = accept(clt_sk[0], &accept_loop.sa, &addrlen);
 	if ((-1 != error) && (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "accept on an established socket "
+		tst_brkm(TBROK, NULL, "accept on an established socket "
 			 "failure: error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept on an established socket");
@@ -226,7 +226,7 @@
 	/* Sending a message on a listening socket should fail. */
 	error = send(listen_sk, message, strlen(message), MSG_NOSIGNAL);
 	if ((-1 != error) || (EPIPE != errno))
-		tst_brkm(TBROK, tst_exit, "send on a listening socket "
+		tst_brkm(TBROK, NULL, "send on a listening socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "send on a listening socket");
@@ -234,7 +234,7 @@
 	/* Trying to receive a message on a listening socket should fail. */
 	error = recv(listen_sk, msgbuf, 100, 0);
 	if ((-1 != error) || (ENOTCONN != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a listening socket "
+		tst_brkm(TBROK, NULL, "recv on a listening socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "recv on a listening socket");
@@ -254,7 +254,7 @@
 	 */
 	error = recv(accept_sk[0], msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN received socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN received socket "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "recv on a SHUTDOWN received socket");
@@ -285,7 +285,7 @@
 	/* No more messages and the association is SHUTDOWN, should fail. */
 	error = recv(clt_sk[0], msgbuf, 100, 0);
 	if ((-1 != error) || (ENOTCONN != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN sent socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN sent socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "recv on a SHUTDOWN sent socket");
@@ -297,7 +297,7 @@
 
 	error = recv(clt_sk[1], msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Sending a message on SHUT_RD socket. */
@@ -312,7 +312,7 @@
 	/* We should not receive the message as the socket is SHUT_RD */ 
 	error = recv(clt_sk[1], msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "recv on a SHUT_RD socket");
@@ -322,12 +322,12 @@
 
 	error = recv(accept_sk[2], msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RDWR socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RDWR socket "
 			 "error:%d, errno:%d", error, errno);
 
 	error = recv(clt_sk[2], msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RDWR socket "
+		tst_brkm(TBROK, NULL, "recv on a SHUT_RDWR socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "recv on a SHUT_RDWR socket");
@@ -354,7 +354,7 @@
 
 	error = select(listen_sk + 1, &set, NULL, NULL, NULL);
 	if (1 != error)
-		tst_brkm(TBROK, tst_exit, "select error:%d, "
+		tst_brkm(TBROK, NULL, "select error:%d, "
 			 "errno: %d", error, errno);
 
 	/* Now accept the CLOSED association waiting on the listening 
@@ -370,7 +370,7 @@
 	 */
 	error = recv(accept2_sk, msgbuf, 100, 0);
 	if ((0 != error) || (0 != errno))
-		tst_brkm(TBROK, tst_exit, "Unexpected error return on "
+		tst_brkm(TBROK, NULL, "Unexpected error return on "
 			 "recv(error:%d, errno:%d)", error, errno);
 
 	tst_resm(TPASS, "accept of a CLOSED association");
@@ -380,7 +380,7 @@
 	 */
 	error = send(accept2_sk, message, strlen(message), MSG_NOSIGNAL);
 	if ((-1 != error) || (EPIPE != errno))
-		tst_brkm(TBROK, tst_exit, "send to a CLOSED association "
+		tst_brkm(TBROK, NULL, "send to a CLOSED association "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "send to a CLOSED association");
@@ -426,7 +426,7 @@
 	sinfo->sinfo_flags |= SCTP_EOF;
 	error = sendmsg(clt2_sk, &outmessage, 0);
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "sendmsg with SCTP_EOF flag "
+		tst_brkm(TBROK, NULL, "sendmsg with SCTP_EOF flag "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with SCTP_EOF flag");
@@ -437,7 +437,7 @@
 	sinfo->sinfo_flags |= SCTP_ABORT;
 	error = sendmsg(clt2_sk, &outmessage, 0);
 	if ((-1 != error) || (EINVAL != errno))
-		tst_brkm(TBROK, tst_exit, "sendmsg with SCTP_ABORT flag "
+		tst_brkm(TBROK, NULL, "sendmsg with SCTP_ABORT flag "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with SCTP_ABORT flag");
diff --git a/testcases/network/sctp/func_tests/test_timetolive.c b/testcases/network/sctp/func_tests/test_timetolive.c
index 45ec5cd..c1974ff 100644
--- a/testcases/network/sctp/func_tests/test_timetolive.c
+++ b/testcases/network/sctp/func_tests/test_timetolive.c
@@ -151,7 +151,7 @@
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &orig_len,
 			   &len);
 	if (error)
-		tst_brkm(TBROK, tst_exit, "can't get rcvbuf size: %s",
+		tst_brkm(TBROK, NULL, "can't get rcvbuf size: %s",
 			strerror(errno));
 	/* Set the MAXSEG to something smallish. */
 	{
@@ -183,7 +183,7 @@
 	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &len,
 			   sizeof(len));
 	if (error)
-		tst_brkm(TBROK, tst_exit, "setsockopt(SO_RCVBUF): %s",
+		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			 strerror(errno));
 
        /* Mark sk2 as being able to accept new associations.  */
@@ -244,7 +244,7 @@
 			   sizeof(orig_len));
 
 	if (error)
-		tst_brkm(TBROK, tst_exit, "setsockopt(SO_RCVBUF): %s",
+		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			strerror(errno));
 
         /* Get the first data message which was sent.  */
@@ -260,7 +260,7 @@
 	error = getsockopt(sk1, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 	
 	if (error)
-		tst_brkm(TBROK, tst_exit, "can't get rwnd size: %s",
+		tst_brkm(TBROK, NULL, "can't get rwnd size: %s",
 			strerror(errno));
 	tst_resm(TINFO, "Creating fillmsg of size %d",
 		 gstatus.sstat_rwnd+RWND_SLOP);
@@ -348,7 +348,7 @@
 	test_check_msg_data(&inmessage, error, strlen(nottlmsg) + 1,
 			    MSG_EOR, stream, ppid);
 	if (0 != strncmp(iov.iov_base, nottlmsg, strlen(nottlmsg)+1))
-		tst_brkm(TBROK, tst_exit, "Received Wrong Message !!!");
+		tst_brkm(TBROK, NULL, "Received Wrong Message !!!");
 
 	tst_resm(TPASS, "Receive message with no timeout");
 
@@ -363,7 +363,7 @@
 				    SCTP_SEND_FAILED, 0);
 	ssf = (struct sctp_send_failed *)iov.iov_base;
 	if (0 != strncmp(ttlmsg, (char *)ssf->ssf_data, strlen(ttlmsg) + 1))
-		tst_brkm(TBROK, tst_exit, "SEND_FAILED data mismatch");
+		tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 
 	tst_resm(TPASS, "Receive SEND_FAILED for message with timeout");
 
@@ -381,7 +381,7 @@
 		ssf = (struct sctp_send_failed *)iov.iov_base;
 		if (0 != strncmp(&ttlfrag[offset], (char *)ssf->ssf_data,
 				 SMALL_MAXSEG))
-			tst_brkm(TBROK, tst_exit, "SEND_FAILED data mismatch");
+			tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 		offset += SMALL_MAXSEG;
 	} while (!(ssf->ssf_info.sinfo_flags & 0x01)); /* LAST_FRAG */
 
@@ -401,5 +401,5 @@
         close(sk2);
 
         /* Indicate successful completion.  */
-        return 0;
+      tst_exit();
 }
diff --git a/testcases/network/sctp/testlib/sctputil.c b/testcases/network/sctp/testlib/sctputil.c
index 4ed6068..8e5f832 100644
--- a/testcases/network/sctp/testlib/sctputil.c
+++ b/testcases/network/sctp/testlib/sctputil.c
@@ -183,27 +183,26 @@
 	union sctp_notification *sn;
 	
 	if (!(msg_flags & MSG_NOTIFICATION))
-		tst_brkm(TBROK, tst_exit, "Got a datamsg, expecting "
-			 "notification");
-	
+		tst_brkm(TBROK, NULL, "Got a datamsg, expecting notification");
+
 	if (expected_datalen <= 0)
 		return;
 
 	if (datalen != expected_datalen)
-		tst_brkm(TBROK, tst_exit, "Got a notification of unexpected "
-			 "length:%d, expected length:%d", datalen,
+		tst_brkm(TBROK, NULL, "Got a notification of unexpected "
+			 "length (%d); expected length was %d", datalen,
 			 expected_datalen);
 		
 	sn = (union sctp_notification *)buf;
 	if (sn->sn_header.sn_type != expected_sn_type)
-		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
+		tst_brkm(TBROK, NULL, "Unexpected notification:%d "
 			 "expected:%d", sn->sn_header.sn_type,
 			  expected_sn_type);
 	
 	switch(sn->sn_header.sn_type) {
 	case SCTP_ASSOC_CHANGE:
 		if (sn->sn_assoc_change.sac_state != expected_additional)
-			tst_brkm(TBROK, tst_exit, "Unexpected sac_state:%d "
+			tst_brkm(TBROK, NULL, "Unexpected sac_state:%d "
 				 "expected:%d", sn->sn_assoc_change.sac_state,
 				  expected_additional);
 		break;
@@ -235,34 +234,34 @@
 		    uint32_t expected_ppid)
 {
 	if (msg_flags & MSG_NOTIFICATION)
-		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
+		tst_brkm(TBROK, NULL, "Got a notification, expecting a"
 			 "datamsg");
 
 	if (expected_datalen <= 0)
 		return;
 
 	if (datalen != expected_datalen)
-		tst_brkm(TBROK, tst_exit, "Got a datamsg of unexpected "
+		tst_brkm(TBROK, NULL, "Got a datamsg of unexpected "
 			 "length:%d, expected length:%d", datalen,
 			 expected_datalen);
 
 	if ((msg_flags & ~0x80000000) != expected_msg_flags)
-		tst_brkm(TBROK, tst_exit, "Unexpected msg_flags:0x%x "
+		tst_brkm(TBROK, NULL, "Unexpected msg_flags:0x%x "
 			 "expecting:0x%x", msg_flags, expected_msg_flags);
 
 	if ((0 == expected_stream) && (0 == expected_ppid))
 		return; 
 
 	if (!sinfo)
-		tst_brkm(TBROK, tst_exit, "Null sinfo, but expected "
+		tst_brkm(TBROK, NULL, "Null sinfo, but expected "
 			 "stream:%d expected ppid:%d", expected_stream,
 			 expected_ppid);
 
 	if (sinfo->sinfo_stream != expected_stream)
-		tst_brkm(TBROK, tst_exit, "stream mismatch: expected:%x "
+		tst_brkm(TBROK, NULL, "stream mismatch: expected:%x "
 			 "got:%x", expected_stream, sinfo->sinfo_stream);
 	if (sinfo->sinfo_ppid != expected_ppid)
-		tst_brkm(TBROK, tst_exit, "ppid mismatch: expected:%x "
+		tst_brkm(TBROK, NULL, "ppid mismatch: expected:%x "
 			 "got:%x\n", expected_ppid, sinfo->sinfo_ppid);
 }
 
@@ -310,7 +309,7 @@
 
 	msg_buf = (char *)malloc(len);
 	if (!msg_buf)
-		tst_brkm(TBROK, tst_exit, "malloc failed");
+		tst_brkm(TBROK, NULL, "malloc failed");
 
 	p = msg_buf;
 
@@ -354,7 +353,7 @@
 		return memcmp(&addr1->v4.sin_addr, &addr2->v4.sin_addr,
 			      sizeof(addr1->v4.sin_addr));
 	default:
-		tst_brkm(TBROK, tst_exit, "invalid address type %d",
+		tst_brkm(TBROK, NULL, "invalid address type %d",
 			 addr1->sa.sa_family);
 		return -1;
 	}
@@ -373,12 +372,12 @@
 
 	error = sctp_getpaddrs(sk, asoc, &addrs);
 	if (-1 == error) {
-		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s", strerror(errno));
 		return error;
 	}
 	if (error != count) {
 		sctp_freepaddrs(addrs);
-		tst_brkm(TBROK, tst_exit, "peer count %d mismatch, expected %d",
+		tst_brkm(TBROK, NULL, "peer count %d mismatch, expected %d",
 			 error, count);
 	}
 	addrbuf = addrs;
@@ -396,7 +395,7 @@
 		default:
 			errno = EINVAL;
 			sctp_freepaddrs(addrs);
-			tst_brkm(TBROK, tst_exit, "sctp_getpaddrs: %s", strerror(errno));
+			tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s", strerror(errno));
 			return -1;
 		}
 		for (j = 0; j < count; j++) {
@@ -408,7 +407,7 @@
 	}
 	for (j = 0; j < count; j++) {
 		if (found[j] == 0) {
-			tst_brkm(TBROK, tst_exit, "peer address %d not found", j);
+			tst_brkm(TBROK, NULL, "peer address %d not found", j);
 		}
 	}
 	sctp_freepaddrs(addrs);
diff --git a/testcases/network/sctp/testlib/sctputil.h b/testcases/network/sctp/testlib/sctputil.h
index 940b606..487dbe9 100644
--- a/testcases/network/sctp/testlib/sctputil.h
+++ b/testcases/network/sctp/testlib/sctputil.h
@@ -134,7 +134,7 @@
 {
 	int sk = socket(domain, type, protocol);
         if (-1 == sk)
-                tst_brkm(TBROK, tst_exit, "socket: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "socket: %s", strerror(errno));
 	return sk;
 }
 
@@ -146,7 +146,7 @@
 	setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &true_const, sizeof(int));
 	error = bind(sk, addr, addrlen);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "bind: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "bind: %s", strerror(errno));
 	return error;
 }
 
@@ -154,7 +154,7 @@
 {
 	int error = sctp_bindx(sk, addr, count, SCTP_BINDX_ADD_ADDR);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "bindx (add): %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "bindx (add): %s", strerror(errno));
 	return error;
 }
 
@@ -162,7 +162,7 @@
 {
 	int error = listen(sk, backlog);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "listen: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "listen: %s", strerror(errno));
 	return error;
 }
 
@@ -170,7 +170,7 @@
 {
 	int error = connect(sk, addr, addrlen);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "connect: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "connect: %s", strerror(errno));
 	return error;
 }
 
@@ -178,7 +178,7 @@
 {
 	int error = sctp_connectx(sk, addr, count);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "connectx: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "connectx: %s", strerror(errno));
 	return error;
 }
 
@@ -186,7 +186,7 @@
 {
 	int error = accept(sk, addr, addrlen);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "accept: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "accept: %s", strerror(errno));
 	return error;
 }
 
@@ -194,7 +194,7 @@
 {
 	int error = send(sk, msg, len, flags);
         if (len != error)
-                tst_brkm(TBROK, tst_exit, "send: error:%d errno:%d",
+                tst_brkm(TBROK, NULL, "send: error:%d errno:%d",
 			 error, errno);
 	return error;
 }
@@ -204,7 +204,7 @@
 {
 	int error = sendto(sk, msg, len, flags, to, tolen);
         if (len != error)
-                tst_brkm(TBROK, tst_exit, "sendto: error:%d errno:%d",
+                tst_brkm(TBROK, NULL, "sendto: error:%d errno:%d",
 			 error, errno);
 	return error;
 }
@@ -214,7 +214,7 @@
 {
 	int error = sendmsg(sk, msg, flags);
         if (msglen != error)
-                tst_brkm(TBROK, tst_exit, "sendmsg: error:%d errno:%d",
+                tst_brkm(TBROK, NULL, "sendmsg: error:%d errno:%d",
 			 error, errno);
 	return error;
 }
@@ -223,7 +223,7 @@
 {
 	int error = recv(sk, buf, len, flags);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "recv: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "recv: %s", strerror(errno));
 	return error;
 }
 
@@ -231,7 +231,7 @@
 {
 	int error = recvmsg(sk, msg, flags);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "recvmsg: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "recvmsg: %s", strerror(errno));
 	return error;
 }
 
@@ -239,7 +239,7 @@
 {
 	int error = shutdown(sk, how);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "shutdown: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "shutdown: %s", strerror(errno));
 	return error;
 }
 
@@ -248,7 +248,7 @@
 {
 	int error = getsockopt(sk, SOL_SCTP, optname, optval, optlen);
 	if (error)
-		tst_brkm(TBROK, tst_exit, "getsockopt(%d): %s", optname,
+		tst_brkm(TBROK, NULL, "getsockopt(%d): %s", optname,
 			 strerror(errno));
 	return error;
 }
@@ -258,7 +258,7 @@
 {
 	int error = setsockopt(sk, SOL_SCTP, optname, optval, optlen);
 	if (error)
-		tst_brkm(TBROK, tst_exit, "setsockopt(%d): %s", optname,
+		tst_brkm(TBROK, NULL, "setsockopt(%d): %s", optname,
 			 strerror(errno));
 	return error;
 }
@@ -267,7 +267,7 @@
 {
 	int error = sctp_peeloff(sk, assoc_id);
         if (-1 == error)
-                tst_brkm(TBROK, tst_exit, "sctp_peeloff: %s", strerror(errno));
+                tst_brkm(TBROK, NULL, "sctp_peeloff: %s", strerror(errno));
 	return error;
 }
 
@@ -280,7 +280,7 @@
 	int error = sctp_sendmsg(s, msg, len, to, tolen, ppid, flags, stream_no,
 	  		         timetolive, context);
 	if (len != error)
-		tst_brkm(TBROK, tst_exit, "sctp_sendmsg: error:%d errno:%d",
+		tst_brkm(TBROK, NULL, "sctp_sendmsg: error:%d errno:%d",
 			 error, errno);
 	return error;			
 }
@@ -291,7 +291,7 @@
 {
 	int error = sctp_send(s, msg, len, sinfo, flags);
 	if (len != error)
-		tst_brkm(TBROK, tst_exit, "sctp_send: error:%d errno:%d",
+		tst_brkm(TBROK, NULL, "sctp_send: error:%d errno:%d",
 			 error, errno);
 	return error;			
 }
@@ -303,7 +303,7 @@
 {
 	int error = sctp_recvmsg(sk, msg, len, from, fromlen, sinfo, msg_flags);
 	if (-1 == error)
-		tst_brkm(TBROK, tst_exit, "sctp_recvmsg: %s", strerror(errno));
+		tst_brkm(TBROK, NULL, "sctp_recvmsg: %s", strerror(errno));
 	return error;			
 }
 
@@ -311,7 +311,7 @@
 {
 	void *buf = malloc(size);
         if (NULL == buf)
-                tst_brkm(TBROK, tst_exit, "malloc failed");
+                tst_brkm(TBROK, NULL, "malloc failed");
 	return buf;
 }
 
diff --git a/testcases/network/sockets/ltpServer.c b/testcases/network/sockets/ltpServer.c
index 800e1d4..6ab2e86 100644
--- a/testcases/network/sockets/ltpServer.c
+++ b/testcases/network/sockets/ltpServer.c
@@ -347,7 +347,7 @@
     }
     
     /* end of line + end of buffer => return line */
-    if ( bytes_received == count -1) { 
+    if (bytes_received == count -1) { 
       /* set last byte to END_LINE */
       *(return_buffer + offset)= END_LINE;
       bytes_received = 0;
diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong6.c b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
index 38bcf07..bd74cb2 100644
--- a/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+++ b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
@@ -235,7 +235,7 @@
 		i = sendto( s, outpack, cc, 0, &whereto, sizeof(whereto) );
 
 		if (i < 0 || i != cc)  {
-			if (i<0 )  perror("sendto");
+			if (i < 0)  perror("sendto");
 			printf("pingpong6: wrote %s %d chars, ret=%d\n",hostname,cc,i);
 			fflush(stdout);
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
index c068651..b29df65 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
@@ -66,7 +66,12 @@
 	act.sa_handler=handler;
 	act.sa_flags=0;
 
+<<<<<<< HEAD
+	if ((sigemptyset(&set) != 0) ||
+	    (sigemptyset(&act.sa_mask) != 0)) {
+=======
 	if (sigemptyset(&set) != 0 || sigemptyset(&act.sa_mask) != 0) {
+>>>>>>> master
 		perror("sigemptyset() was not successful\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
index bf3bda7..95f1661 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
@@ -66,7 +66,12 @@
 	act.sa_handler=handler;
 	act.sa_flags=0;
 
+<<<<<<< HEAD
+	if ((sigemptyset(&set) != 0) ||
+	    (sigemptyset(&act.sa_mask) != 0)) {
+=======
 	if (sigemptyset(&set) != 0 || sigemptyset(&act.sa_mask) != 0) {
+>>>>>>> master
 		perror("sigemptyset() was not successful\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
index c2e0e0f..34fce2a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
@@ -187,8 +187,13 @@
 	{
 		/* Check the struct was copied */
 
+<<<<<<< HEAD
+		if ((mystruct.one != 1) || (mystruct.two != 2) ||
+		    (mystruct.three != 3) || (mystruct.four != (void *) 4))
+=======
 		if ((mystruct.one != 1) || (mystruct.two != 2) || (mystruct.three != 3) || (mystruct.four != (void *) 4))
 >>>>>>> f4b7b4f00f2c5def7898c62f58d09b454eabd2ca
+>>>>>>> master
 		{
 			FAILED("The struct data was not copied to the child process");
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
index d8cadde..1832f6a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
@@ -101,6 +101,7 @@
 	}
 
 	if (*(pid_t *) arg != getpid())
+>>>>>>> origin
 	{
 		FAILED("The thread is executing in the child process");
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
index 50a23a9..f7b89a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
@@ -121,6 +121,8 @@
 
 		ret = system("gencat "MESSCAT_OUT" "MESSCAT_IN);
 
+	if (messcat == -1)
+	{
 		if (ret != 0)
 			output("Could not find the source file for message catalog.\n" \
 			        "You may need to execute gencat yourself.\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
index 3b02039..98525a0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
@@ -173,6 +173,7 @@
 			}
 		}
 		while ((child_tms.tms_utime + child_tms.tms_stime) <= 0);
+>>>>>>> origin
 
 		/* We're done */
 		exit(PTS_PASS);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
index 1f76599..9fa49a2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
@@ -62,7 +62,11 @@
 
 	result = munlockall();
 	
+<<<<<<< HEAD
+	if ((result == 0 && memlock > 0) || (result == -1 && memlock <= 0)) {
+=======
 	if ((result == 0 && memlock > 0) || (result == -1 && memlock <= 0)){
+>>>>>>> master
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
index 7e4e8df..f61b250 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
@@ -53,7 +53,12 @@
 			slepts = slepts-1;
 		}
 
+<<<<<<< HEAD
+		if ((slepts >= 1) ||
+		    (sleptns > sleepnsec[i])) {
+=======
 		if (slepts >= 1 || sleptns > sleepnsec[i]) {
+>>>>>>> master
 			printf("PASS slept %ds %dns >= %d\n", 
 				slepts, sleptns, sleepnsec[i]);
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-2.c
index 326b623..4321052 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-2.c
@@ -326,8 +326,7 @@
 	do
 	{
 		do_it = 0;
-	}
-	while (do_it);
+	} while (do_it);
 
 
 	if ((ret = pthread_join(th_sig1, NULL)))
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
index ef51661..d34c7ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
@@ -50,7 +50,7 @@
 
 	/* Empty set of signal mask and blocked signals */
 	if ((sigemptyset(&main_sigmask) != 0) || 
-		(sigemptyset(&main_pendingset) != 0))
+	    (sigemptyset(&main_pendingset) != 0))
 	{
 		perror("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
index c52c24a..7eaaaa4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
@@ -195,8 +195,9 @@
 			}
 
 			/* Now check that ts_pre <= ts_th <= ts_post */
-			if ((ts_th.tv_sec < ts_pre.tv_sec)
-			        || ((ts_th.tv_sec == ts_pre.tv_sec) && (ts_th.tv_nsec < ts_pre.tv_nsec)))
+			if ((ts_th.tv_sec < ts_pre.tv_sec) ||
+			    ((ts_th.tv_sec == ts_pre.tv_sec) &&
+			     (ts_th.tv_nsec < ts_pre.tv_nsec)))
 			{
 				output("Pre  : %d.%09d\n", ts_pre.tv_sec, ts_pre.tv_nsec);
 				output("child: %d.%09d\n", ts_th.tv_sec, ts_th.tv_nsec);
@@ -204,8 +205,9 @@
 				FAILED("Child returned before its creation ???");
 			}
 
-			if ((ts_post.tv_sec < ts_th.tv_sec)
-			        || ((ts_post.tv_sec == ts_th.tv_sec) && (ts_post.tv_nsec < ts_th.tv_nsec)))
+			if ((ts_post.tv_sec < ts_th.tv_sec) ||
+			    ((ts_post.tv_sec == ts_th.tv_sec) &&
+			     (ts_post.tv_nsec < ts_th.tv_nsec)))
 			{
 				output("Pre  : %d.%09d\n", ts_pre.tv_sec, ts_pre.tv_nsec);
 				output("child: %d.%09d\n", ts_th.tv_sec, ts_th.tv_nsec);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
index 1349cef..d28b2aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
@@ -157,7 +157,7 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-
+	
 	if (sem_post(&semsig1))
 	{
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
@@ -359,7 +359,6 @@
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-
 	if ((ret = pthread_join(th_work, NULL)))
 	{
 		UNRESOLVED(ret, "Worker thread join failed");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/threads_scenarii.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/threads_scenarii.c
index 7ebc016..5945021 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/threads_scenarii.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/threads_scenarii.c
@@ -220,10 +220,15 @@
 			}
 
 			if (scenarii[ i ].schedparam == 1)
+				sp.sched_priority = sched_get_priority_max( old );
+
+			if (scenarii[ i ].schedparam == -1)
+				sp.sched_priority = sched_get_priority_min( old );
 				sp.sched_priority = sched_get_priority_max(old);
 
 			if (scenarii[ i ].schedparam == -1)
 				sp.sched_priority = sched_get_priority_min(old);
+>>>>>>> origin
 
 			ret = pthread_attr_setschedparam(&scenarii[ i ].ta, &sp);
 
@@ -284,7 +289,11 @@
 #endif
 
 		/* Stack related attributes */
+<<<<<<< HEAD
+		if ((tss > 0) && (tsa > 0))     /* This routine is dependent on the Thread Stack Address Attribute and Thread Stack Size Attribute options */
+=======
 		if (tss > 0 && tsa > 0)     /* This routine is dependent on the Thread Stack Address Attribute and Thread Stack Size Attribute options */
+>>>>>>> master
 		{
 
 			if (scenarii[i].altstack != 0)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
index 2e1f022..e42f8c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
@@ -121,7 +121,7 @@
 	{
 #ifdef WITH_SYNCHRO
 
-		if ((ret = sem_wait(thearg->sem)))
+		if (( ret = sem_wait( thearg->sem ) ))
 		{
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
index 9acf143..6133e40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
@@ -213,7 +213,11 @@
 			j %= 2 * NSIG;
 
 			if (j >= NSIG)
+<<<<<<< HEAD
+				ret = sigdelset(&set, signals[j - NSIG]);
+=======
 				ret = sigdelset(&set, signals[j-NSIG]);
+>>>>>>> master
 			else
 				ret = sigaddset(&set, signals[j]);
 
@@ -256,14 +260,14 @@
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
+	if ((ret = sigaction(SIGUSR1, &sa, NULL)))
 	{
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
+	if ((ret = sigaction(SIGUSR2, &sa, NULL)))
 	{
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
index 6ef4535..cdf3d67 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
@@ -114,4 +114,3 @@
 
 	return PTS_PASS;
 }
-
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
index 4764fe4..2ca55e5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
@@ -82,7 +82,7 @@
 	
 	thread_state = GET_SPIN_LOCK;
 	/* Wait 10 seconds for SIGALRM to be sent */
-	while(cnt++ < 10)
+	while (cnt++ < 10)
 	{
 		ts.tv_sec = 1;
 		ts.tv_nsec = 0;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
index e5ddd8d..5c1d29a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
@@ -62,7 +62,12 @@
 		return PTS_FAIL;
 	}
 
+<<<<<<< HEAD
+	if ((INHANDLER == globalStatus) ||
+	    (BEFOREHANDLER == globalStatus)) {
+=======
 	if (INHANDLER == globalStatus || BEFOREHANDLER == globalStatus) {
+>>>>>>> master
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/4-1.c
index 949b8cb..9529f47 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/4-1.c
@@ -31,16 +31,28 @@
 	/* Create a child process which exit immediately */
 	child_pid = fork();
 	if (child_pid == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling fork()");
+	  return PTS_UNRESOLVED;
+	} else if (child_pid == 0) {
+	  exit(0);
+=======
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
 	} else if (child_pid == 0) {
 		exit(0);
+>>>>>>> master
 	}
 
 	/* Wait for the child process to exit */
 	if (wait(&stat_loc) == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling wait()");
+	  return PTS_UNRESOLVED;
+=======
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
+>>>>>>> master
 	}
 	
 	/* Assume the pid is not yet reatributed to an other process */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c
index dca20f5..8194292 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c
@@ -30,16 +30,28 @@
 	/* Create a child process which exit immediately */
 	child_pid = fork();
 	if (child_pid == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling fork()");
+	  return PTS_UNRESOLVED;
+	} else if (child_pid == 0) {
+	  exit(0);
+=======
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
 	} else if (child_pid == 0) {
 		exit(0);
+>>>>>>> master
 	}
 
 	/* Wait for the child process to exit */
 	if (wait(&stat_loc) == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling wait()");
+	  return PTS_UNRESOLVED;
+=======
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
+>>>>>>> master
 	}
 
 	/* Assume the pid is not yet reatributed to an other process */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c
index 3f74650..67db14d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c
@@ -31,16 +31,28 @@
 	/* Create a child process which exit immediately */
 	child_pid = fork();
 	if (child_pid == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling fork()");
+	  return PTS_UNRESOLVED;
+	} else if (child_pid == 0) {
+	  exit(0);
+=======
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
 	} else if (child_pid == 0) {
 		exit(0);
+>>>>>>> master
 	}
 
 	/* Wait for the child process to exit */
 	if (wait(&stat_loc) == -1) {
+<<<<<<< HEAD
+	  perror("An error occurs when calling wait()");
+	  return PTS_UNRESOLVED;
+=======
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
+>>>>>>> master
 	}
 	
 	/* Assume the pid is not yet reatributed to an other process */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
index 076e2a1..47353b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
@@ -188,7 +188,11 @@
 	while (scanf("*%i*",&child_count) == 0) 
 		sched_yield();
 
+<<<<<<< HEAD
+	for (i=0; i<nb_child-1; i++) {
+=======
 	for (i = 0; i < (nb_child-1); i++) {
+>>>>>>> master
 		if (kill(child_pid[i], SIGKILL) != 0) {
 			perror("An error occurs when calling kill()");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
index b6a398d..d7d9d89 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
@@ -92,7 +92,11 @@
 	int i;
 	struct sched_param param;
 
+<<<<<<< HEAD
+	if (id == nb_child-1) {
+=======
 	if (id == (nb_child-1)) {
+>>>>>>> master
 		param.sched_priority = sched_get_priority_min(SCHED_RR);
 		sched_setparam(getpid(), &param);
 	}
@@ -191,7 +195,11 @@
 	while (scanf("*%i*",&child_count) == 0) 
 		sched_yield();
 
+<<<<<<< HEAD
+	for (i=0; i<nb_child-1; i++) {
+=======
 	for (i = 0; i < (nb_child-1); i++) {
+>>>>>>> master
 		if (kill(child_pid[i], SIGKILL) != 0) {
 			perror("An error occurs when calling kill()");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
index b858f4f..606b10e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
@@ -48,7 +48,11 @@
 		perror("An error occurs when calling sched_getparam()");
 		return PTS_UNRESOLVED;
 	}
+<<<<<<< HEAD
+
+=======
 	
+>>>>>>> master
 	if (param.sched_priority == old_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
index 69df2b8..c22359c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
@@ -38,7 +38,11 @@
 		perror("An error occurs when calling sched_getparam()");
 		return PTS_UNRESOLVED;
 	}
+<<<<<<< HEAD
+	
+=======
 
+>>>>>>> master
 	if (param.sched_priority == old_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
index 4cdbccf..ce76089 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
@@ -158,11 +158,19 @@
 		return PTS_UNRESOLVED;
 	}
 
+<<<<<<< HEAD
+	for (i = 0; i < (nb_cpu - 1); i++) {
+		child_pid[i] = fork();
+		if (child_pid[i] == -1) {
+			perror("An error occurs when calling fork()");
+			for (j = 0; j < i; j++) {
+=======
 	for (i=0; i<nb_cpu-1; i++) {
 		child_pid[i] = fork();
 		if (child_pid[i] == -1) {
 			perror("An error occurs when calling fork()");
 			for (j=0; j<i; j++) {
+>>>>>>> master
 				kill(child_pid[j], SIGTERM);		
 			}
 			return PTS_UNRESOLVED;
@@ -178,7 +186,11 @@
 	child_pid[i] = fork();
 	if (child_pid[i] == -1) {
 		perror("An error occurs when calling fork()");
+<<<<<<< HEAD
+		for (j = 0; j < i; j++) {
+=======
 		for (j=0; j<i; j++) {
+>>>>>>> master
 			kill(child_pid[j], SIGTERM);		
 		}
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
index e7864d8..7897fca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
@@ -67,7 +67,11 @@
 		
 		if (tmp == -1 || errno != 0) {
 			if (errno == EPERM) {
+<<<<<<< HEAD
+				printf("  The process do not have permission to change its own scheduler\n  Try to run this test as root.\n");
+=======
 				printf("  The process does not have permission to change its own scheduler\n  Try to run this test as root.\n");
+>>>>>>> master
 			} else {
 				printf("  Error calling sched_setscheduler() for %s policy\n", tst->name);
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
index 8069fa2..668be40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
@@ -114,10 +114,13 @@
 	}
 
 	/* Use the semaphore to change its value. */
-	do
-	{
+	do {
 		ret = sem_wait(sem);
+<<<<<<< HEAD
+	} while ((ret != 0) && (errno == EINTR));
+=======
 	} while (ret != 0 && errno == EINTR);
+>>>>>>> master
 
 	if (ret != 0)
 	{
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
index 514eb4d..6d49f2a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
@@ -55,15 +55,16 @@
         return PTS_UNRESOLVED;
    }
 
-   if ((pthread_join(prod, NULL) == 0) && (pthread_join(cons, NULL) == 0)) {
+   if (pthread_join(prod, NULL) == 0 && pthread_join(cons, NULL) == 0) {
 	puts("TEST PASS");
 	pthread_exit(NULL);
-   	if ((sem_destroy(&psem) == 0) &&(sem_destroy (&csem)) == 0)
+   	if ((sem_destroy(&psem) == 0) && sem_destroy (&csem) == 0) {
 		return PTS_PASS;
    	} else {
 		puts("TEST FAILED");
 	   	return PTS_FAIL;
    	}
+   }
 }        
 
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
index 0786532..9ab0df3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
@@ -159,11 +159,14 @@
 	}
 
 	/* Wait the sempahore */
-	do
-	{
+	do {
 		ret = sem_wait(sem);
+<<<<<<< HEAD
+	} while ((ret != 0) && (errno == EINTR));
+=======
 	}
 	while (ret != 0 && errno == EINTR);
+>>>>>>> master
 
 	if (ret != 0)
 	{
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
index 946ce0c..a63abcc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
@@ -50,20 +50,20 @@
 			ts[i].tv_sec=time(NULL) + INVALIDTIMEOUT;
 		        ts[i].tv_nsec=0;
 		}
-	/* Lock Semaphore */
+		/* Lock Semaphore */
 		sts[i] = sem_timedwait(&mysemp[i], &ts[i]);
         	if (sts[i] == -1) {
 			perror(ERROR_PREFIX "sem_timedwait");
 			return PTS_UNRESOLVED; 
 		}
 
-	/* Value of Semaphore */
+		/* Value of Semaphore */
 		if (sem_getvalue(&mysemp[i], &val[i]) == -1) {
 			perror(ERROR_PREFIX "sem_getvalue");
 			return PTS_UNRESOLVED;
 		}
 
-	/* Checking if the value of the Semaphore decremented by one */
+		/* Checking if the value of the Semaphore decremented by one */
 		if ((val[i] == 0) && (sts[i] == 0)) {
 			puts("TEST PASSED");
 			sem_destroy(&mysemp[i]);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
index edb574c..f7e549e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
@@ -45,7 +45,7 @@
 
 	sts = sem_timedwait(&mysemp, &ts);
 
-	if ((errno == EINVAL) && (sts == -1)) {
+	if (errno == EINVAL && sts == -1) {
 		puts("TEST PASSED");
 		sem_destroy(&mysemp);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
index e327ce0..45e2c40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
@@ -166,7 +166,8 @@
 		UNRESOLVED(errno, "Unable to read clock");
 	}
 
-	if (((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000000) + (ts_fin.tv_nsec - ts_ref.tv_nsec) < 1000000000)
+	if (((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000000) +
+	    (ts_fin.tv_nsec - ts_ref.tv_nsec) < 1000000000)
 	{
 		output("Ts: %d.%9.9d  ->  %d.%9.9d\n", ts_ref.tv_sec, ts_ref.tv_nsec, ts_fin.tv_sec, ts_fin.tv_nsec);
 		FAILED("The sem_wait call did not block");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
index 67fa856..7a7b8ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
@@ -56,8 +56,13 @@
 		exit(-1);
 	}
 
+<<<<<<< HEAD
+	if ((sigismember(&pendingset, SIGALRM) == 1) &&
+	    (sigismember(&pendingset, SIGCONT) == 1)) {
+=======
 	if (sigismember(&pendingset, SIGALRM) == 1 &&
 	    sigismember(&pendingset, SIGCONT) == 1) {
+>>>>>>> master
 		printf("All pending signals found\n");
 		if ((sigismember(&pendingset, SIGHUP) == 0) &&
 			(sigismember(&pendingset, SIGABRT) == 0) &&
@@ -94,7 +99,7 @@
 	}
 
         if ((sigaddset(&blockset, SIGALRM) == -1) ||
-                (sigaddset(&blockset, SIGHUP) == -1)) {
+            (sigaddset(&blockset, SIGHUP) == -1)) {
                 perror("Error calling sigaddset()\n");
                 return PTS_UNRESOLVED;
         }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
index 668d2f9..8dd5242 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
@@ -28,7 +28,7 @@
 	/* Empty set of blocked signals */
 
 	if ((sigemptyset(&newmask) == -1) ||
-	        (sigemptyset(&pendingset) == -1))
+	    (sigemptyset(&pendingset) == -1))
 	{
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
index 28d107b..bfc8574 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
@@ -35,7 +35,7 @@
 	/* Empty set of blocked signals */
 
 	if ((sigemptyset(&newmask) == -1) ||
-	        (sigemptyset(&pendingset) == -1))
+	    (sigemptyset(&pendingset) == -1))
 	{
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
index d9a366a..8132254 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
@@ -32,7 +32,7 @@
 
 	/* Empty set of blocked signals */
 	if ((sigemptyset(&newmask) == -1) || 
-		(sigemptyset(&pendingset) == -1))
+	    (sigemptyset(&pendingset) == -1))
 	{
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
index 2789648..5941c53 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
@@ -172,7 +172,7 @@
 		FAILED("Unexpected number of threads awaken");
 	}
 
-	if (!pthread_equal(last_awaken, ch[ 0 ]))
+	if (!pthread_equal(last_awaken, ch[0]))
 	{
 		FAILED("The awaken thread is not the signal target one.");
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
index 9be12b9..d944212 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
@@ -28,7 +28,12 @@
 	int sig;
 
 	/* Empty set of blocked signals */
+<<<<<<< HEAD
+	if ((sigemptyset(&newmask) == -1) || 
+	    (sigemptyset(&pendingset) == -1))
+=======
 	if (sigemptyset(&newmask) == -1 || sigemptyset(&pendingset) == -1)
+>>>>>>> master
 	{
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
index 37a8bf9..31506ac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
@@ -40,7 +40,12 @@
 		return PTS_UNRESOLVED;
 	}
 
+<<<<<<< HEAD
+	if ((0 == its.it_value.tv_sec) &&
+	    (0 == its.it_value.tv_nsec)) {
+=======
 	if (0 == its.it_value.tv_sec && 0 == its.it_value.tv_nsec) {
+>>>>>>> master
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
index 7d07198..edc5917 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
@@ -61,7 +61,12 @@
 	}
 
 
+<<<<<<< HEAD
+	if ((0 == itsget.it_value.tv_sec) &&
+	    (0 == itsget.it_value.tv_nsec)) {
+=======
 	if (0 == itsget.it_value.tv_sec && 0 == itsget.it_value.tv_nsec) {
+>>>>>>> master
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
diff --git a/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c b/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
index de7f63a..a4bee2e 100644
--- a/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
+++ b/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
@@ -87,7 +87,7 @@
 			}
 		}
 		exit(ret_code);
-		/* NOTREACHED */
+		
 		break;
 	}
 
diff --git a/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c b/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
index da2ce2f..994b5d1 100644
--- a/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
+++ b/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
@@ -61,15 +61,15 @@
 			}
 
 #ifdef DEBUG
-		printf("Delta:  %ds %dns\n", secdelta, nsecdelta);
+			printf("Delta:  %ds %dns\n", secdelta, nsecdelta);
 #endif
                 	if ((secdelta > ACCEPTABLESECDELTA) || 
-					(secdelta < 0)) {
+			    (secdelta < 0)) {
                         	printf("clock does not appear to be set\n");
 				failure = 1;
                 	}
                 	if ((nsecdelta > ACCEPTABLENSECDELTA) || 
-					(nsecdelta < 0)) {
+			    (nsecdelta < 0)) {
                         	printf("clock does not appear to be set\n");
 				failure = 1;
                 	}
diff --git a/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c b/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
index 37d983c..8544a08 100644
--- a/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
+++ b/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
@@ -77,7 +77,7 @@
 		delta = (tpget.tv_sec-LONGTIME) - TESTTIME;
 	
 		if ((delta <= ACCEPTABLEDELTA-DELTA) ||
-				(delta <= ACCEPTABLEDELTA+DELTA)) {
+		    (delta <= ACCEPTABLEDELTA+DELTA)) {
 			pass = 1;
 		}
 
diff --git a/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c b/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
index 38523ab..9801286 100644
--- a/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
+++ b/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
@@ -52,12 +52,12 @@
 	act2.sa_flags=0;
 
 	if ((sigemptyset(&act1.sa_mask) != 0) ||
-       		(sigemptyset(&act2.sa_mask) != 0))	{
+       	    (sigemptyset(&act2.sa_mask) != 0)) {
 		perror("sigemptyset() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 	if ((sigaction(SIGABRT, &act1, 0) != 0) ||
-       		(sigaction(SIGALRM, &act2, 0) != 0))	{
+       	    (sigaction(SIGALRM, &act2, 0) != 0)) {
 		perror("sigaction() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
@@ -67,7 +67,7 @@
 	ev2.sigev_notify = SIGEV_SIGNAL;
 	ev2.sigev_signo = SIGALRM;
 	if ((timer_create(CLOCK_REALTIME, &ev1, &tid1) != 0) ||
-		(timer_create(CLOCK_REALTIME, &ev2, &tid2) != 0)) {
+	    (timer_create(CLOCK_REALTIME, &ev2, &tid2) != 0)) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
index ed6406f..8bf70c1 100755
--- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
+++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
@@ -121,7 +121,7 @@
 	fi
 
 	cat >> "$makefile.2" <<EOF
-INSTALL_TARGETS+=	${prereq_cache}
+INSTALL_TARGETS+=	${tests}
 MAKE_TARGETS+=		${make_target_prereq_cache}
 
 EOF
diff --git a/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c b/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
index 1ed7c00..b5a4f23 100644
--- a/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
@@ -196,38 +196,41 @@
 
 		if (pr[nprocesses] == -1)
 		{
-			if ((errno == EAGAIN) || (errno == ENOMEM))
-			{
+			if ((errno == EAGAIN) || (errno == ENOMEM)) {
 				break;
-			}
-			else
-			{
+			} else {
 				output("Fork returned the unexpected error %d\n", errno);
 				/* Post the semaphore so running processes will terminate */
 
-				do
-				{
+				do {
 					ret = sem_post(sem_ending);
-				}
+				} while (( ret != 0 ) && ( errno == EINTR ));
+
+				if (ret != 0)
+					output( "Failed to post the semaphore on termination: error %d\n", errno );
+=======
 				while ((ret != 0) && (errno == EINTR));
 
 				if (ret != 0)
 					output("Failed to post the semaphore on termination: error %d\n", errno);
+>>>>>>> origin
 
 				FAILED("Failed to fork and received an unexpected error");
 			}
 		}
 
+<<<<<<< HEAD
+		if (pr[nprocesses] == 0) {
+=======
 		if (pr[nprocesses] == 0)
 		{
+>>>>>>> master
 			/* Child */
 			/* Post the synchro semaphore*/
 
-			do
-			{
+			do {
 				ret = sem_post(sem_synchro);
-			}
-			while ((ret != 0) && (errno == EINTR));
+			} while ((ret != 0) && (errno == EINTR));
 
 			if (ret != 0)
 			{
@@ -236,11 +239,9 @@
 			}
 
 			/* Wait the end semaphore */
-			do
-			{
+			do {
 				ret = sem_wait(sem_ending);
-			}
-			while ((ret != 0) && (errno == EINTR));
+			} while ((ret != 0) && (errno == EINTR));
 
 			if (ret != 0)
 			{
@@ -251,8 +252,7 @@
 			do
 			{
 				ret = sem_post(sem_ending);
-			}
-			while ((ret != 0) && (errno == EINTR));
+			} while ((ret != 0) && (errno == EINTR));
 
 			if (ret != 0)
 			{
@@ -283,11 +283,9 @@
 		}
 
 		/* wait for the semaphore */
-		do
-		{
+		do {
 			ret = sem_wait(sem_synchro);
-		}
-		while ((ret == -1) && (errno == EINTR));
+		} while ((ret == -1) && (errno == EINTR));
 
 		if (ret == -1)
 		{
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
index 2de81bf..4473844 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
@@ -111,20 +111,18 @@
 	sa.sa_flags = 0;
 	sa.sa_handler = floodsighdl;
 
-	if ((ret = sigaction (SIGABRT, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGABRT, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGBUS, &sa, NULL)))
+	if ((ret = sigaction(SIGBUS, &sa, NULL)))
 	{
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
 	/* Wait for the other threads to terminate */
 
-	do
-	{
+	do {
 		sched_yield();
 	} while (*(int *) arg);
 
@@ -193,7 +191,11 @@
 	/* wait until termination */
 	do {
 		sched_yield();
+<<<<<<< HEAD
+	} while (*(int *) arg);
+=======
 	} while (*( int * ) arg);
+>>>>>>> master
 
 	return NULL;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
index 4ed0540..27cf66d 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
@@ -84,7 +84,11 @@
 
 
 /* Thread function */
+<<<<<<< HEAD
+void* threaded(void *arg)
+=======
 void* threaded(void * arg)
+>>>>>>> master
 {
 	int ret = 0;
 
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c b/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
index c179554..c5bb775 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
@@ -204,22 +204,21 @@
 				output("sem_init failed with error %d (%s)\n", errno, strerror(errno));
 #endif
 				/* Check error code */
-
-				if ((errno == EMFILE) || (errno == ENFILE) || (errno == ENOSPC) || (errno == ENOMEM))
-				{
+				switch (errno) {
+				case EMFILE:
+				case ENFILE:
+				case ENOSPC:
+				case ENOMEM:
 					status = 2;
-				}
-				else
-				{
+					break;
+				default:
 					UNRESOLVED(errno, "Unexpected error!");
-				}
 
 				break;
 			}
 
 			if ((SEM_MAX > 0) && (nsem > SEM_MAX))
 			{
-				/* Erreur */
 				FAILED("sem_open opened more than SEM_NSEMS_MAX semaphores");
 			}
 
@@ -759,8 +758,9 @@
 	{
 		/* Compare r1 to other values, with some ponderations */
 
-		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) || (r1_o > 1.3 * r4_o)
-		        || (r1_c > 1.1 * r2_c) || (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
+		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) ||
+		    (r1_o > 1.3 * r4_o) || (r1_c > 1.1 * r2_c) ||
+		    (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
 			ret++;
 
 #if VERBOSE > 1
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
index 0d5a1f4..1bc4909 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
@@ -206,12 +206,14 @@
 #endif
 				/* Check error code */
 
-				if ((errno == EMFILE) || (errno == ENFILE) || (errno == ENOSPC) || (errno == ENOMEM))
-				{
+				switch (errno) {
+				case EMFILE:
+				case ENFILE:
+				case ENOSPC:
+				case ENOMEM:
 					status = 2;
-				}
-				else
-				{
+					break;
+				default:
 					UNRESOLVED(errno, "Unexpected error!");
 				}
 
@@ -767,8 +769,9 @@
 	{
 		/* Compare r1 to other values, with some ponderations */
 
-		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) || (r1_o > 1.3 * r4_o)
-		        || (r1_c > 1.1 * r2_c) || (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
+		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) ||
+		    (r1_o > 1.3 * r4_o) || (r1_c > 1.1 * r2_c) ||
+		    (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
 			ret++;
 
 #if VERBOSE > 1
diff --git a/tools/apicmds/ltpapicmd.c b/tools/apicmds/ltpapicmd.c
index 78284a9..9c66ba3 100644
--- a/tools/apicmds/ltpapicmd.c
+++ b/tools/apicmds/ltpapicmd.c
@@ -236,25 +236,6 @@
         tst_res(trestype, file_name, arg_fmt);
     }
     else
-    if (strcmp((char *)cmd_name, "tst_brkloop") == 0)
-    {
-        if (argc < 5)
-        {
-            fprintf(stderr, "Usage: %s TTYPE FNAME FUNC STRING\n"
-            "\tTTYPE  - Test Result Type; one of TFAIL, TBROK, TCONF, "
-            "and TRETR.\n"
-            "\tFNAME  - Print contents of this file after the message\n"
-            "\tFUNC   - Cleanup function (ignored), but MUST be provided\n"
-            "\tSTRING - Message explaining the test result\n", cmd_name);
-            exit (-1);
-        }
-        trestype = ident_ttype(argv++[0]);
-        file_name = argv++[0];
-        argv++;
-        strcpy(arg_fmt, *argv);
-        tst_brkloop(trestype, file_name, cleanup, arg_fmt);
-    }
-    else
     if (strcmp((char *)cmd_name, "tst_brkm") == 0)
     {
         if (argc < 4)
@@ -287,23 +268,6 @@
         tst_resm(trestype, arg_fmt);
     }
     else
-    if (strcmp((char *)cmd_name, "tst_brkloopm") == 0)
-    {
-        if (argc < 4)
-        {
-            fprintf(stderr, "Usage: %s TTYPE FUNC STRING\n"
-            "\tTTYPE  - Test Result Type; one of TFAIL, TBROK, TCONF, "
-            "and TRETR.\n"
-            "\tFUNC   - Cleanup function (ignored), but MUST be provided\n"
-            "\tSTRING - Message explaining the test result\n", cmd_name);
-            exit (-1);
-        }
-        trestype = ident_ttype(argv++[0]);
-        argv++;
-        strcpy(arg_fmt, *argv);
-        tst_brkloopm(trestype, cleanup, arg_fmt);
-    }
-    else
     if (strcmp((char *)cmd_name, "tst_exit") == 0)
         tst_exit();
     else