Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yath can't always handle mixed taint tests #252

Open
toddr opened this issue Jul 13, 2022 · 0 comments
Open

yath can't always handle mixed taint tests #252

toddr opened this issue Jul 13, 2022 · 0 comments

Comments

@toddr
Copy link
Collaborator

toddr commented Jul 13, 2022

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 :(

@atoomic atoomic pinned this issue Jul 13, 2022
@atoomic atoomic unpinned this issue Jul 13, 2022
@toddr toddr changed the title yath can't always handled mixed taint tests yath can't always handle mixed taint tests Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant