Module Name: src Committed By: jmmv Date: Tue Nov 9 13:01:34 UTC 2010
Modified Files: src/tests/fs/tmpfs: t_create.sh Log Message: Remove ugly workaround to skip this if unprivileged-user=_atf and just use 'su -m' as pooka@ did in t_mkdir.sh. As he says this may still fail if root's shell is csh; we need a better solution. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/tmpfs/t_create.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/fs/tmpfs/t_create.sh diff -u src/tests/fs/tmpfs/t_create.sh:1.6 src/tests/fs/tmpfs/t_create.sh:1.7 --- src/tests/fs/tmpfs/t_create.sh:1.6 Sun Nov 7 17:51:18 2010 +++ src/tests/fs/tmpfs/t_create.sh Tue Nov 9 13:01:33 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_create.sh,v 1.6 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_create.sh,v 1.7 2010/11/09 13:01:33 jmmv Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -84,17 +84,12 @@ [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 100 ] || atf_fail "Incorrect group" - if [ ${user} = _atf ]; then - atf_expect_fail "We can't 'su ${user}' to run a test command" \ - "because it doesn't have a login shell" - fi - - atf_check -s eq:0 -o empty -e empty su ${user} -c 'touch b/a' + atf_check -s eq:0 -o empty -e empty su -m ${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" - atf_check -s eq:0 -o empty -e empty su ${user} -c 'touch c/a' + atf_check -s eq:0 -o empty -e empty su -m ${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"