common/rc: remove useless _pgrep funcion
PATCH 1/2 common/rc: remove useless _pgrep funcion
The _pgrep() function isn't used anymore, remove it.
--- common/rc | 10 ---------- 1 file changed, 10 deletions(-)
common/rc +0 -10
@@ -36,16 +36,6 @@ _pkill() pkill "$@" } -# Find only the test processes started by this test -_pgrep() -{ - if [ "$FSTESTS_ISOL" = "setsid" ]; then - pgrep --session 0 "$@" - else - pgrep "$@" - fi -} - # Common execution handling for fsstress invocation. # # We need per-test fsstress binaries because of the way fsstress forks and
Signature · 1 line
2.47.1
PATCH 2/2 common/rc: _add_dmesg_filter returns when RESULT_DIR is null
I always hit below error on a system with readonly rootfs:
++ _xfs_prepare_for_eio_shutdown /dev/loop0
...
++ _add_dmesg_filter 'Internal error'
++ local 'regexp=Internal error'
++ local filter_file=/dmesg_filter
++ '[' '!' -e /dmesg_filter ']'
++ echo 'Internal error'
./common/rc: line 4716: /dmesg_filter: Read-only file system
The RESULT_DIR is null, due to xfstests/check calls _test_mount and _scratch_mount before RESULT_DIR creation. And _test_mount does _prepare_for_eio_shutdown -> _xfs_prepare_for_eio_shutdown -> _add_dmesg_filter "Internal error" when RESULT_DIR is null.
--- common/rc | 6 ++++++ 1 file changed, 6 insertions(+)
common/rc +6 -0
@@ -4800,6 +4800,12 @@ _check_dmesg_filter() # Add a simple expression to the default dmesg filter _add_dmesg_filter() { + # This function might be called before having RESULT_DIR, do nothing + # if RESULT_DIR isn't created + if [ ! -d "${RESULT_DIR}" ];then + return 1 + fi + local regexp="$1" local filter_file="${RESULT_DIR}/dmesg_filter"
Signature · 1 line
2.47.1
Re: [PATCH 2/2] common/rc: _add_dmesg_filter returns when RESULT_DIR is null
Quoted 11 lines · Zorro Lang
I always hit below error on a system with readonly rootfs:
++
_xfs_prepare_for_eio_shutdown/dev/loop0
...
++_add_dmesg_filter'Internal error'
++ local 'regexp=Internal error'
++ local filter_file=/dmesg_filter
++ '[' '!' -e /dmesg_filter ']'
++ echo 'Internal error'
./common/rc: line 4716: /dmesg_filter: Read-only file system
Quoted 6 lines
The
RESULT_DIRis null, due to xfstests/check calls_test_mountand_scratch_mountbeforeRESULT_DIRcreation. And_test_mountdoes_prepare_for_eio_shutdown->_xfs_prepare_for_eio_shutdown->_add_dmesg_filter"Internal error" whenRESULT_DIRis null.Signed-off-by Zorro Lang <[email protected]>
Looks good,
--D
Quoted 25 lines
--- common/rc | 6 ++++++ 1 file changed, 6 insertions(+)common/rc +6
-0@@ -4800,6 +4800,12 @@ _check_dmesg_filter() # Add a simple expression to the default dmesg filter _add_dmesg_filter() { + # This function might be called before having RESULT_DIR, do nothing + # if RESULT_DIR isn't created + if [ ! -d "${RESULT_DIR}" ];then + return 1 + fi + local regexp="$1" local filter_file="${RESULT_DIR}/dmesg_filter"Signature · 1 line
2.47.1
Quoted 4 lines · Zorro Lang
The
_pgrep()function isn't used anymore, remove it.Signed-off-by Zorro Lang <[email protected]>---
Ping.
Could anyone help to give my 2 small patches a reviewing :)
Thanks,
Zorro
Quoted 28 lines
common/rc | 10 ---------- 1 file changed, 10 deletions(-)common/rc +0
-10@@ -36,16 +36,6 @@ _pkill() pkill "$@" } -# Find only the test processes started by this test -_pgrep() -{ - if [ "$FSTESTS_ISOL" = "setsid" ]; then - pgrep --session 0 "$@" - else - pgrep "$@" - fi -} - # Common execution handling for fsstress invocation. # # We need per-test fsstress binaries because of the way fsstress forks andSignature · 1 line
2.47.1
Quoted 3 lines · Zorro Lang
The
_pgrep()function isn't used anymore, remove it.Signed-off-by Zorro Lang <[email protected]>
Yeah, seems fine to me.
--D
Quoted 29 lines
--- common/rc | 10 ---------- 1 file changed, 10 deletions(-)common/rc +0
-10@@ -36,16 +36,6 @@ _pkill() pkill "$@" } -# Find only the test processes started by this test -_pgrep() -{ - if [ "$FSTESTS_ISOL" = "setsid" ]; then - pgrep --session 0 "$@" - else - pgrep "$@" - fi -} - # Common execution handling for fsstress invocation. # # We need per-test fsstress binaries because of the way fsstress forks andSignature · 1 line
2.47.1