[PATCH] tests/stat: use find -follow for busybox compatibility

James Hogan james.hogan at imgtec.com
Wed May 8 09:00:31 UTC 2013


Use the -follow argument to find instead of -L for compatibility with
busybox which doesn't have the -L option.

Tested tests/stat on metag (busybox) and x86_64 (GNU findutils).

* tests/stat: use find -follow instead of find -L.

Signed-off-by: James Hogan <james.hogan at imgtec.com>
---
 tests/stat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/stat b/tests/stat
index e0fc379..33de663 100755
--- a/tests/stat
+++ b/tests/stat
@@ -24,7 +24,7 @@ LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' check.log > /dev/nul
 LC_ALL=C grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0' check.log > /dev/null ||
 	{ cat check.log; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; }
 
-$TIMEOUT $STRACE -efile find -L sample > /dev/null 2> check.log &&
+$TIMEOUT $STRACE -efile find sample -follow > /dev/null 2> check.log &&
 LC_ALL=C grep -E -x 'stat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, 0\) += 0' check.log > /dev/null ||
 	{ cat check.log; fail_ 'strace -efile failed to trace stat/stat64 properly'; }
 
-- 
1.8.1.2






More information about the Strace-devel mailing list