public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <adamwill@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/openqa] f45: Backport #7657 to fix tests on perl 5.44+
Date: Thu, 03 Sep 2026 21:43:45 GMT [thread overview]
Message-ID: <178847182576.1.11517201203850517168.rpms-openqa-54ea4a1114ba@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/openqa
Branch : f45
Commit : 54ea4a1114ba8240b8733ce4144a5b7619b3639f
Author : Adam Williamson <adamwill@fedoraproject.org>
Date : 2026-09-03T14:42:56-07:00
Stats : +139/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/openqa/c/54ea4a1114ba8240b8733ce4144a5b7619b3639f?branch=f45
Log:
Backport #7657 to fix tests on perl 5.44+
---
diff --git a/0001-fix-Escape-sign-in-strings-and-regexes.patch b/0001-fix-Escape-sign-in-strings-and-regexes.patch
new file mode 100644
index 0000000..ba0e014
--- /dev/null
+++ b/0001-fix-Escape-sign-in-strings-and-regexes.patch
@@ -0,0 +1,135 @@
+From 5397a2ff7a6f0446bf23aacaadcf052aa54c5f7b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tina=20M=C3=BCller?= <tina.mueller@suse.com>
+Date: Tue, 21 Jul 2026 13:10:39 +0200
+Subject: [PATCH] fix: Escape `@` sign in strings and regexes
+
+In perl 5.44, handling of the `@` sign changed, and in a string like
+ "foo@64bit"
+
+the `@64` would just disappear.
+
+From perldoc perldelta:
+> Fixed parsing of array names starting with a digit in double-quotish context
+> under use utf8;.
+
+For
+
+ "foo@bar"
+
+strict would complain that `@bar` doesn't exist, but for numbers it just
+silently dissppears.
+
+Example error message from Factory:
+
+ # Failed test 'job template name reflected in scenario name'
+ # at t/api/04-jobs.t line 1300.
+ # '00100020-opensuse-Tumbleweed-DVD-aarch64-Build1234-foo@64bit'
+ # doesn't match '(?^u:\d+-opensuse-Tumbleweed-DVD-aarch64-Build1234-foobit)'
+ # Looks like you failed 1 test of 3.
+
+Example how it worked in perl 5.42:
+
+ % perl -wE'use utf8; $s = "foo@64bit";say $s'
+ foo@64bit
+ % perl -wE'$s = "foo@64bit";say $s'
+ foobit
+---
+ t/25-cache.t | 15 ++++++++-------
+ t/25-downloader.t | 2 +-
+ t/api/04-jobs.t | 2 +-
+ 3 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/t/25-cache.t b/t/25-cache.t
+index 028eb6614..6692b813a 100644
+--- a/t/25-cache.t
++++ b/t/25-cache.t
+@@ -145,7 +145,7 @@ ok -e $pending_asset, 'Not so old asset (3.qcow2) was preserved (despite not bei
+ $cache_log = '';
+
+ $cache->get_asset($host, {id => 922756}, 'hdd', 'sle-12-SP3-x86_64-0368-textmode@64bit.qcow2');
+-my $from = "http://$host/tests/922756/asset/hdd/sle-12-SP3-x86_64-0368-textmode@64bit.qcow2";
++my $from = "http://$host/tests/922756/asset/hdd/sle-12-SP3-x86_64-0368-textmode\@64bit.qcow2";
+ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-textmode\@64bit.qcow2" from "$from"/, 'Asset download attempt';
+ like $cache_log, qr/failed: Connection refused/, 'Asset download fails with: Connection refused';
+ $cache_log = '';
+@@ -223,7 +223,7 @@ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-503\@64bit.qcow2" from/,
+ like $cache_log, qr/Download of ".*0368-503\@64bit.qcow2" failed: 503 Service Unavailable/,
+ 'Asset download fails with 503 - Server not available';
+ like $cache_log, qr/Download error 503, waiting 0.01 seconds for next try \(4 remaining\)/, '4 tries remaining';
+-like $cache_log, qr/Purging ".*-503@64bit.qcow2" because of too many download errors/,
++like $cache_log, qr/Purging ".*-503\@64bit.qcow2" because of too many download errors/,
+ 'Bailing out after too many retries';
+ ok !-e $cachedir->child($host, 'sle-12-SP3-x86_64-0368-503@64bit.qcow2'), 'Asset does not exist in cache';
+ $cache_log = '';
+@@ -241,12 +241,13 @@ $cache_log = '';
+
+ $cache->get_asset($host, {id => 922756}, 'hdd', 'sle-12-SP3-x86_64-0368-200@64bit.qcow2');
+ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-200\@64bit.qcow2" from/, 'Asset download attempt';
+-like $cache_log, qr/Content of ".*0368-200@64bit.qcow2" has not changed, updating last use/, 'Content has not changed';
++like $cache_log, qr/Content of ".*0368-200\@64bit.qcow2" has not changed, updating last use/, 'Content has not changed';
+ $cache_log = '';
+
+ $cache->get_asset($host, {id => 922756}, 'hdd', 'sle-12-SP3-x86_64-0368-200@64bit.qcow2');
+ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-200\@64bit.qcow2" from/, 'Asset download attempt';
+-like $cache_log, qr/Content of ".*-0368-200@64bit.qcow2" has not changed, updating last use/, 'Content has not changed';
++like $cache_log, qr/Content of ".*-0368-200\@64bit.qcow2" has not changed, updating last use/,
++ 'Content has not changed';
+ $cache_log = '';
+
+ subtest 'cache purging after successful download' => sub {
+@@ -289,7 +290,7 @@ $cache_log = '';
+
+ $cache->get_asset("http://$host", {id => 922756}, 'hdd', 'sle-12-SP3-x86_64-0368-200@64bit.qcow2');
+ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-200\@64bit.qcow2" from/, 'Asset download attempt';
+-like $cache_log, qr/Content of ".*0368-200@64bit.qcow2" has not changed, updating last use/, 'Content has not changed';
++like $cache_log, qr/Content of ".*0368-200\@64bit.qcow2" has not changed, updating last use/, 'Content has not changed';
+ is $cache->asset($cachedir->child(base_host("http://$host"), 'sle-12-SP3-x86_64-0368-200@64bit.qcow2'))->{pending}, 0,
+ 'Pending flag unset if asset unchanged';
+ $cache_log = '';
+@@ -340,7 +341,7 @@ subtest 'cache directory is symlink' => sub {
+
+ $cache->get_asset($host, {id => 922756}, 'hdd', 'sle-12-SP3-x86_64-0368-200@64bit.qcow2');
+ like $cache_log, qr/Downloading "sle-12-SP3-x86_64-0368-200\@64bit.qcow2" from/, 'Asset download attempt';
+- like $cache_log, qr/Content of ".*0368-200@64bit.qcow2" has not changed, updating last use/,
++ like $cache_log, qr/Content of ".*0368-200\@64bit.qcow2" has not changed, updating last use/,
+ 'Content has not changed';
+ $cache_log = '';
+
+@@ -350,7 +351,7 @@ subtest 'cache directory is symlink' => sub {
+ $cache_log = '';
+
+ $cache->limit(512)->refresh;
+- like $cache_log, qr/Purging ".*200@64bit.qcow2" because we need space for new assets, reclaiming 1024 Byte/,
++ like $cache_log, qr/Purging ".*200\@64bit.qcow2" because we need space for new assets, reclaiming 1024 Byte/,
+ 'Reclaimed 1024 Byte';
+ like $cache_log, qr/Cache size of "$cachedir" is 0 Byte, with limit 512 Byte/, 'Cache limit is 512 Byte';
+ $cache_log = '';
+diff --git a/t/25-downloader.t b/t/25-downloader.t
+index 0fb87cbf9..a7d302728 100644
+--- a/t/25-downloader.t
++++ b/t/25-downloader.t
+@@ -106,7 +106,7 @@ subtest 'Not found' => sub {
+ };
+
+ subtest 'Success' => sub {
+- my $from = "http://$host/tests/922756/asset/hdd/sle-12-SP3-x86_64-0368-200@64bit.qcow2";
++ my $from = "http://$host/tests/922756/asset/hdd/sle-12-SP3-x86_64-0368-200\@64bit.qcow2";
+ is $downloader->download($from, $to), undef, 'Success';
+
+ ok -e $to, 'File downloaded';
+diff --git a/t/api/04-jobs.t b/t/api/04-jobs.t
+index c094e5acf..648cada3e 100644
+--- a/t/api/04-jobs.t
++++ b/t/api/04-jobs.t
+@@ -1292,7 +1292,7 @@ subtest 'Job with JOB_TEMPLATE_NAME' => sub {
+ $t->post_ok('/api/v1/jobs', form => \%jobs_post_params)->status_is(200, 'posted job with job template name');
+ like
+ $jobs->find($t->tx->res->json->{id})->settings_hash->{NAME},
+- qr/\d+-opensuse-Tumbleweed-DVD-aarch64-Build1234-foo@64bit/,
++ qr/\d+-opensuse-Tumbleweed-DVD-aarch64-Build1234-foo\@64bit/,
+ 'job template name reflected in scenario name';
+ delete $jobs_post_params{JOB_TEMPLATE_NAME};
+ };
+--
+2.55.0
+
diff --git a/openqa.spec b/openqa.spec
index 06c28ab..97ddb06 100644
--- a/openqa.spec
+++ b/openqa.spec
@@ -150,6 +150,10 @@ Patch: 0001-fix-Support-invent.kde.org-and-work_items-in-bug-URL.patch
# https://github.com/os-autoinst/openQA/pull/7634
# Drop token equality test that is invalid with Mojolicious 9.48+
Patch: 0001-fix-test-Drop-test-for-token-equality.patch
+# https://github.com/os-autoinst/openQA/pull/7657
+# Escape @ sign in strings and regexes
+# Fixes tests with perl 5.44+
+Patch: 0001-fix-Escape-sign-in-strings-and-regexes.patch
# https://github.com/os-autoinst/openQA/pull/7688
# Add forge.fp.o support for bugurl/bugref stuff
Patch: 0001-fix-Add-forge.fedoraproject.org-to-the-bugurl-bugref.patch
reply other threads:[~2026-09-03 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=178847182576.1.11517201203850517168.rpms-openqa-54ea4a1114ba@fedoraproject.org \
--to=adamwill@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/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