提交 3d4e8b49 编写于 作者: D dsamersoff

8002116: This JdbReadTwiceTest.sh gets an exit 1

Summary: Explicitly check readability of file in question
Reviewed-by: sla, dholmes, olagneau
上级 8bd7af79
......@@ -213,10 +213,17 @@ if [ ! -r c:/ ] ; then
# If the file exists, we try to read it. The
# read will fail.
mkFiles $HOME/jdb.ini
chmod a-r $HOME/jdb.ini
doit
failIfNot 1 "open: $HOME/jdb.ini"
clean
id > $HOME/jdb.ini
chmod a-r $HOME/jdb.ini
if grep -q "uid=" $HOME/jdb.ini ; then
echo "Unable to make file unreadable, so test will fail. chmod: $HOME/jdb.ini"
if grep -q "uid=0" $HOME/jdb.ini ; then
echo "The test is running as root. Fix infrastructure!"
fi
fi
doit
failIfNot 1 "open: $HOME/jdb.ini"
clean
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册