Closed Bug 1137669 Opened 9 years ago Closed 9 years ago

003safesys.t doesn't test any file due to a missing -T argument (and broken syntax in Support::Systemexec)

Categories

(Bugzilla :: Testing Suite, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(2 files)

While investigating bug 1116118 comment 7, I found why 003safesys.t is behaving strangely in master. There are 2 bugs:

- scripts are invoked without the -T argument, making all scripts to be skipped. This bug exists since 003safesys.t exists, i.e. since Bugzilla 2.16, see bug 97976.

- since Bugzilla 5.0, we require Perl 5.10.1 and now t/Support/Systemexec.pm syntax is no longer valid, because bug 996893 added |use strict| to it, and this module was very badly written. This makes all tests to abort too.


We should fix these problems before gerv starts optimizing a broken 003safesys.t script. :)
Flags: blocking5.0?
Attachment #8570443 - Flags: review?(dylan)
Attachment #8570443 - Attachment description: patch, v1 → patch for 5.x, v1
This patch is for Bugzilla 4.x. It doesn't require t/Support/Systemexec.pm to be fixed as we don't enforce strictness in 4.x.
Attachment #8570447 - Flags: review?(dylan)
Flags: blocking5.0? → blocking5.0+
Comment on attachment 8570443 [details] [diff] [review]
patch for 5.x, v1

Review of attachment 8570443 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan

I hope to replace this test with a sufficiently decent Perl Critic setup. This is the third weirdest abuse of subroutine prototypes I have ever seen.
Attachment #8570443 - Flags: review?(dylan) → review+
Comment on attachment 8570447 [details] [diff] [review]
patch for 4.x, v1

Review of attachment 8570447 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan
Attachment #8570447 - Flags: review?(dylan) → review+
Flags: approval?
Flags: approval5.0?
Flags: approval4.4?
As 003safesys.t is about security, I think it should land in 4.0 and 4.2 too.
Flags: approval4.2?
Flags: approval4.0?
This patch is not needed on master as 003safesys.t has been merged with 001compile.t, see bug 1137674.
Flags: approval?
Actually, for master, I just need changes made in t/Support/Systemexec.pm.
Flags: approval?
(In reply to Frédéric Buclin from comment #5)
> As 003safesys.t is about security, I think it should land in 4.0 and 4.2 too.

sure, but there's no need to cut a release specifically for this; it can ride along with the next security release.
Flags: approval?
Flags: approval5.0?
Flags: approval5.0+
Flags: approval4.4?
Flags: approval4.4+
Flags: approval4.2?
Flags: approval4.2+
Flags: approval4.0?
Flags: approval4.0+
Flags: approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   56d130c..694d136  master -> master

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   c26e64e..f5fb20f  5.0 -> 5.0

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   f0c2b6b..fc4a6dd  4.4 -> 4.4

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   44a9c6d..6cfdba0  4.2 -> 4.2

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   d5f0eb4..3961356  4.0 -> 4.0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: