summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-01-12 01:04:51 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-01-12 01:04:51 +0000
commit1387c11f4ff6341bbcf323a39adb635e80d2d9f1 (patch)
tree1569c853c19610309dd8d65b79141f73ba10ca91
parent84ab6fed217b5af39e3ad89b6714507d0815b1b9 (diff)
Do not suppress error messages to stderr, but remove unnecessary
debug prints. This gives better hints why the tests are failing.
-rw-r--r--regress/sys/ffs/fstest.c13
-rw-r--r--regress/sys/ffs/run8
-rw-r--r--regress/sys/ffs/tests/chflags/12.t2
-rw-r--r--regress/sys/ffs/tests/chmod/09.t2
-rw-r--r--regress/sys/ffs/tests/chown/09.t2
-rw-r--r--regress/sys/ffs/tests/link/05.t4
-rw-r--r--regress/sys/ffs/tests/link/14.t2
-rw-r--r--regress/sys/ffs/tests/link/15.t4
-rw-r--r--regress/sys/ffs/tests/link/16.t2
-rw-r--r--regress/sys/ffs/tests/mkdir/09.t2
-rw-r--r--regress/sys/ffs/tests/mkdir/11.t4
-rw-r--r--regress/sys/ffs/tests/mkfifo/08.t2
-rw-r--r--regress/sys/ffs/tests/mkfifo/11.t4
-rw-r--r--regress/sys/ffs/tests/open/14.t2
-rw-r--r--regress/sys/ffs/tests/open/15.t2
-rw-r--r--regress/sys/ffs/tests/open/19.t4
-rw-r--r--regress/sys/ffs/tests/rename/15.t2
-rw-r--r--regress/sys/ffs/tests/rename/16.t2
-rw-r--r--regress/sys/ffs/tests/rmdir/13.t2
-rw-r--r--regress/sys/ffs/tests/rmdir/14.t2
-rw-r--r--regress/sys/ffs/tests/symlink/10.t2
-rw-r--r--regress/sys/ffs/tests/symlink/11.t4
-rw-r--r--regress/sys/ffs/tests/truncate/00.t2
-rw-r--r--regress/sys/ffs/tests/truncate/10.t2
-rw-r--r--regress/sys/ffs/tests/truncate/12.t2
-rw-r--r--regress/sys/ffs/tests/unlink/12.t2
26 files changed, 37 insertions, 44 deletions
diff --git a/regress/sys/ffs/fstest.c b/regress/sys/ffs/fstest.c
index 8b53ca9248b..bb2ffdcc89a 100644
--- a/regress/sys/ffs/fstest.c
+++ b/regress/sys/ffs/fstest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstest.c,v 1.4 2014/10/18 03:13:04 doug Exp $ */
+/* $OpenBSD: fstest.c,v 1.5 2017/01/12 01:04:50 bluhm Exp $ */
/*
* Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
@@ -405,11 +405,7 @@ call_syscall(struct syscall_desc *scall, char *argv[])
#undef STR
#undef NUM
if (rval < 0) {
- const char *serrno;
-
- serrno = err2str(errno);
- fprintf(stderr, "%s returned %d\n", scall->sd_name, rval);
- printf("%s\n", serrno);
+ printf("%s\n", err2str(errno));
exit(1);
}
printf("0\n");
@@ -496,12 +492,9 @@ main(int argc, char *argv[])
usage();
}
- if (gids != NULL) {
- fprintf(stderr, "changing groups to %s\n", gids);
+ if (gids != NULL)
set_gids(gids);
- }
if (uid != -1) {
- fprintf(stderr, "changing uid to %d\n", uid);
if (setuid(uid) < 0) {
fprintf(stderr, "cannot change uid: %s\n",
strerror(errno));
diff --git a/regress/sys/ffs/run b/regress/sys/ffs/run
index 6c770e96472..1e3d458bb0b 100644
--- a/regress/sys/ffs/run
+++ b/regress/sys/ffs/run
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: run,v 1.3 2017/01/11 00:03:38 bluhm Exp $
+# $OpenBSD: run,v 1.4 2017/01/12 01:04:50 bluhm Exp $
# Heavily inspired on FreeBSD's misc.sh.
totntest=0
@@ -18,8 +18,8 @@ expect()
e="${1}"
shift
echo -n "Running test #${ntest}... "
- r=`${FSTEST} $* 2>/dev/null | tail -1`
- echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1
+ r=`${FSTEST} $* | tail -1`
+ echo "${r}" | egrep -q '^'${e}'$'
if [ $? -eq 0 ]; then
echo "okay."
else
@@ -48,7 +48,7 @@ test_check()
# Generate a random file/directory name.
namegen()
{
- echo "fstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | md5`"
+ echo "fstest_`dd if=/dev/urandom bs=1k count=1 status=none | md5`"
}
for arg in $*; do
diff --git a/regress/sys/ffs/tests/chflags/12.t b/regress/sys/ffs/tests/chflags/12.t
index 7cb44c1af5a..f9b03594473 100644
--- a/regress/sys/ffs/tests/chflags/12.t
+++ b/regress/sys/ffs/tests/chflags/12.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/chmod/09.t b/regress/sys/ffs/tests/chmod/09.t
index dad80f74a02..f241c23be6c 100644
--- a/regress/sys/ffs/tests/chmod/09.t
+++ b/regress/sys/ffs/tests/chmod/09.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/chown/09.t b/regress/sys/ffs/tests/chown/09.t
index a5e13627ee2..58ae9c2ce6b 100644
--- a/regress/sys/ffs/tests/chown/09.t
+++ b/regress/sys/ffs/tests/chown/09.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/link/05.t b/regress/sys/ffs/tests/link/05.t
index 0273514d2f7..50f829c64e9 100644
--- a/regress/sys/ffs/tests/link/05.t
+++ b/regress/sys/ffs/tests/link/05.t
@@ -8,14 +8,14 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs -i 1 /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
i=1
while :; do
- link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
+ link ${n0}/${n1} ${n0}/${i}
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/link/14.t b/regress/sys/ffs/tests/link/14.t
index cf88728765b..9b76f3d9fb9 100644
--- a/regress/sys/ffs/tests/link/14.t
+++ b/regress/sys/ffs/tests/link/14.t
@@ -8,7 +8,7 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/link/15.t b/regress/sys/ffs/tests/link/15.t
index cdeb06eb3f9..c9f7fe78a4b 100644
--- a/regress/sys/ffs/tests/link/15.t
+++ b/regress/sys/ffs/tests/link/15.t
@@ -8,14 +8,14 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
i=0
while :; do
- link ${n0}/${n1} ${n0}/${i} >/dev/null 2>&1
+ link ${n0}/${n1} ${n0}/${i}
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/link/16.t b/regress/sys/ffs/tests/link/16.t
index c936fff1708..bd468f1bcb3 100644
--- a/regress/sys/ffs/tests/link/16.t
+++ b/regress/sys/ffs/tests/link/16.t
@@ -8,7 +8,7 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/mkdir/09.t b/regress/sys/ffs/tests/mkdir/09.t
index da4d8d6d0cd..6417f4beba6 100644
--- a/regress/sys/ffs/tests/mkdir/09.t
+++ b/regress/sys/ffs/tests/mkdir/09.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/mkdir/11.t b/regress/sys/ffs/tests/mkdir/11.t
index 633308e8aa0..8c7cb558727 100644
--- a/regress/sys/ffs/tests/mkdir/11.t
+++ b/regress/sys/ffs/tests/mkdir/11.t
@@ -7,13 +7,13 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
- mkdir ${n0}/${i} >/dev/null 2>&1
+ mkdir ${n0}/${i} 2>/dev/null
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/mkfifo/08.t b/regress/sys/ffs/tests/mkfifo/08.t
index a692b446145..76025d49ba7 100644
--- a/regress/sys/ffs/tests/mkfifo/08.t
+++ b/regress/sys/ffs/tests/mkfifo/08.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/mkfifo/11.t b/regress/sys/ffs/tests/mkfifo/11.t
index d6341bcf309..549ab0b9548 100644
--- a/regress/sys/ffs/tests/mkfifo/11.t
+++ b/regress/sys/ffs/tests/mkfifo/11.t
@@ -7,13 +7,13 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
- mkfifo ${n0}/${i} >/dev/null 2>&1
+ mkfifo ${n0}/${i} 2>/dev/null
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/open/14.t b/regress/sys/ffs/tests/open/14.t
index a43a04bbe75..81baf472c34 100644
--- a/regress/sys/ffs/tests/open/14.t
+++ b/regress/sys/ffs/tests/open/14.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/open/15.t b/regress/sys/ffs/tests/open/15.t
index a6fe19d21f1..daf839a6edb 100644
--- a/regress/sys/ffs/tests/open/15.t
+++ b/regress/sys/ffs/tests/open/15.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/open/19.t b/regress/sys/ffs/tests/open/19.t
index cbfa47caa4e..ff22eb05ed2 100644
--- a/regress/sys/ffs/tests/open/19.t
+++ b/regress/sys/ffs/tests/open/19.t
@@ -7,13 +7,13 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
- touch ${n0}/${i} >/dev/null 2>&1
+ touch ${n0}/${i} 2>/dev/null
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/rename/15.t b/regress/sys/ffs/tests/rename/15.t
index b72956f6cda..deeb6b4738a 100644
--- a/regress/sys/ffs/tests/rename/15.t
+++ b/regress/sys/ffs/tests/rename/15.t
@@ -8,7 +8,7 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/rename/16.t b/regress/sys/ffs/tests/rename/16.t
index b066287f0a0..93e1a9c8660 100644
--- a/regress/sys/ffs/tests/rename/16.t
+++ b/regress/sys/ffs/tests/rename/16.t
@@ -8,7 +8,7 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/rmdir/13.t b/regress/sys/ffs/tests/rmdir/13.t
index 57ef8068958..343b5b59094 100644
--- a/regress/sys/ffs/tests/rmdir/13.t
+++ b/regress/sys/ffs/tests/rmdir/13.t
@@ -6,7 +6,7 @@ desc="rmdir returns EBUSY if the directory to be removed is the mount point for
n0=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/rmdir/14.t b/regress/sys/ffs/tests/rmdir/14.t
index fe2a3088bed..5b3993b3f3f 100644
--- a/regress/sys/ffs/tests/rmdir/14.t
+++ b/regress/sys/ffs/tests/rmdir/14.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/symlink/10.t b/regress/sys/ffs/tests/symlink/10.t
index f59c7431c9d..c32de96dd25 100644
--- a/regress/sys/ffs/tests/symlink/10.t
+++ b/regress/sys/ffs/tests/symlink/10.t
@@ -8,7 +8,7 @@ n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/symlink/11.t b/regress/sys/ffs/tests/symlink/11.t
index 60df9dc02c9..c9b8f150e84 100644
--- a/regress/sys/ffs/tests/symlink/11.t
+++ b/regress/sys/ffs/tests/symlink/11.t
@@ -7,14 +7,14 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=256 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
- ln -s test ${n0}/${i} >/dev/null 2>&1
+ ln -s test ${n0}/${i} 2>/dev/null
if [ $? -ne 0 ]; then
break
fi
diff --git a/regress/sys/ffs/tests/truncate/00.t b/regress/sys/ffs/tests/truncate/00.t
index 295ec7b9158..8da4d0d5736 100644
--- a/regress/sys/ffs/tests/truncate/00.t
+++ b/regress/sys/ffs/tests/truncate/00.t
@@ -17,7 +17,7 @@ expect 0 truncate ${n0} 567
expect 567 lstat ${n0} size
expect 0 unlink ${n0}
-dd if=/dev/random of=${n0} bs=12345 count=1 >/dev/null 2>&1
+dd if=/dev/random of=${n0} bs=12345 count=1 status=none
expect 0 truncate ${n0} 23456
expect 23456 lstat ${n0} size
expect 0 truncate ${n0} 1
diff --git a/regress/sys/ffs/tests/truncate/10.t b/regress/sys/ffs/tests/truncate/10.t
index 72847ffe022..146023f60c6 100644
--- a/regress/sys/ffs/tests/truncate/10.t
+++ b/regress/sys/ffs/tests/truncate/10.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
diff --git a/regress/sys/ffs/tests/truncate/12.t b/regress/sys/ffs/tests/truncate/12.t
index c3786f1719d..90070c6feee 100644
--- a/regress/sys/ffs/tests/truncate/12.t
+++ b/regress/sys/ffs/tests/truncate/12.t
@@ -6,7 +6,7 @@ desc="truncate returns EFBIG or EINVAL if the length argument was greater than t
n0=`namegen`
expect 0 create ${n0} 0644
-r=`${FSTEST} truncate ${n0} 999999999999999 2>/dev/null`
+r=`${FSTEST} truncate ${n0} 999999999999999`
case "${r}" in
EFBIG|EINVAL)
expect 0 stat ${n0} size
diff --git a/regress/sys/ffs/tests/unlink/12.t b/regress/sys/ffs/tests/unlink/12.t
index 346ec597b28..7ce4d663154 100644
--- a/regress/sys/ffs/tests/unlink/12.t
+++ b/regress/sys/ffs/tests/unlink/12.t
@@ -7,7 +7,7 @@ n0=`namegen`
n1=`namegen`
expect 0 mkdir ${n0} 0755
-dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
+dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}