theboocock / shunit2

Automatically exported from code.google.com/p/shunit2
0 stars 0 forks source link

breaks if /tmp is mounted noexec #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Getting this:

src/shell/shunit2: /tmp/shunit.LpTQbv/oneTimeSetUp: /bin/sh: bad interpreter: 
Permission denied
src/shell/shunit2: /tmp/shunit.LpTQbv/suite: /bin/sh: bad interpreter: 
Permission denied
src/shell/shunit2: /tmp/shunit.LpTQbv/setUp: /bin/sh: bad interpreter: 
Permission denied

Guessing it's because of this:

/dev/sda2 on /tmp type ext3 
(rw,noexec,noatime,nodiratime,data=ordered,commit=300)

Maybe the temp dir could be made inside the current directory by default?

Original issue reported on code.google.com by mikelwar...@gmail.com on 4 Oct 2010 at 2:00

GoogleCodeExporter commented 9 years ago
I don't particularly like that idea.  Since mounting /tmp noexec is a 
customisation, why not set your TMPDIR to something that will work for this 
specific case? I'm not sure this should be 'fixed' in the source.

Original comment by jon.dowl...@gmail.com on 2 Nov 2010 at 4:00

GoogleCodeExporter commented 9 years ago
Yeah, you're probably right.  Changing TMPDIR is how I got it working.

Original comment by mikelwar...@gmail.com on 2 Nov 2010 at 10:02

GoogleCodeExporter commented 9 years ago
I agree that overriding the TMPDIR is the correct solution. The user won't know 
that instinctively though, so I added a check with a message to declare a 
TMPDIR variable.

Fixed in CL# 316

Original comment by kate.war...@gtempaccount.com on 15 Mar 2011 at 12:04