public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 2/2] tests: prevent uninitialized value warning with undef as fqdn
Date: Tue, 30 Apr 2024 17:18:47 +0200	[thread overview]
Message-ID: <20240430151847.568829-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20240430151847.568829-1-s.ivanov@proxmox.com>

cosmetic issue - but was distracting enough to make me look if there's
an error.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 test/parse-fqdn.pl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/parse-fqdn.pl b/test/parse-fqdn.pl
index 6638fbe..47e0e21 100755
--- a/test/parse-fqdn.pl
+++ b/test/parse-fqdn.pl
@@ -24,9 +24,10 @@ sub is_parsed {
 sub is_invalid {
     my ($fqdn, $expected_err) = @_;
 
+    my $print_fqdn = $fqdn // '(undefined)';
     my $parsed = eval { parse_fqdn($fqdn) };
-    is($parsed, undef, "invalid FQDN did fail parsing: $fqdn");
-    is($@, $expected_err, "invalid FQDN threw correct error: $fqdn");
+    is($parsed, undef, "invalid FQDN did fail parsing: $print_fqdn");
+    is($@, $expected_err, "invalid FQDN threw correct error: $print_fqdn");
 }
 
 is_invalid(undef, ERR_EMPTY);
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      parent reply	other threads:[~2024-04-30 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 15:18 [pve-devel] [PATCH installer 0/2] fix 2 cosmetic glitches with the tests Stoiko Ivanov
2024-04-30 15:18 ` [pve-devel] [PATCH installer 1/2] d/control: add geoip-bin to Build-Depends Stoiko Ivanov
2024-04-30 15:18 ` Stoiko Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430151847.568829-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal