yath can't always handle mixed taint tests

Open
#252 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
perl
Domain
testing-qa

Research direction

Reproduce the discrepancy with the four examples in t/aaaaaaaaaaaaaaaa.t and t/aaaaaaaaaaaaaaaa_b.t, comparing prove t/aaa*.t with yath test t/aaa*.t. Trace how yath groups these test files and handles their mixed taint modes. Done means both tests pass under yath without relying on HARNESS directives, as they do under prove.

Written by the indexing model from the issue text.

Description

t/aaaaaaaaaaaaaaaa.t

#!/usr/bin/perl -T

print "1..1\n";
print "not " unless ${^TAINT};
print "ok - perl is in taint mode\n";

t/aaaaaaaaaaaaaaaa_b.t

#!/usr/bin/perl

print "1..1\n";
print "not " if ${^TAINT};
print "ok - perl is NOT in taint mode\n";
$>prove  t/aaa*.t  
t/aaaaaaaaaaaaaaaa_b.t .. ok   
t/aaaaaaaaaaaaaaaa.t .... ok   
All tests successful.
Files=2, Tests=2,  0 wallclock secs ( 0.02 usr +  0.01 sys =  0.03 CPU)
Result: PASS
$>yath test t/aaa*.t          
( PASSED )  job  1    t/aaaaaaaaaaaaaaaa.t
[  FAIL  ]  job  2  + perl is NOT in taint mode
( FAILED )  job  2    t/aaaaaaaaaaaaaaaa_b.t
< REASON >  job  2    Assertion failures were encountered (Count: 1)

The following jobs failed:
+--------------------------------------+------------------------+
| Job ID                               | Test File              |
+--------------------------------------+------------------------+
| 4DC99250-02FB-11ED-9D0E-330477E8B6D3 | t/aaaaaaaaaaaaaaaa_b.t |
+--------------------------------------+------------------------+

                                Yath Result Summary
-----------------------------------------------------------------------------------
     Fail Count: 1
     File Count: 2
Assertion Count: 2
      Wall Time: 0.62 seconds
       CPU Time: 0.94 seconds (usr: 0.31s | sys: 0.05s | cusr: 0.49s | csys: 0.09s)
      CPU Usage: 151%
    -->  Result: FAILED  <--

What's Funky about all of this is that when I named the 2 tests t/a.t and t/b.t, yath didn't have trouble so there's some sort of grouping going on that is causing problems.

No amount of # HARNESS... directives could make this problem go away :(

Dominant language
Perl
Stars
28
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Test-More/Test2-Harness

All issues in Test-More/Test2-Harness

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.