ltp
ltp copied to clipboard
fs_bind* test cases reporting TBROK
fs_bind* test cases were either failing or broken
fs_bind_rbind36 1 TBROK: Test didn't report any results fs_bind02 1 TBROK: Test didn't report any results fs_bind24 1 TBROK: Test didn't report any results
The following code block in the path /testcases/kernel/fs/fs_bind/fs_bind_lib.sh
232 fs_bind_test()
233 {
234 _fs_bind_setup_test
235
236 if type ${FS_BIND_TESTFUNC}1 > /dev/null 2>&1; then
237 "$FS_BIND_TESTFUNC$_tst_i" $1
238 else
239 "$FS_BIND_TESTFUNC" $1
240 fi
241
242 _fs_bind_cleanup_test
243 }
After the following change sthe tests are passing
232 fs_bind_test()
233 {
234 _fs_bind_setup_test
235
236 "$FS_BIND_TESTFUNC" $1
237 if type ${FS_BIND_TESTFUNC}1 > /dev/null 2>&1; then
238 "$FS_BIND_TESTFUNC$_tst_i" $1
239 fi
240
241 _fs_bind_cleanup_test
242 }
243
@metan-ucw please update
The change does not look right, you are removing else branch that is supposedly not used at all. Is this really the change that fixes the tests for you?
Yes.
232 fs_bind_test()
233 {
234 _fs_bind_setup_test
235
236 if type ${FS_BIND_TESTFUNC}1 > /dev/null 2>&1; then
237 "$FS_BIND_TESTFUNC$_tst_i" $1
238 else
239 "$FS_BIND_TESTFUNC" $1
240 fi
241
242 _fs_bind_cleanup_test
243 }
'if' code block works properly only when there are multiple test functions within a testcase. Ex: 'fs_bind_regression.sh' has three test functions (namely test1(), test2(), test3()) within one testcase. In 'fs_bind testsuite' there are 94 out of 95 testcases have only one test function which doesn't get executed, they are broken(TBROK) and not producing complete results.
When 'else' statement is removed, the other 94 testcases also get chance to execute completely and produce a definative results. I have attached the result logs generated before the code correction and after the code correction for your reference.
Before_correction_execution_status.txt After correction_execution_status.txt
This issue is similar to https://github.com/linux-test-project/ltp/issues/1035 There are 94 testcases, instead of changing the test name in each testcase I have modified the fs_bind_lib.sh file in a way to fix the issue. please go through the attached logs.
@metan-ucw or @pevik can you please take a look?