xref: /freebsd/tools/test/stress2/tools/fail.sh (revision 535af610)
1#!/bin/sh
2
3#
4# SPDX-License-Identifier: BSD-2-Clause
5#
6# Copyright (c) 2020 Peter Holm <pho@FreeBSD.org>
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions
10# are met:
11# 1. Redistributions of source code must retain the above copyright
12#    notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright
14#    notice, this list of conditions and the following disclaimer in the
15#    documentation and/or other materials provided with the distribution.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27# SUCH DAMAGE.
28#
29
30# List tests returning a non zero exit code from today and yesterday.
31
32log=/tmp/stress2.d/fail
33out=/tmp/fail.sh.out
34[ -r $log ] || exit 1
35
36egrep "^(`date +%Y%m%d`|`date -v-1d +%Y%m%d`)" $log | while read l; do
37	name=`echo $l | sed 's/.* //'`
38	grep -q "^$name" $0 && continue
39	echo $name
40done | sort -u | while read f; do
41	grep $f $log | tail -1
42done | sort -n > $out
43if [ -s $out ]; then
44	echo
45	echo "Summary: Tests which failed within the last two days."
46	while read l; do
47		n=` echo $l | sed 's/.* //'`
48		c=`grep -c $n $log`
49		[ $c -eq 1 ] &&
50		    echo "$l (new)" || echo "$l"
51	done < $out
52fi
53rm -f $out
54exit 0
55
56# List of known failures:
57
58credleak.sh			20170321 Known lockd issue
59db.sh				20170323 ls stalls for more than 90 secs
60dev3.sh				20170323 pts memory leak
61gnop5.sh			20170905 mount: Invalid sectorsize 16384
62graid1_7.sh			20170430 FAIL Remove component gptid/02b9...
63graid1_8.sh			20170512 Known: do not run fsck
64mountu.sh			20170321 Known NFS problem
65nfs13.sh			20170323 tmpfs using options triggers this
66nfs15lockd.sh			20170330 unmount of /mnt failed: Device busy
67nfs15lockd3.sh			20170330 unmount of /mnt failed: Device busy
68nfssillyrename.sh		20170321 Known problem
69rename11.sh			20170329 Too many links seen with SU.
70swappedout.sh			20170321 Known to fail
71tmpfs18.sh			20170323 tmpfs -o issue
72tvnlru.sh			20170329 Known performance issue
73umountf2.sh			20170323 umount hangs
74vm_fault_dontneed.sh		20170321 Recognition of sequential access
75