From b80c653c6635096345ec453bfe9445a82b7ab049 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Tue, 25 Feb 2025 22:27:36 +0000
Subject: [PATCH 1/2] pg_upgrade: fix --set-char-signedness failure test

The test had the option misspelled with only one dash, which fails, but
not with the expected message. Since pg_upgrade gives its error messages
on stdout(?!), use command_checks_all() instead of command_fails_like().
---
 src/bin/pg_upgrade/t/005_char_signedness.pl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/bin/pg_upgrade/t/005_char_signedness.pl b/src/bin/pg_upgrade/t/005_char_signedness.pl
index c024106863e..d186822ac77 100644
--- a/src/bin/pg_upgrade/t/005_char_signedness.pl
+++ b/src/bin/pg_upgrade/t/005_char_signedness.pl
@@ -41,7 +41,7 @@ command_like(
 	'updated default char signedness is unsigned in control file');
 
 # Cannot use --set-char-signedness option for upgrading from v18+
-command_fails(
+command_checks_all(
 	[
 		'pg_upgrade', '--no-sync',
 		'-d', $old->data_dir,
@@ -51,9 +51,12 @@ command_fails(
 		'-s', $new->host,
 		'-p', $old->port,
 		'-P', $new->port,
-		'-set-char-signedness', 'signed',
+		'--set-char-signedness', 'signed',
 		$mode
 	],
+	1,
+	[qr/--set-char-signedness option cannot be used/],
+	[],
 	'--set-char-signedness option cannot be used for upgrading from v18 or later'
 );
 
-- 
2.43.0

