Open Indirajoga opened 1 year ago
@metan-ucw please update
@metan-ucw please update
IMHO there is certainly no reason for this change, test should work even on dash (I suppose you use bash shell). There is /usr/bin/test
binary, but test()
function takes preference.
Could you please report:
ls -la /bin/sh
rpm -qf /bin/sh
bash --version
@wangli5665 It looks the reporter uses RHEL 9, could you please test sctp01.sh
? Is there really some clash /usr/bin/test
binary vstest()
function?
I wasn't able to reproduce that TBROK on RHEL9.2 ppcle64.
# uname -r
5.14.0-284.21.1.el9_2.ppc64le
<<<test_start>>>
tag=sctp01 stime=1687939673
cmdline="sctp01.sh"
contacts=""
analysis=exit
<<<test_output>>>
sctp01 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
sctp01 1 TINFO: add local addr 10.0.0.2/24
sctp01 1 TINFO: add local addr fd00:1:1:1::2/64
sctp01 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
sctp01 1 TINFO: add remote addr 10.0.0.1/24
sctp01 1 TINFO: add remote addr fd00:1:1:1::1/64
sctp01 1 TINFO: Network config (local -- remote):
sctp01 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
sctp01 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
sctp01 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
sctp01 1 TINFO: timeout per run is 0h 5m 0s
sctp01 1 TINFO: compare TCP/SCTP performance
sctp01 1 TINFO: run server 'netstress -T tcp -D ltp_ns_veth1 -R 3 -B /tmp/ltp-J966prso32/LTP_sctp01.MUaV9DtswV'
sctp01 1 TINFO: run client 'netstress -l -T tcp -H 10.0.0.1 -D ltp_ns_veth2 -a 2 -r 2000 -d /tmp/ltp-J966prso32/LTP_sctp01.MUaV9DtswV/tst_netload.res' 5 times
sctp01 1 TPASS: netstress passed, median time 239 ms, data: 235 239 239 239 241
sctp01 1 TINFO: run server 'netstress -T sctp -S 10.0.0.1 -D ltp_ns_veth1 -R 3 -B /tmp/ltp-J966prso32/LTP_sctp01.MUaV9DtswV'
sctp01 1 TINFO: run client 'netstress -l -T sctp -S 10.0.0.2 -H 10.0.0.1 -D ltp_ns_veth2 -a 2 -r 2000 -d /tmp/ltp-J966prso32/LTP_sctp01.MUaV9DtswV/tst_netload.res' 5 times
tst_test.c:1558: TINFO: Timeout per run is 0h 05m 30s
netstress.c:923: TINFO: max requests '3'
netstress.c:976: TINFO: SCTP server
netstress.c:673: TCONF: socket(10, 1, 132) failed: EPROTONOSUPPORT (93)
Summary:
passed 0
failed 0
broken 0
skipped 1
warnings 0
@Indirajoga I guess the problem is somewhere else on your SUT.
IMHO there is certainly no reason for this change, test should work even on dash (I suppose you use bash shell). There is
/usr/bin/test
binary, buttest()
function takes preference. Could you please report:ls -la /bin/sh rpm -qf /bin/sh bash --version
@wangli5665 It looks the reporter uses RHEL 9, could you please test
sctp01.sh
? Is there really some clash/usr/bin/test
binary vstest()
function?
Please find the output of below commands
root@doodlp95: ls -la /bin/sh lrwxrwxrwx. 1 root root 4 Nov 24 2022 /bin/sh -> bash root@doodlp95: rpm -qf /bin/sh bash-5.1.8-6.el9_1.ppc64le root@doodlp95: bash --version GNU bash, version 5.1.8(1)-release (powerpc64le-redhat-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
I am still facing issue with test() function parameter.
NOTE: A similar issue has been observed in git#https://github.com/linux-test-project/ltp/issues/1033.
NOTE: A similar issue has been observed in git##1033.
Good point. Before fixing it this way, could you please thist test file and run it?
$ cat ./foo.sh
test()
{
echo "test was called with params: $@"
}
test
test foo bar
$ ./foo.sh
test was called with params:
test was called with params: foo bar
Is it the output the same? I wonder what exactly is a problem.
Could you please also run:
printf %s\\n "$-"
set +o
and post the output? @wangli5665 could you print output of these two as well?
BTW all of these tests should be affected, can you please try some of them?
$ git grep -l -e TST_TESTFUNC=.test.$ -e TST_TESTFUNC=test$ lib/ testcases/
lib/newlib_tests/shell/tst_all_filesystems.sh
lib/newlib_tests/shell/tst_all_filesystems_skip.sh
lib/newlib_tests/shell/tst_check_driver.sh
lib/newlib_tests/shell/tst_errexit.sh
lib/newlib_tests/shell/tst_format_device.sh
lib/newlib_tests/shell/tst_mount_device.sh
lib/newlib_tests/shell/tst_mount_device_tmpfs.sh
lib/newlib_tests/shell/tst_skip_filesystems.sh
testcases/commands/ar/ar01.sh
testcases/commands/df/df01.sh
testcases/commands/eject/eject-tests.sh
testcases/commands/gzip/gzip_tests.sh
testcases/commands/ld/ld01.sh
testcases/commands/ldd/ldd01.sh
testcases/commands/mkdir/mkdir_tests.sh
testcases/commands/mkfs/mkfs01.sh
testcases/commands/mv/mv_tests.sh
testcases/commands/nm/nm01.sh
testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
testcases/kernel/controllers/memcg/control/memcg_control_test.sh
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
testcases/kernel/numa/numa01.sh
testcases/kernel/security/integrity/ima/tests/ima_setup.sh
testcases/network/busy_poll/busy_poll_lib.sh
testcases/network/dccp/dccp01.sh
testcases/network/iproute/ip_tests.sh
testcases/network/iptables/iptables_lib.sh
testcases/network/mpls/mpls01.sh
testcases/network/sctp/sctp01.sh
testcases/network/sockets/bind_noport01.sh
testcases/network/stress/ssh/ssh-stress.sh
testcases/network/tcp_fastopen/tcp_fastopen_run.sh
testcases/network/traceroute/traceroute01.sh
testcases/network/virt/wireguard01.sh
sure, see below:
# ls -la /bin/sh
lrwxrwxrwx. 1 root root 4 Nov 24 2022 /bin/sh -> bash
# rpm -qf /bin/sh
bash-5.1.8-6.el9_1.ppc64le
# ./foo.sh
test was called with params:
test was called with params: foo bar
# printf %s\\n "$-"
himBHs
# set +o
set +o allexport
set -o braceexpand
set -o emacs
set +o errexit
set +o errtrace
set +o functrace
set -o hashall
set -o histexpand
set -o history
set +o ignoreeof
set -o interactive-comments
set +o keyword
set -o monitor
set +o noclobber
set +o noexec
set +o noglob
set +o nolog
set +o notify
set +o nounset
set +o onecmd
set +o physical
set +o pipefail
set +o posix
set +o privileged
set +o verbose
set +o vi
set +o xtrace
-> sctp01 test case is resulting in TBROK
-> After changing the test function parameter and test function itself to "do_test" from test, the tests are passing.