[PATCH] make smoke_db_prefix a temp directory by default so the tests can be run as non-root

16 views
Skip to first unread message

Pedro Larroy

unread,
Apr 18, 2012, 1:51:34 PM4/18/12
to mongo...@googlegroups.com
otherwise scons smoke requires root if used as specified in the http://www.mongodb.org/display/DOCS/Smoke+Tests
smoke_db_prefix.diff

Andy Schwerin

unread,
Apr 18, 2012, 1:54:45 PM4/18/12
to mongo...@googlegroups.com
IIRC, the alternative is to give the dev user/group write access to /data/db?

I haven't audited all of the tests in the suite, but I'm concerned that a number of the don't respect that prefix.  Have you checked?

-Andy

On Wed, Apr 18, 2012 at 1:51 PM, Pedro Larroy <pedro.lar...@gmail.com> wrote:
otherwise scons smoke requires root if used as specified in the http://www.mongodb.org/display/DOCS/Smoke+Tests

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-dev/-/KEv6eP90d4cJ.
To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-dev?hl=en.

Pedro Larroy

unread,
Apr 18, 2012, 2:04:42 PM4/18/12
to mongo...@googlegroups.com
You are right, there's more of this hardcoded path on jstests/disk/dbNoCreate.js for example...   


Pedro.


On Wednesday, April 18, 2012 7:54:45 PM UTC+2, Andy Schwerin wrote:
IIRC, the alternative is to give the dev user/group write access to /data/db?

I haven't audited all of the tests in the suite, but I'm concerned that a number of the don't respect that prefix.  Have you checked?

-Andy

On Wed, Apr 18, 2012 at 1:51 PM, Pedro Larroy <pedro.lar...@gmail.com> wrote:
otherwise scons smoke requires root if used as specified in the http://www.mongodb.org/display/DOCS/Smoke+Tests

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-dev/-/KEv6eP90d4cJ.
To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev+unsubscribe@googlegroups.com.

Andy Schwerin

unread,
Apr 18, 2012, 2:20:04 PM4/18/12
to mongo...@googlegroups.com
Yeah.  What you propose is something I would really like to do, but I haven't found someone with the time to do the necessary audit and updates, yet.

It is work that could be done piecemeal.  The smoke script passes a config object on the command line to every test it runs -- called testData, or something like that.  An interested party who didn't want to take on the whole task could just fix one test at a time, and if we enforce that new tests also follow the convention of getting the dbpath from the testData object, we would be able to switch this on in the not-too-distant future.

As for the patch itself, I was thinking it might be nice to remove the test directory after completion/failure, since they can generate quite a bit of data.  A try:finally: with shutils.rmtree() in the finally block is what I had in mind.

-Andy

To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-dev/-/SFtmmDJCtLIJ.

To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.

Eliot Horowitz

unread,
Apr 19, 2012, 12:18:57 AM4/19/12
to mongo...@googlegroups.com
Sometime you want to look at the data after a failed test.
So that's need to be easy.

>>>> mongodb-dev...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/mongodb-dev?hl=en.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mongodb-dev" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/mongodb-dev/-/SFtmmDJCtLIJ.
>>
>> To post to this group, send email to mongo...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> mongodb-dev...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/mongodb-dev?hl=en.
>
>

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-dev" group.

Reply all
Reply to author
Forward
0 new messages