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

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

 



Alan and all,

So I pulled in the merges from Alan and some other bits I'm working on,
and actually had to remerge because of other stuff. I pull commits one
at a time these days so I can review each one fully, then diff the end
result to see if I missed anything with your merge attempt since you
were kind enough to have a nice merge branch for me (except you'll
notice I had a few other fixes, free in different order, etc.).

Anyway. The reason I haven't pushed dev to master yet is attached. The
tests are falling over because opendir() happily succeeds on the
modprobe2.conf *file* in the testsuite and then modprobe gets very
unhappy trying to read from it. The same is not true on an F12 box
running 2.6.33-rc8. So something horrible is broken upstream :)

Assuming I'm not told "oh yea, we're breaking everything you ever knew
about opendir() semantics" though some weird file directory streams
thingy I should push dev to master later.

Jon.

--- Begin Message ---
Folks,

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?

The box is running almost an upstream kernel, and I can poke if I'm told
this not intended: 2.6.34-0.8.rc0.git11.fc14.x86_64.

What am I missing?

Jon.

[0] The podcast isn't dead, I'm just suffering from a cold and will be
taking a day off to recover and catch up with that sometime today.


--- End Message ---

[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