1 |
On Mon, 11 May 2009 23:29:10 +1200 |
2 |
Alistair Bush <ali_bush@g.o> wrote: |
3 |
|
4 |
> I would assume it would be better to directly test whether the user is |
5 |
> root, than test that userpriv is set? |
6 |
|
7 |
AFAIK: |
8 |
|
9 |
if [[ ${EUID} -eq 0 ]]; then |
10 |
rootstuff |
11 |
else |
12 |
nonrootstuff |
13 |
fi |
14 |
|
15 |
But for tests that fail with userpriv just because they don't have the proper |
16 |
permissions you can usually just use a -r or -w test. |
17 |
( eg. [[ -w ${S}/testdir/runtestsdir ]] || skiptest ) |
18 |
|
19 |
Bonus points for patching this into the test itself and getting it upstream. |
20 |
|
21 |
|
22 |
-- |
23 |
gcc-porting, by design, by neglect |
24 |
treecleaner, for a fact or just for effect |
25 |
wxwidgets @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 |