[csw-maintainers] Testing for file existence
Maciej (Matchek) Blizinski
maciej at opencsw.org
Tue Feb 23 14:40:34 CET 2010
Here's something for Unix grey beards that I discovered when debugging
a failing unit test in Google protobuf (protocol buffers). Let's
consider the following set of commands:
cd /var/tmp
touch ${LOGNAME}-foo
test -e ${LOGNAME}-foo/ && echo yes || echo no
(note the trailing slash)
What is in your opinion the proper outcome?
Our buildfarm machines don't seem to agree on the issue. Here are the
poll results:
|| build8s: no || build8x: yes ||
|| build9s: no || build9x: yes ||
|| build10s: no || build10x: no ||
The script that generated this output:
http://paste.pocoo.org/show/181493/
What do you make of it? Is it a bug or a feature? If it's a bug, can
it be fixed on the OS side?
Maciej
More information about the maintainers
mailing list