generic/530: fix shutdown failure of generic/530 in overlay
authorJeffle Xu <jefflexu@linux.alibaba.com>
Mon, 13 May 2019 06:11:05 +0000 (14:11 +0800)
committerEryu Guan <guaneryu@gmail.com>
Tue, 14 May 2019 02:58:59 +0000 (10:58 +0800)
commitf8f57747222de156e253200e5e3adbf10e4b0df6
treee5db156d713e4682933b938a9ae70576c448b0a4
parentd123585ea0d092cc65102d10b63a4b5841f809e0
generic/530: fix shutdown failure of generic/530 in overlay

Testcases are recommended to use  _require_scratch_shutdown()
and _scratch_shutdown() pair helper function to test and execute
shutdown.

generic/530 formmerly used _require_scratch_shutdown() to test
whether the filesystem supports shutdown or not, while executed
the shutdown action in a raw binary (src/t_open_tmpfiles) rather
than the recommended _scratch_shutdown() helper. This will cause
a "shutdown: Inappropriate ioctl for device" error message when
testing overlay filesystem.

This patch simply move the shutdown action from the raw binary
into the packaged _scratch_shutdown() helper. That is, we remove
the "shutdown" interface of t_open_tmpfiles.c and call
_scratch_shutdown() in genric/530 and xfs/501.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/t_open_tmpfiles.c
tests/generic/530
tests/xfs/501