Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.sbin Create temporary files in . rather than /tmp ...



details:   https://anonhg.NetBSD.org/src/rev/e4c0c1c7c3c5
branches:  trunk
changeset: 1022537:e4c0c1c7c3c5
user:      gson <gson%NetBSD.org@localhost>
date:      Sat Jul 24 15:56:05 2021 +0000

description:
Create temporary files in . rather than /tmp so that they get cleaned up
automatically by atf.

diffstat:

 tests/usr.sbin/execsnoop/t_execsnoop.sh |  8 ++------
 tests/usr.sbin/opensnoop/t_opensnoop.sh |  8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diffs (58 lines):

diff -r 77bdc7775f93 -r e4c0c1c7c3c5 tests/usr.sbin/execsnoop/t_execsnoop.sh
--- a/tests/usr.sbin/execsnoop/t_execsnoop.sh   Sat Jul 24 15:52:16 2021 +0000
+++ b/tests/usr.sbin/execsnoop/t_execsnoop.sh   Sat Jul 24 15:56:05 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.4 2021/07/18 06:24:58 dholland Exp $
+# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-tmp="/tmp/execsnoop"
+tmp="execsnoop.out"
 
 atf_test_case basic cleanup
 basic_head() {
@@ -60,10 +60,6 @@
 }
 
 basic_cleanup() {
-
-       if [ -f $tmp ]; then
-               rm $tmp
-       fi
 }
 
 atf_init_test_cases() {
diff -r 77bdc7775f93 -r e4c0c1c7c3c5 tests/usr.sbin/opensnoop/t_opensnoop.sh
--- a/tests/usr.sbin/opensnoop/t_opensnoop.sh   Sat Jul 24 15:52:16 2021 +0000
+++ b/tests/usr.sbin/opensnoop/t_opensnoop.sh   Sat Jul 24 15:56:05 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_opensnoop.sh,v 1.4 2020/07/11 09:55:26 jruoho Exp $
+# $NetBSD: t_opensnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-tmp="/tmp/opensnoop"
+tmp="opensnoop.out"
 
 atf_test_case basic cleanup
 basic_head() {
@@ -62,10 +62,6 @@
 }
 
 basic_cleanup() {
-
-       if [ -f $tmp ]; then
-               rm $tmp
-       fi
 }
 
 atf_init_test_cases() {



Home | Main Index | Thread Index | Old Index