Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/tmpfs Use atf_check to su in a couple cases, to mak...
details: https://anonhg.NetBSD.org/src/rev/1f8e536cf759
branches: trunk
changeset: 755474:1f8e536cf759
user: riz <riz%NetBSD.org@localhost>
date: Mon Jun 07 03:39:41 2010 +0000
description:
Use atf_check to su in a couple cases, to make the test failure
easier to understand when the unprivileged user has /sbin/nologin
for a shell.
diffstat:
tests/fs/tmpfs/t_create.sh | 6 +++---
tests/fs/tmpfs/t_mkdir.sh | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r 6541a859568f -r 1f8e536cf759 tests/fs/tmpfs/t_create.sh
--- a/tests/fs/tmpfs/t_create.sh Mon Jun 07 01:56:51 2010 +0000
+++ b/tests/fs/tmpfs/t_create.sh Mon Jun 07 03:39:41 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_create.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_create.sh,v 1.5 2010/06/07 03:39:41 riz Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -86,12 +86,12 @@
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 100 ] || atf_fail "Incorrect group"
- su ${user} -c 'touch b/a'
+ atf_check -s eq:0 -o empty -e empty su ${user} -c 'touch b/a'
eval $(stat -s b/a)
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 0 ] || atf_fail "Incorrect group"
- su ${user} -c 'touch c/a'
+ atf_check -s eq:0 -o empty -e empty su ${user} -c 'touch c/a'
eval $(stat -s c/a)
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 100 ] || atf_fail "Incorrect group"
diff -r 6541a859568f -r 1f8e536cf759 tests/fs/tmpfs/t_mkdir.sh
--- a/tests/fs/tmpfs/t_mkdir.sh Mon Jun 07 01:56:51 2010 +0000
+++ b/tests/fs/tmpfs/t_mkdir.sh Mon Jun 07 03:39:41 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mkdir.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_mkdir.sh,v 1.5 2010/06/07 03:39:41 riz Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -115,12 +115,12 @@
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 100 ] || atf_fail "Incorrect group"
- su ${user} -c 'mkdir b/a'
+ atf_check -s eq:0 -o empty -e empty su ${user} -c 'mkdir b/a'
eval $(stat -s b/a)
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 0 ] || atf_fail "Incorrect group"
- su ${user} -c 'mkdir c/a'
+ atf_check -s eq:0 -o empty -e empty su ${user} -c 'mkdir c/a'
eval $(stat -s c/a)
[ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner"
[ ${st_gid} -eq 100 ] || atf_fail "Incorrect group"
Home |
Main Index |
Thread Index |
Old Index