Bug 6665 - t/root_spamd*.t failing when 'sudo' is not available
Summary: t/root_spamd*.t failing when 'sudo' is not available
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Regression Tests (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC All
: P2 minor
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 01:20 UTC by Mark Martinec
Modified: 2019-06-26 06:55 UTC (History)
3 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Check if sudo is installed patch None Giovanni Bechis [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Martinec 2011-09-27 01:20:01 UTC
Looks like the t/root_spamd*.t family of tests is failing
when a 'sudo' command is not available on the host.
Something to do with a tainted PATH I think, needs investigating.
Comment 1 Giovanni Bechis 2019-06-25 06:57:33 UTC
Created attachment 5664 [details]
Check if sudo is installed

If this patch is ok I will take care of similar occurrences in t/root_*
Comment 2 Henrik Krohns 2019-06-25 07:17:17 UTC
Fine by me. I was too lazy to do anything for this. :-D
Comment 3 Kevin A. McGrail 2019-06-25 20:40:20 UTC
+1
Comment 4 Kevin A. McGrail 2019-06-25 20:40:43 UTC
(In reply to Kevin A. McGrail from comment #3)
> +1

To be clear, that's a +1 that Henrik is lazy AND a +1 to the sudo patch :-)
Comment 5 Giovanni Bechis 2019-06-26 06:30:10 UTC
Fixed in commit r1862101.
Comment 6 Henrik Krohns 2019-06-26 06:36:16 UTC
Now that I read it carefully

 plan skip_all => "not running tests as root" unless eval { ($> == 0); };

If it was already checking that effective UID is root, what purpose does sudo even have?
Comment 7 Giovanni Bechis 2019-06-26 06:55:06 UTC
In OpenBSD doas(1) is used instead of sudo(8) (recently ported to FreeBSD as well) so it still makes sense.