I had been seeing some failures in generic/126 when running on NFS under
kdevops. The problem turned out to be that kdevops makes the root of the
NFS export mode 01777 by default (i.e. with the sticky bit set). This
causes some of these permission tests to fail because the open() is
called with the O_CREAT bit set.
Make the outcome of this test not depend on the permissions on
$TEST_DIR. Create a new directory to do these tests in, and clean it up
when done.
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>