Date: Sat, 3 Nov 2012 13:56:04 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: Peter Jeremy <peter@rulingia.com> Cc: FreeBSD FS <freebsd-fs@freebsd.org> Subject: Re: Inconsistent/potentially incorrect behavior with relative lookups via chdir(2) on UFS/ZFS Message-ID: <CAGH67wQ5z=8o%2Bu00zqFdeCbhE=CCPOgms94D943v9uyP5BHBCg@mail.gmail.com> In-Reply-To: <20121103103849.GD12996@server.rulingia.com> References: <CAGH67wSa7y-Nz=Pm%2BpxL3TRyKvBdDq2s3paSCu3LB-AFwmO_2g@mail.gmail.com> <20121103103849.GD12996@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 3, 2012 at 3:38 AM, Peter Jeremy <peter@rulingia.com> wrote: > On 2012-Nov-01 15:25:05 -0700, Garrett Cooper <yanegomi@gmail.com> wrote: > > Just doing some interop testing on UFS/ZFS to develop a baseline for > >filesystem behavior, and I noticed some inconsistencies with the ENOENT > >requirement in chdir(2) when dealing with relative ".." paths (dot-dot > >lookups). In particular... > > 1. I would have expected chdir('.') to have failed in UFS/ZFS with > >ENOENT if '.' wasn't present, but it didn't. > > 2. I would have expected chdir('..') to have failed in ZFS with ENOENT > >if '..' wasn't present, but it didn't. > > Sidenote: python doesn't do any special handling with os.chdir, per > >Modules/posixmodule.c (I checked). > > The full test I ran is included below. > > Whilst playing with the above, I've found some wierd timing issues > with UFS+SU: > > $ mkdir -p ~/p/q/r;sync > $ cd p/q/r > $ rm -r ~/p; while date; do sleep 3 ; ls -al;done > Sat 3 Nov 2012 21:29:19 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:22 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:25 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:28 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:31 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:34 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:37 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:40 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:43 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:46 EST > total 0 > Sat 3 Nov 2012 21:29:49 EST > Interesting; with SU-J or SUJ (my testing was with the default: SUJ)? Thanks! -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQ5z=8o%2Bu00zqFdeCbhE=CCPOgms94D943v9uyP5BHBCg>