Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Mar 2009 09:33:23 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189613 - head/tools/regression/usr.bin/pkill
Message-ID:  <200903100933.n2A9XNRj052701@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Tue Mar 10 09:33:22 2009
New Revision: 189613
URL: http://svn.freebsd.org/changeset/base/189613

Log:
  Rename files that collide on case-insensitive file systems by encoding
  colliding upper case letters as the lower case letter with a '_' in
  front.
  
  MFC after:	3 days
  Discussed with:	ed
  Spotted by:	Michael David Crawford <mdc at prgmr.com>

Added:
  head/tools/regression/usr.bin/pkill/pgrep-_g.t   (props changed)
     - copied unchanged from r189289, head/tools/regression/usr.bin/pkill/pgrep-G.t
  head/tools/regression/usr.bin/pkill/pgrep-_s.t   (props changed)
     - copied unchanged from r189289, head/tools/regression/usr.bin/pkill/pgrep-S.t
  head/tools/regression/usr.bin/pkill/pkill-_g.t   (props changed)
     - copied unchanged from r189289, head/tools/regression/usr.bin/pkill/pkill-G.t
Deleted:
  head/tools/regression/usr.bin/pkill/pgrep-G.t
  head/tools/regression/usr.bin/pkill/pgrep-S.t
  head/tools/regression/usr.bin/pkill/pkill-G.t

Copied: head/tools/regression/usr.bin/pkill/pgrep-_g.t (from r189289, head/tools/regression/usr.bin/pkill/pgrep-G.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/usr.bin/pkill/pgrep-_g.t	Tue Mar 10 09:33:22 2009	(r189613, copy of r189289, head/tools/regression/usr.bin/pkill/pgrep-G.t)
@@ -0,0 +1,38 @@
+#!/bin/sh
+# $FreeBSD$
+
+base=`basename $0`
+
+echo "1..2"
+
+name="pgrep -G <gid>"
+rgid=`id -gr`
+sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
+ln -sf /bin/sleep $sleep
+$sleep 5 &
+sleep 0.3
+chpid=$!
+pid=`pgrep -f -G $rgid $sleep`
+if [ "$pid" = "$chpid" ]; then
+	echo "ok 1 - $name"
+else
+	echo "not ok 1 - $name"
+fi
+kill $chpid
+rm -f $sleep
+
+name="pgrep -G <group>"
+rgid=`id -grn`
+sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
+ln -sf /bin/sleep $sleep
+$sleep 5 &
+sleep 0.3
+chpid=$!
+pid=`pgrep -f -G $rgid $sleep`
+if [ "$pid" = "$chpid" ]; then
+	echo "ok 2 - $name"
+else
+	echo "not ok 2 - $name"
+fi
+kill $chpid
+rm -f $sleep

Copied: head/tools/regression/usr.bin/pkill/pgrep-_s.t (from r189289, head/tools/regression/usr.bin/pkill/pgrep-S.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/usr.bin/pkill/pgrep-_s.t	Tue Mar 10 09:33:22 2009	(r189613, copy of r189289, head/tools/regression/usr.bin/pkill/pgrep-S.t)
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $FreeBSD$
+
+base=`basename $0`
+
+echo "1..2"
+
+name="pgrep -S"
+pid=`pgrep -Sx g_event`
+if [ "$pid" = "2" ]; then
+	echo "ok 1 - $name"
+else
+	echo "not ok 1 - $name"
+fi
+pid=`pgrep -x g_event`
+if [ "$pid" != "2" ]; then
+	echo "ok 2 - $name"
+else
+	echo "not ok 2 - $name"
+fi

Copied: head/tools/regression/usr.bin/pkill/pkill-_g.t (from r189289, head/tools/regression/usr.bin/pkill/pkill-G.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/usr.bin/pkill/pkill-_g.t	Tue Mar 10 09:33:22 2009	(r189613, copy of r189289, head/tools/regression/usr.bin/pkill/pkill-G.t)
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $FreeBSD$
+
+base=`basename $0`
+
+echo "1..2"
+
+name="pkill -G <gid>"
+rgid=`id -gr`
+sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
+ln -sf /bin/sleep $sleep
+$sleep 5 &
+sleep 0.3
+pkill -f -G $rgid $sleep
+ec=$?
+case $ec in
+0)
+	echo "ok 1 - $name"
+	;;
+*)
+	echo "not ok 1 - $name"
+	;;
+esac
+rm -f $sleep
+
+name="pkill -G <group>"
+rgid=`id -grn`
+sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
+ln -sf /bin/sleep $sleep
+$sleep 5 &
+sleep 0.3
+pkill -f -G $rgid $sleep
+ec=$?
+case $ec in
+0)
+	echo "ok 2 - $name"
+	;;
+*)
+	echo "not ok 2 - $name"
+	;;
+esac
+rm -f $sleep



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903100933.n2A9XNRj052701>