From owner-svn-src-all@FreeBSD.ORG Wed Mar 19 12:46:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0D57C8F; Wed, 19 Mar 2014 12:46:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CAA24C0; Wed, 19 Mar 2014 12:46:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2JCkBYi032847; Wed, 19 Mar 2014 12:46:11 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2JCk5JQ032802; Wed, 19 Mar 2014 12:46:05 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201403191246.s2JCk5JQ032802@svn.freebsd.org> From: Julio Merino Date: Wed, 19 Mar 2014 12:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263351 - in head: bin/pkill bin/pkill/tests etc/mtree tools/regression/usr.bin/pkill X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Mar 2014 12:46:12 -0000 Author: jmmv Date: Wed Mar 19 12:46:04 2014 New Revision: 263351 URL: http://svnweb.freebsd.org/changeset/base/263351 Log: Migrate tools/regression/usr.bin/pkill to the new tests layout. Interestingly, the pkill tool lives in bin, not usr.bin. Haven't bothered to check if this is because the tool moved or because the tests were originally added in the wrong place. Added: head/bin/pkill/tests/ - copied from r263227, head/tools/regression/usr.bin/pkill/ head/bin/pkill/tests/Makefile (contents, props changed) head/bin/pkill/tests/pgrep-F_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-F.t head/bin/pkill/tests/pgrep-LF_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-LF.t head/bin/pkill/tests/pgrep-P_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-P.t head/bin/pkill/tests/pgrep-U_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-U.t head/bin/pkill/tests/pgrep-_g_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-_g.t head/bin/pkill/tests/pgrep-_s_test.sh - copied unchanged from r263227, head/tools/regression/usr.bin/pkill/pgrep-_s.t head/bin/pkill/tests/pgrep-g_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-g.t head/bin/pkill/tests/pgrep-i_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-i.t head/bin/pkill/tests/pgrep-j_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-j.t head/bin/pkill/tests/pgrep-l_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-l.t head/bin/pkill/tests/pgrep-n_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-n.t head/bin/pkill/tests/pgrep-o_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-o.t head/bin/pkill/tests/pgrep-q_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-q.t head/bin/pkill/tests/pgrep-s_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-s.t head/bin/pkill/tests/pgrep-t_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-t.t head/bin/pkill/tests/pgrep-v_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-v.t head/bin/pkill/tests/pgrep-x_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pgrep-x.t head/bin/pkill/tests/pkill-F_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-F.t head/bin/pkill/tests/pkill-LF_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-LF.t head/bin/pkill/tests/pkill-P_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-P.t head/bin/pkill/tests/pkill-U_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-U.t head/bin/pkill/tests/pkill-_g_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-_g.t head/bin/pkill/tests/pkill-g_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-g.t head/bin/pkill/tests/pkill-i_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-i.t head/bin/pkill/tests/pkill-j_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-j.t head/bin/pkill/tests/pkill-s_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-s.t head/bin/pkill/tests/pkill-t_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-t.t head/bin/pkill/tests/pkill-x_test.sh - copied, changed from r263227, head/tools/regression/usr.bin/pkill/pkill-x.t Deleted: head/bin/pkill/tests/pgrep-F.t head/bin/pkill/tests/pgrep-LF.t head/bin/pkill/tests/pgrep-P.t head/bin/pkill/tests/pgrep-U.t head/bin/pkill/tests/pgrep-_g.t head/bin/pkill/tests/pgrep-_s.t head/bin/pkill/tests/pgrep-g.t head/bin/pkill/tests/pgrep-i.t head/bin/pkill/tests/pgrep-j.t head/bin/pkill/tests/pgrep-l.t head/bin/pkill/tests/pgrep-n.t head/bin/pkill/tests/pgrep-o.t head/bin/pkill/tests/pgrep-q.t head/bin/pkill/tests/pgrep-s.t head/bin/pkill/tests/pgrep-t.t head/bin/pkill/tests/pgrep-v.t head/bin/pkill/tests/pgrep-x.t head/bin/pkill/tests/pkill-F.t head/bin/pkill/tests/pkill-LF.t head/bin/pkill/tests/pkill-P.t head/bin/pkill/tests/pkill-U.t head/bin/pkill/tests/pkill-_g.t head/bin/pkill/tests/pkill-g.t head/bin/pkill/tests/pkill-i.t head/bin/pkill/tests/pkill-j.t head/bin/pkill/tests/pkill-s.t head/bin/pkill/tests/pkill-t.t head/bin/pkill/tests/pkill-x.t head/tools/regression/usr.bin/pkill/ Modified: head/bin/pkill/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/pkill/Makefile ============================================================================== --- head/bin/pkill/Makefile Wed Mar 19 12:45:40 2014 (r263350) +++ head/bin/pkill/Makefile Wed Mar 19 12:46:04 2014 (r263351) @@ -1,6 +1,8 @@ # $NetBSD: Makefile,v 1.1 2002/03/01 11:21:58 ad Exp $ # $FreeBSD$ +.include + PROG= pkill DPADD= ${LIBKVM} @@ -17,4 +19,8 @@ MLINKS= pkill.1 pgrep.1 SYMLINKS= ${BINDIR}/pkill /usr/bin/pkill SYMLINKS+= ${BINDIR}/pgrep /usr/bin/pgrep +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/pkill/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pkill/tests/Makefile Wed Mar 19 12:46:04 2014 (r263351) @@ -0,0 +1,38 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/bin/pkill + +TAP_TESTS_SH= pgrep-F_test +TAP_TESTS_SH+= pgrep-LF_test +TAP_TESTS_SH+= pgrep-P_test +TAP_TESTS_SH+= pgrep-U_test +TAP_TESTS_SH+= pgrep-_g_test +TAP_TESTS_SH+= pgrep-_s_test +TAP_TESTS_SH+= pgrep-g_test +TAP_TESTS_SH+= pgrep-i_test +TAP_TESTS_SH+= pgrep-j_test +TEST_METADATA.pgrep-j_test+= required_user="root" +TAP_TESTS_SH+= pgrep-l_test +TAP_TESTS_SH+= pgrep-n_test +TAP_TESTS_SH+= pgrep-o_test +TAP_TESTS_SH+= pgrep-q_test +TAP_TESTS_SH+= pgrep-s_test +TAP_TESTS_SH+= pgrep-t_test +TAP_TESTS_SH+= pgrep-v_test +TAP_TESTS_SH+= pgrep-x_test +TAP_TESTS_SH+= pkill-F_test +TAP_TESTS_SH+= pkill-LF_test +TAP_TESTS_SH+= pkill-P_test +TAP_TESTS_SH+= pkill-U_test +TAP_TESTS_SH+= pkill-_g_test +TAP_TESTS_SH+= pkill-g_test +TAP_TESTS_SH+= pkill-i_test +TAP_TESTS_SH+= pkill-j_test +TEST_METADATA.pkill-j_test+= required_user="root" +TAP_TESTS_SH+= pkill-s_test +TAP_TESTS_SH+= pkill-t_test +TAP_TESTS_SH+= pkill-x_test + +.include Copied and modified: head/bin/pkill/tests/pgrep-F_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-F.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-F.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-F_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..1" name="pgrep -F " -pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +pidfile=$(pwd)/pidfile.txt +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-LF_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-LF.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-LF.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-LF_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..2" name="pgrep -LF " -pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +pidfile=$(pwd)/pidfile.txt +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep daemon -p $pidfile $sleep 5 sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-P_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-P.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-P.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-P_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..1" name="pgrep -P " ppid=$$ -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-U_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-U.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-U.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-U_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pgrep -U " ruid=`id -ur` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -23,7 +23,7 @@ rm -f $sleep name="pgrep -U " ruid=`id -urn` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-_g_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-_g.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-_g.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-_g_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pgrep -G " rgid=`id -gr` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -23,7 +23,7 @@ rm -f $sleep name="pgrep -G " rgid=`id -grn` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied: head/bin/pkill/tests/pgrep-_s_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-_s.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pkill/tests/pgrep-_s_test.sh Wed Mar 19 12:46:04 2014 (r263351, copy of r263227, head/tools/regression/usr.bin/pkill/pgrep-_s.t) @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +base=`basename $0` + +echo "1..2" + +exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')" + +name="pgrep -S" +pid=`pgrep -Sx idle` +if [ "$pid" = "$exp_pid" ]; then + echo "ok 1 - $name" +else + echo "not ok 1 - $name" +fi +pid=`pgrep -x idle` +if [ "$pid" != "$exp_pid" ]; then + echo "ok 2 - $name" +else + echo "not ok 2 - $name" +fi Copied and modified: head/bin/pkill/tests/pgrep-g_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-g.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-g.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-g_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pgrep -g " pgrp=`ps -o tpgid -p $$ | tail -1` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -22,7 +22,7 @@ kill $chpid rm -f $sleep name="pgrep -g 0" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-i_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-i.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-i.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-i_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..1" name="pgrep -i" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt usleep="${sleep}XXX" touch $usleep lsleep="${sleep}xxx" Copied and modified: head/bin/pkill/tests/pgrep-j_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-j.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-j.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-j_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..3" name="pgrep -j " if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep jail / $base-1 127.0.0.1 $sleep 5 & chpid=$! @@ -31,7 +31,7 @@ fi name="pgrep -j any" if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep jail / $base-1 127.0.0.1 $sleep 5 & chpid=$! @@ -55,7 +55,7 @@ fi name="pgrep -j none" if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & chpid=$! Copied and modified: head/bin/pkill/tests/pgrep-l_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-l.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-l.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-l_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..1" name="pgrep -l" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-n_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-n.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-n.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-n_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..1" name="pgrep -n" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & oldpid=$! Copied and modified: head/bin/pkill/tests/pgrep-o_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-o.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-o.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-o_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..1" name="pgrep -o" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & oldpid=$! Copied and modified: head/bin/pkill/tests/pgrep-q_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-q.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-q.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-q_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..4" name="pgrep -q" -sleep0=`mktemp /tmp/$base.XXXXXX` || exit 1 -sleep1=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep0=$(pwd)/sleep0.txt +sleep1=$(pwd)/sleep1.txt ln -sf /bin/sleep $sleep0 $sleep0 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-s_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-s.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-s.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-s_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pgrep -s " sid=`ps -o tsid -p $$ | tail -1` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -22,7 +22,7 @@ kill $chpid rm -f $sleep name="pgrep -s 0" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-t_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-t.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-t.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-t_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..2" name="pgrep -t " -tty=`ps -o tty -p $$ | tail -1` -if [ "$tty" = "??" ]; then +tty=`ps -x -o tty -p $$ | tail -1` +if [ "$tty" = "??" -o "$tty" = "-" ]; then tty="-" ttyshort="-" else @@ -16,7 +16,7 @@ else *) ttyshort=`echo $tty | cut -c 4-` ;; esac fi -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-v_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-v.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-v.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-v_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..2" name="pgrep -v" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pgrep-x_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pgrep-x.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-x.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pgrep-x_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..4" name="pgrep -x" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-F_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-F.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-F.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-F_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..1" name="pkill -F " -pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +pidfile=$(pwd)/pidfile.txt +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-LF_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-LF.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-LF.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-LF_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..2" name="pkill -LF " -pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1 -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +pidfile=$(pwd)/pidfile.txt +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep daemon -p $pidfile $sleep 5 sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-P_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-P.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-P.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-P_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..1" name="pkill -P " ppid=$$ -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-U_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-U.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-U.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-U_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pkill -U " ruid=`id -ur` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -25,7 +25,7 @@ rm -f $sleep name="pkill -U " ruid=`id -urn` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-_g_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-_g.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-_g.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-_g_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pkill -G " rgid=`id -gr` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -25,7 +25,7 @@ rm -f $sleep name="pkill -G " rgid=`id -grn` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-g_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-g.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-g.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-g_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pkill -g " pgrp=`ps -o tpgid -p $$ | tail -1` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -24,7 +24,7 @@ esac rm -f $sleep name="pkill -g 0" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-i_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-i.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-i.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-i_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..1" name="pkill -i" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt usleep="${sleep}XXX" touch $usleep lsleep="${sleep}xxx" Copied and modified: head/bin/pkill/tests/pkill-j_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-j.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-j.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-j_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..3" name="pkill -j " if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep jail / $base-1 127.0.0.1 $sleep 5 & chpid=$! @@ -30,7 +30,7 @@ fi name="pkill -j any" if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep jail / $base-1 127.0.0.1 $sleep 5 & chpid=$! @@ -52,7 +52,7 @@ fi name="pkill -j none" if [ `id -u` -eq 0 ]; then - sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 + sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & chpid=$! Copied and modified: head/bin/pkill/tests/pkill-s_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-s.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-s.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-s_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -7,7 +7,7 @@ echo "1..2" name="pkill -s " sid=`ps -o tsid -p $$ | tail -1` -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -24,7 +24,7 @@ esac rm -f $sleep name="pkill -s 0" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-t_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-t.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-t.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-t_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,8 +6,8 @@ base=`basename $0` echo "1..2" name="pkill -t " -tty=`ps -o tty -p $$ | tail -1` -if [ "$tty" = "??" ]; then +tty=`ps -x -o tty -p $$ | tail -1` +if [ "$tty" = "??" -o "$tty" = "-" ]; then tty="-" ttyshort="-" else @@ -16,7 +16,7 @@ else *) ttyshort=`echo $tty | cut -c 4-` ;; esac fi -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Copied and modified: head/bin/pkill/tests/pkill-x_test.sh (from r263227, head/tools/regression/usr.bin/pkill/pkill-x.t) ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-x.t Sun Mar 16 08:04:06 2014 (r263227, copy source) +++ head/bin/pkill/tests/pkill-x_test.sh Wed Mar 19 12:46:04 2014 (r263351) @@ -6,7 +6,7 @@ base=`basename $0` echo "1..4" name="pkill -x" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 @@ -25,7 +25,7 @@ fi rm -f $sleep name="pkill -x -f" -sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 +sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep $sleep 5 & sleep 0.3 Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Mar 19 12:45:40 2014 (r263350) +++ head/etc/mtree/BSD.tests.dist Wed Mar 19 12:46:04 2014 (r263351) @@ -27,6 +27,8 @@ .. pax .. + pkill + .. sh builtins ..