]> granicus.if.org Git - strace/commitdiff
tests/stat: enhance regexps
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 6 May 2013 18:50:48 +0000 (18:50 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 6 May 2013 19:15:09 +0000 (19:15 +0000)
* tests/stat: Enhance regexps that check tracing of stat/stat64 and
fstatat/fstatat64 syscalls.

tests/stat

index 0c1b8043ab6597554314be86cf40f70fa8065e11..69fa5bf7049f18409058bbc2c09aefa6f807e38e 100755 (executable)
@@ -27,13 +27,13 @@ LC_ALL=C grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1
 
 timeout -s 9 $check_timeout \
 $STRACE -efile find -L sample > /dev/null 2> check.log &&
-LC_ALL=C grep -E -x 'f?stat(at)?(64)?\((AT_FDCWD, )?"sample", [{]st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.}(, 0)?\) += 0' check.log > /dev/null ||
+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'; }
 
 timeout -s 9 $check_timeout \
 $STRACE -efile find sample > /dev/null 2> check.log &&
-LC_ALL=C grep -E -x '[[:alnum:]_]*stat[[:alnum:]_]*\([^()"]*"sample", [{]st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.}.*' check.log > /dev/null ||
-       { cat check.log; fail_ 'strace -efile failed to trace newfstatat/fstatat64 properly'; }
+LC_ALL=C grep -E -x 'lstat(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, \.\.\.\}, AT_SYMLINK_NOFOLLOW\) += 0' check.log > /dev/null ||
+       { cat check.log; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; }
 
 rm -f sample