[BACK]Return to getfattr.test CVS log [TXT][DIR] Up to [Development] / xfs-cmds / attr / test

File: [Development] / xfs-cmds / attr / test / getfattr.test (download)

Revision 1.1, Wed Nov 21 05:13:52 2007 UTC (9 years, 11 months ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN

fix up tree walking for symlinks
Merge of master-melb:xfs-cmds:30105a by kenmcd.

	$ mkdir d
	$ cd d

	$ touch f
	$ setfattr -n user.test -v test f
	$ ln -s f l

This case should be obvious:
	$ getfattr -d f
	> # file: f
	> user.test="test"
	>

If a symlink is explicitly specified on the command line, follow it
(-H behavior):
	$ getfattr -d l
	> # file: l
	> user.test="test"
	>

Unless we are explicitly told not to dereference symlinks:
	$ getfattr -hd l

When walking a tree, it does not make sense to follow symlinks. We should
only see f's attributes here -- that's a bug:
	$ getfattr -Rd .
	> # file: f
	> user.test="test"
	>

This case works as expected:
	$ getfattr -Rhd .
	> # file: f
	> user.test="test"
	>

In these two cases, getfattr should dereference the symlink passed on the
command line, but not l. This doesn't work correctly, either; it's the same
bug:
	$ ln -s . here
	$ getfattr -Rd here
	> # file: here/f
	> user.test="test"
	>

	$ getfattr -Rhd here
	> # file: here/f
	> user.test="test"
	>

	$ cd ..
	$ rm -rf d