common/filter: add _filter_stat
authorMurphy Zhou <jencce.kernel@gmail.com>
Tue, 12 Jan 2021 05:31:16 +0000 (13:31 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 17 Jan 2021 14:15:48 +0000 (22:15 +0800)
commitd6dafbf074d3b66e8104f228d95790a93e3b8b13
tree0f1ad80f03b9eb5f4e79e3dba5f772a943fc351d
parentc1537fc9f2122a13119bd58a46d1d0c10280ce21
common/filter: add _filter_stat

Since coreutils upstream v8.32~47

  commit a99ab266110795ed94a9cb4d2765ddad9c4310da
  Author: Jeff Layton <jlayton@kernel.org>
  Date:   Thu Sep 19 11:59:45 2019 -0400

      ls: use statx instead of stat when available

stat(1) starts to use statx(2) call.

In some testcase, if file does not exist, this breaks golden
output like this:

-stat: cannot stat 'SCRATCH_MNT/xxx': No such file or directory
+stat: cannot statx 'SCRATCH_MNT/xxx': No such file or directory

Add this filter to fix it, and add this filter to testcases that
need it.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/filter
tests/generic/397
tests/generic/397.out
tests/generic/435
tests/generic/435.out
tests/generic/440
tests/generic/440.out
tests/xfs/348
tests/xfs/348.out