From a50e6872beb20ef409c3893b7deedbffe4d62845 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 7 Jan 2025 13:50:16 -0800 Subject: [PATCH] tests/int: simplify assignments Assigning a multi-line value to a bash variable should not be so complex. While at it, slightly reformat create_runtime_hook. No functional change. Signed-off-by: Kir Kolyshkin --- tests/integration/hooks_so.bats | 9 ++------- tests/integration/tty.bats | 14 ++++---------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/integration/hooks_so.bats b/tests/integration/hooks_so.bats index 44299ab57..515f9e322 100644 --- a/tests/integration/hooks_so.bats +++ b/tests/integration/hooks_so.bats @@ -30,13 +30,8 @@ function teardown() { bundle=$(pwd) # To mount $HOOKLIBCR we need to do that in the container namespace - create_runtime_hook=$( - cat <<-EOF - pid=\$(cat - | jq -r '.pid') - touch "$LIBPATH/$HOOKLIBCR.1.0.0" - nsenter -m \$ns -t \$pid mount --bind "$bundle/$HOOKLIBCR.1.0.0" "$LIBPATH/$HOOKLIBCR.1.0.0" - EOF - ) + create_runtime_hook="pid=\$(cat - | jq -r '.pid'); touch "$LIBPATH/$HOOKLIBCR.1.0.0" && \ + nsenter -m \$ns -t \$pid mount --bind "$bundle/$HOOKLIBCR.1.0.0" "$LIBPATH/$HOOKLIBCR.1.0.0"" create_container_hook="touch ./lib/$HOOKLIBCC.1.0.0 && mount --bind $bundle/$HOOKLIBCC.1.0.0 ./lib/$HOOKLIBCC.1.0.0" diff --git a/tests/integration/tty.bats b/tests/integration/tty.bats index c95c19a1e..53d3c23f1 100644 --- a/tests/integration/tty.bats +++ b/tests/integration/tty.bats @@ -153,8 +153,7 @@ function teardown() { # make sure we're running testcontainer test_busybox running - tty_info_with_consize_size=$( - cat <