Context |
Check |
Description |
ltpci/debian_stable_s390x-linux-gnu-gcc_s390x |
success
|
success
|
ltpci/debian_stable_aarch64-linux-gnu-gcc_arm64 |
success
|
success
|
ltpci/debian_stable_powerpc64le-linux-gnu-gcc_ppc64el |
success
|
success
|
ltpci/debian_stable_gcc |
success
|
success
|
ltpci/ubuntu_jammy_gcc |
success
|
success
|
ltpci/alpine_latest_gcc |
success
|
success
|
ltpci/debian_stable_gcc |
success
|
success
|
ltpci/opensuse-archive_42-2_gcc |
success
|
success
|
ltpci/fedora_latest_clang |
success
|
success
|
ltpci/debian_oldstable_gcc |
success
|
success
|
ltpci/debian_oldstable_clang |
success
|
success
|
ltpci/quay-io-centos-centos_stream9_gcc |
success
|
success
|
ltpci/opensuse-leap_latest_gcc |
success
|
success
|
ltpci/debian_testing_clang |
success
|
success
|
ltpci/debian_testing_gcc |
success
|
success
|
ltpci/ubuntu_bionic_gcc |
fail
|
failure
|
@@ -41,29 +41,34 @@
. tst_loader.sh
-ulimit -c unlimited
-unset DEBUGINFOD_URLS
+tst_test()
+{
+ ulimit -c unlimited
+ unset DEBUGINFOD_URLS
-if [ $(uname -m) = "x86_64" ]; then
- if LINE=$(grep "vsyscall" /proc/self/maps); then
- RIGHT="ffffffffff600000-ffffffffff601000[[:space:]][r-]-xp"
- if echo "$LINE" | grep -q "$RIGHT"; then
- tst_res TPASS "[vsyscall] reported correctly"
- else
- tst_res TFAIL "[vsyscall] reporting wrong"
+ if [ $(uname -m) = "x86_64" ]; then
+ if LINE=$(grep "vsyscall" /proc/self/maps); then
+ RIGHT="ffffffffff600000-ffffffffff601000[[:space:]][r-]-xp"
+ if echo "$LINE" | grep -q "$RIGHT"; then
+ tst_res TPASS "[vsyscall] reported correctly"
+ else
+ tst_res TFAIL "[vsyscall] reporting wrong"
+ fi
fi
fi
-fi
-rm -rf core*
-{ vma05_vdso; } > /dev/null 2>&1
-[ -f core ] || tst_brk TBROK "missing core file"
+ rm -rf core*
+ { vma05_vdso; } > /dev/null 2>&1
+ [ -f core ] || tst_brk TBROK "missing core file"
-TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
- vma05_vdso ./core* 2> /dev/null)
+ TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
+ vma05_vdso ./core* 2> /dev/null)
-if echo "$TRACE" | grep -qF "??"; then
- tst_res TFAIL "[vdso] bug not patched"
-else
- tst_res TPASS "[vdso] backtrace complete"
-fi
+ if echo "$TRACE" | grep -qF "??"; then
+ tst_res TFAIL "[vdso] bug not patched"
+ else
+ tst_res TPASS "[vdso] backtrace complete"
+ fi
+}
+
+tst_test
@@ -16,10 +16,15 @@
. tst_loader.sh
-tst_res TPASS "Shell loader works fine!"
-case "$PWD" in
- /tmp/*)
- tst_res TPASS "We are running in temp directory in $PWD";;
- *)
- tst_res TFAIL "We are not running in temp directory but $PWD";;
-esac
+tst_test()
+{
+ tst_res TPASS "Shell loader works fine!"
+ case "$PWD" in
+ /tmp/*)
+ tst_res TPASS "We are running in temp directory in $PWD";;
+ *)
+ tst_res TFAIL "We are not running in temp directory but $PWD";;
+ esac
+}
+
+tst_test
@@ -14,16 +14,22 @@
. tst_loader.sh
-tst_res TINFO "In shell"
+tst_test()
+{
+ local mntpath=$(realpath ltp_mntpoint)
+ local mounted=$(grep $mntpath /proc/mounts)
+ local device path
-mntpath=$(realpath ltp_mntpoint)
-mounted=$(grep $mntpath /proc/mounts)
+ tst_res TINFO "In shell"
-if [ -n "$mounted" ]; then
- device=$(echo $mounted |cut -d' ' -f 1)
- path=$(echo $mounted |cut -d' ' -f 2)
+ if [ -n "$mounted" ]; then
+ device=$(echo $mounted |cut -d' ' -f 1)
+ path=$(echo $mounted |cut -d' ' -f 2)
- tst_res TPASS "$device mounted at $path"
-else
- tst_res TFAIL "Device not mounted!"
-fi
+ tst_res TPASS "$device mounted at $path"
+ else
+ tst_res TFAIL "Device not mounted!"
+ fi
+}
+
+tst_test
@@ -17,4 +17,9 @@ cleanup()
tst_res TINFO "Cleanup runs"
}
-tst_brk TBROK "Test exits"
+tst_test()
+{
+ tst_brk TBROK "Test exits"
+}
+
+tst_test
@@ -15,9 +15,14 @@
. tst_loader.sh
-if [ -n "LTP_IPC_PATH" ]; then
- tst_res TPASS "LTP_IPC_PATH=$LTP_IPC_PATH!"
-fi
+tst_test()
+{
+ if [ -n "LTP_IPC_PATH" ]; then
+ tst_res TPASS "LTP_IPC_PATH=$LTP_IPC_PATH!"
+ fi
-tst_res TINFO "Running C child"
-shell_c_child
+ tst_res TINFO "Running C child"
+ shell_c_child
+}
+
+tst_test
@@ -17,4 +17,9 @@ do_cleanup()
tst_res TINFO "Cleanup executed"
}
-tst_res TPASS "Test is executed"
+tst_test()
+{
+ tst_res TPASS "Test is executed"
+}
+
+tst_test
@@ -24,15 +24,20 @@
. tst_loader.sh
-tst_res TINFO "In shell"
+tst_test()
+{
+ tst_res TINFO "In shell"
-mntpoint=$(realpath ltp_mntpoint)
-mounted=$(grep $mntpoint /proc/mounts)
+ mntpoint=$(realpath ltp_mntpoint)
+ mounted=$(grep $mntpoint /proc/mounts)
-if [ -n "$mounted" ]; then
- fs=$(echo $mounted |cut -d' ' -f 3)
+ if [ -n "$mounted" ]; then
+ fs=$(echo $mounted |cut -d' ' -f 3)
- tst_res TPASS "Mounted device formatted with $fs"
-else
- tst_res TFAIL "Device not mounted!"
-fi
+ tst_res TPASS "Mounted device formatted with $fs"
+ else
+ tst_res TFAIL "Device not mounted!"
+ fi
+}
+
+tst_test
@@ -22,4 +22,9 @@
. tst_loader.sh
-tst_res TPASS "This should pass!"
+tst_test()
+{
+ tst_res TPASS "This should pass!"
+}
+
+tst_test
@@ -14,4 +14,9 @@
. tst_loader.sh
-tst_res TFAIL "Shell loader should TBROK the test"
+tst_test()
+{
+ tst_res TFAIL "Shell loader should TBROK the test"
+}
+
+tst_test
@@ -11,4 +11,9 @@
. tst_loader.sh
-tst_res TPASS "Shell loader works fine!"
+tst_test()
+{
+ tst_res TPASS "Shell loader works fine!"
+}
+
+tst_test
@@ -7,4 +7,9 @@
. tst_loader.sh
-tst_res TFAIL "Shell loader should TBROK the test"
+tst_test()
+{
+ tst_res TFAIL "Shell loader should TBROK the test"
+}
+
+tst_test
@@ -11,4 +11,9 @@
. tst_loader.sh
-tst_res TPASS "We are running on supported architecture"
+tst_test()
+{
+ tst_res TPASS "We are running on supported architecture"
+}
+
+tst_test
@@ -14,4 +14,9 @@
. tst_loader.sh
-tst_res TFAIL "Fails the test so that tags are shown."
+tst_test()
+{
+ tst_res TFAIL "Fails the test so that tags are shown."
+}
+
+tst_test
@@ -14,4 +14,9 @@
. tst_loader.sh
-tst_res TPASS "Iteration $1"
+tst_test()
+{
+ tst_res TPASS "Iteration $1"
+}
+
+tst_test
@@ -14,4 +14,9 @@
. tst_loader.sh
-tst_res TFAIL "Shell loader should TBROK the test"
+tst_test()
+{
+ tst_res TFAIL "Shell loader should TBROK the test"
+}
+
+tst_test
This is a preparation to make next changes smaller. No functional changes. Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/kernel/mem/vma/vma05.sh | 45 ++++++++++--------- testcases/lib/tests/shell_loader.sh | 19 +++++--- .../lib/tests/shell_loader_all_filesystems.sh | 26 ++++++----- .../lib/tests/shell_loader_brk_cleanup.sh | 7 ++- testcases/lib/tests/shell_loader_c_child.sh | 15 ++++--- testcases/lib/tests/shell_loader_cleanup.sh | 7 ++- .../lib/tests/shell_loader_filesystems.sh | 23 ++++++---- .../lib/tests/shell_loader_invalid_block.sh | 7 ++- .../tests/shell_loader_invalid_metadata.sh | 7 ++- testcases/lib/tests/shell_loader_kconfigs.sh | 7 ++- .../lib/tests/shell_loader_no_metadata.sh | 7 ++- .../lib/tests/shell_loader_supported_archs.sh | 7 ++- testcases/lib/tests/shell_loader_tags.sh | 7 ++- testcases/lib/tests/shell_loader_tcnt.sh | 7 ++- .../lib/tests/shell_loader_wrong_metadata.sh | 7 ++- 15 files changed, 137 insertions(+), 61 deletions(-)