-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Less problems with dirEntries. #931
Conversation
Breaks on FreeBSD. |
What version is it? Passes for me on FreeBSD 8.3-RELEASE amd64. |
We only support FreeBSD 9.0 (which is what the auto tester is running). |
Incorrect. The auto-testers are running 8.1 and 8.2 (one is 32 and one is 64 bit -- I'd have to login to each to remember which is which). |
I seem to recall someone saying on a druntime pull request that they were running 9.0... I guess that's not the case then. But we have been taking some patches that are specific to FreeBSD 9.0, so how possible would it be to get the auto tester machines up to date with regards to this? |
|
PPT? Seriously? I don't think that that's been valid since 1945 ( http://www.timeanddate.com/worldclock/timezone.html?n=137&syear=1925 ). Not unless there's some timezone other than "America/Los_Angeles" that's been set erroneously. It sounds like a bug in FreeBSD to be honest, though I'd obviously have to investigate in detail to know for sure. It's just grabbing Does your local timezone have the acronym PPT? If it does, then it's probably a case of setting the TZ environment variable failing (either due to the time zone files being somewhere other than /usr/share/zoneinfo or because of a bug in the C code setting the timezone). If it doesn't, then the C code which sets tzname[1] is probably buggy. My guess would be the latter, because that was America/LosAngele's acronym during DST in 1945. |
It's a fresh FreeBSD setup (I installed it today just to run tests on phobos), and the local timezone is WET. |
Okay. When you say that you set the time zone, I assume that you mean that you set in on the box as opposed to messing around with the Regardless, I believe that the behavior is indicative of a bug in FreeBSD. All std.datetime is doing in that test is setting the |
Yup, I used sysinstall to set the timezone. [root@bsd90-64 ~]# date Fri Nov 9 10:28:48 WET 2012 [root@bsd90-64 ~]# env | grep TZ [root@bsd90-64 ~]# export TZ=America/Los_Angeles [root@bsd90-64 ~]# date Fri Nov 9 02:29:50 PST 2012 [root@bsd90-64 ~]# date 201207091400 Mon Jul 9 14:00:00 PDT 2012 Jul 9 14:00:00 bsd90-64 date: date set by root #include "stdio.h" #include "stdlib.h" #include "time.h" int main() { setenv("TZ", "America/Los_Angeles", 1); tzset(); printf("`%s' `%s'\n", tzname[0], tzname[1]); unsetenv("TZ"); return 0; } Result: `PST' `PPT' |
braddr: Could you please check which version exactly is installed on the FreeBSD_32 auto tester so that I can try to examine the problem? |
$ uname -a |
Return value determines whether the _statBuf structure contains | ||
correct data. | ||
+/ | ||
bool _doStat() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ensureStatDone
was quite a bit more descriptive. Why change it?
No. These changes are unacceptable. The simplest solution would simply be to add I'll throw together an |
Looking into the details further, I'd say that your changes to |
0ee90d8 solves a problem with code such as
dirEntries("somedir", SpanMode.whatever).filter!(de => de.isFile)()
, when broken symlinks are encountered. A broken symlink is simply neither a file nor a directory (but it is still a symlink), and no exception is thrown.0ac4055 solves an issue with recursive iteration - when a directory was encountered to which the current user had insufficient rights to list its contents, an exception was thrown. Now such a directory is simply omitted from the iteration.
Both changes are Posix-only. They don't break any contracts ensured by previously existing unit tests, although the semantics of
bool exists(in char[])
and possibly some other functions may need to be revised and defined more strictly for symlinks in the near future.bool isDir(in char[])
andbool isFile(in char[])
still assume that the symlinked object exists, and throw if it doesn't.