count++;
d->d_name[0]='0'+count; d->d_name[1]='\0';
#ifdef _DIRENT_HAVE_D_NAMLEN
- _D_EXACT_NAMELEN(d)=2;
+ d->d_namlen = 2;
#endif
errno = 0;
return d;
for READDIR_PARTIAL in '' '1'; do
rm -f preloaded
(export LD_PRELOAD=$LD_PRELOAD:./k.so
- returns_ 1 rm -Rf dir 2>>err) || fail=1
+ returns_ 1 rm -Rf dir 2>>errt) || fail=1
if ! test -f preloaded; then
cat err
skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
# Second case is more general error where we fail immediately
# (with ENOENT in this case but it could be anything).
cat <<EOF > exp
-rm: cannot remove 'dir': Directory not empty
-rm: traversal failed: dir: No such file or directory
+rm: cannot remove 'dir'
+rm: traversal failed: dir
EOF
-
+sed 's/\(rm:.*\):.*/\1/' errt > err || framework_failure_
compare exp err || fail=1
Exit $fail
# Before coreutils-8.26 this would induce an UMR under UBSAN
-returns_ 1 timeout 10 tail -f - <&- 2>err || fail=1
+returns_ 1 timeout 10 tail -f - <&- 2>errt || fail=1
cat <<\EOF >exp || framework_failure_
-tail: cannot fstat 'standard input': Bad file descriptor
-tail: error reading 'standard input': Bad file descriptor
+tail: cannot fstat 'standard input'
+tail: error reading 'standard input'
tail: no files remaining
-tail: -: Bad file descriptor
+tail: -
EOF
+sed 's/\(tail:.*\):.*/\1/' errt > err || framework_failure_
compare exp err || fail=1