diff mbox series

[RFC,1/5] rcutorture: kvm: Simplify invocation of mkinitrd.sh

Message ID 20250124015836.732086-2-joel@joelfernandes.org (mailing list archive)
State New
Headers show
Series [RFC,1/5] rcutorture: kvm: Simplify invocation of mkinitrd.sh | expand

Commit Message

Joel Fernandes (Google) Jan. 24, 2025, 1:58 a.m. UTC
The else block is unnecessary and we can simply clarify the if condition
to remove the else clause. It is more readable.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 42e5e8597a1a..4766c3023fed 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -275,10 +275,7 @@  do
 	shift
 done
 
-if test -n "$dryrun" || test -z "$TORTURE_INITRD" || tools/testing/selftests/rcutorture/bin/mkinitrd.sh
-then
-	:
-else
+if test -z "$dryrun" && test -n "$TORTURE_INITRD" && !tools/testing/selftests/rcutorture/bin/mkinitrd.sh
 	echo No initrd and unable to create one, aborting test >&2
 	exit 1
 fi