generic: new case to test getcwd(2)
authorEryu Guan <eguan@redhat.com>
Tue, 17 Jun 2014 23:31:38 +0000 (09:31 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 17 Jun 2014 23:31:38 +0000 (09:31 +1000)
commit76d0cfb488b445952454190cfcdb42c5eeda6cb4
tree3b687b7e3bc0e9f721c2ddb76091a1bb0ac9d467
parentc8dc487de75cd5501b3bd3d79dd30784a1955260
generic: new case to test getcwd(2)

The following kernel commit introduced a race condition that causes
getcwd(2) to return "/" instead of correct path

232d2d6 dcache: Translating dentry into pathname without taking rename_lock

Jan Stancek hit it once when building ltp and Mikulas Patocka could
hit it by running lvm2 test suite. Please refer to this thread

https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg17896.html

These commits fixed the bug
ede4ceb prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
f650080 __dentry_path() fixes

Cc: Artem Savkov <asavkov@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
.gitignore
src/Makefile
src/t_getcwd.c [new file with mode: 0644]
tests/generic/028 [new file with mode: 0755]
tests/generic/028.out [new file with mode: 0644]
tests/generic/group