Mon Jul 6 10:32:18 2020 UTC ()
Sleep more.


(jruoho)
diff -r1.1 -r1.2 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
diff -r1.1 -r1.2 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

cvs diff -r1.1 -r1.2 src/tests/usr.sbin/execsnoop/t_execsnoop.sh (expand / switch to unified diff)

--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh 2020/06/30 14:30:49 1.1
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh 2020/07/06 10:32:18 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_execsnoop.sh,v 1.1 2020/06/30 14:30:49 jruoho Exp $ 1# $NetBSD: t_execsnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
2# 2#
3# Copyright (c) 2020 The NetBSD Foundation, Inc. 3# Copyright (c) 2020 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Jukka Ruohonen. 7# by Jukka Ruohonen.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -37,27 +37,27 @@ basic_head() { @@ -37,27 +37,27 @@ basic_head() {
37} 37}
38 38
39basic_body() { 39basic_body() {
40 40
41 n=10 41 n=10
42 atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &" 42 atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &"
43 sleep 1 43 sleep 1
44 44
45 while [ $n -gt 0 ]; do 45 while [ $n -gt 0 ]; do
46 whoami 46 whoami
47 n=$(expr $n - 1) 47 n=$(expr $n - 1)
48 done 48 done
49 49
50 sleep 1 50 sleep 3
51 pkill -9 execsnoop 51 pkill -9 execsnoop
52 52
53 if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then 53 if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then
54 atf_fail "execsnoop does not work" 54 atf_fail "execsnoop does not work"
55 fi 55 fi
56 56
57 atf_pass 57 atf_pass
58} 58}
59 59
60basic_cleanup() { 60basic_cleanup() {
61 61
62 if [ -f $tmp ]; then 62 if [ -f $tmp ]; then
63 rm $tmp 63 rm $tmp

cvs diff -r1.1 -r1.2 src/tests/usr.sbin/opensnoop/t_opensnoop.sh (expand / switch to unified diff)

--- src/tests/usr.sbin/opensnoop/t_opensnoop.sh 2020/06/30 14:30:50 1.1
+++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh 2020/07/06 10:32:18 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_opensnoop.sh,v 1.1 2020/06/30 14:30:50 jruoho Exp $ 1# $NetBSD: t_opensnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
2# 2#
3# Copyright (c) 2020 The NetBSD Foundation, Inc. 3# Copyright (c) 2020 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Jukka Ruohonen. 7# by Jukka Ruohonen.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -37,27 +37,27 @@ basic_head() { @@ -37,27 +37,27 @@ basic_head() {
37} 37}
38 38
39basic_body() { 39basic_body() {
40 40
41 n=10 41 n=10
42 atf_check -s exit:0 -o ignore -e empty -x "opensnoop > $tmp &" 42 atf_check -s exit:0 -o ignore -e empty -x "opensnoop > $tmp &"
43 sleep 1 43 sleep 1
44 44
45 while [ $n -gt 0 ]; do 45 while [ $n -gt 0 ]; do
46 whoami 46 whoami
47 n=$(expr $n - 1) 47 n=$(expr $n - 1)
48 done 48 done
49 49
50 sleep 1 50 sleep 3
51 pkill -9 opensnoop 51 pkill -9 opensnoop
52 52
53 if [ ! $(cat $tmp | grep "/etc/spwd.db" | wc -l) -eq 10 ]; then 53 if [ ! $(cat $tmp | grep "/etc/spwd.db" | wc -l) -eq 10 ]; then
54 atf_fail "opensnoop does not work" 54 atf_fail "opensnoop does not work"
55 fi 55 fi
56 56
57 atf_pass 57 atf_pass
58} 58}
59 59
60basic_cleanup() { 60basic_cleanup() {
61 61
62 if [ -f $tmp ]; then 62 if [ -f $tmp ]; then
63 rm $tmp 63 rm $tmp