Voelker, Bernhard wrote: > $3 = {d_ino = 289015472, > d_off = 4096, > d_reclen = 24, > d_type = 0 '\0', > d_name = "s", '\0' <repears 254 times>}
Thanks. That confirms what I suspected: your system's readdir sets d_type for directories, but not for symlinks. What type of file system is that? I *could* try to make the test detect that and skip, but I'm inclined to let it continue to fail. This particular test is a little odd. It'd be best if there were a way to determine portably whether dirent.d_type is valid without using GNU ls to do it. If anyone can suggest a way, please let us know. At least this test does probably add a little test coverage. > BTW: why 600?!? >> mkdir d && ln -s . d/s && chmod 600 d That is to ensure that ls gets its type information about d/s without using stat-like system calls (i.e., via readdir's d_type member).