Re: testsuite fun - [Fwd: opendir() on a file???]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-03-09 at 04:40 -0500, Jon Masters wrote:
=
> > Now I might be missing something, and I know I'm behind on LKML[0], but
> > the following isn't supposed to work in my book:
> > 
> > /*
> >  * Weird kernel test
> >  */
> > 
> > #include <sys/types.h>
> > #include <dirent.h>
> > #include <stdio.h>
> > 
> > int main(int argc, char **argv)
> > {
> >         DIR *dir;
> > 
> >         dir = opendir("foo.conf");
> > 
> >         if (dir)
> >                 printf("WTF?\n");
> > 
> >         return 0;
> > }
> > 
> > This is on an ext4 filesystem, whereas on a box with an older kernel
> > this test correctly does not print "WTF?". I know some filesystems
> > experiment with streams and treating files as directories, etc. but I
> > wasn't aware that anything particular had changed recently?

I was pointed to the offending commit upstream from Al, and it is fixed
in the rawhide that auto-installed a couple hours later. Sleeping would
really have just fixed everything.

Jon.


--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux