From owner-svn-src-all@FreeBSD.ORG Sun Mar 9 22:14:20 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 C59EB53B; Sun, 9 Mar 2014 22:14:20 +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 B2270C55; Sun, 9 Mar 2014 22:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s29MEKMN085159; Sun, 9 Mar 2014 22:14:20 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s29MEKPi085158; Sun, 9 Mar 2014 22:14:20 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201403092214.s29MEKPi085158@svn.freebsd.org> From: Julio Merino Date: Sun, 9 Mar 2014 22:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262961 - head/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: Sun, 09 Mar 2014 22:14:20 -0000 Author: jmmv Date: Sun Mar 9 22:14:20 2014 New Revision: 262961 URL: http://svnweb.freebsd.org/changeset/base/262961 Log: Fix pkill tests so that they run cleanly with prove. This fixes a pgrep test that assumed that PID 2 was named g_event. This does not seem to be the case any longer (and I don't know if it ever was in all possible setups). Change this test to use the idle loop instead and determine its expected PID using ps without assuming any specific ID. Modified: head/tools/regression/usr.bin/pkill/pgrep-_s.t Modified: head/tools/regression/usr.bin/pkill/pgrep-_s.t ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-_s.t Sun Mar 9 22:05:23 2014 (r262960) +++ head/tools/regression/usr.bin/pkill/pgrep-_s.t Sun Mar 9 22:14:20 2014 (r262961) @@ -5,15 +5,17 @@ base=`basename $0` echo "1..2" +exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')" + name="pgrep -S" -pid=`pgrep -Sx g_event` -if [ "$pid" = "2" ]; then +pid=`pgrep -Sx idle` +if [ "$pid" = "$exp_pid" ]; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi -pid=`pgrep -x g_event` -if [ "$pid" != "2" ]; then +pid=`pgrep -x idle` +if [ "$pid" != "$exp_pid" ]; then echo "ok 2 - $name" else echo "not ok 2 - $name"