-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35728/
-----------------------------------------------------------

(Updated June 27, 2015, 4:37 p.m.)


Review request for mesos and Adam B.


Bugs: MESOS-2199
    https://issues.apache.org/jira/browse/MESOS-2199


Repository: mesos


Description
-------

Fix failing test: SlaveTest.ROOT_RunTaskWithCommandInfoWithUser.


Diffs
-----

  src/tests/slave_tests.cpp 50301983c674ef50a64294816db9587bf065aa9e 

Diff: https://reviews.apache.org/r/35728/diff/


Testing (updated)
-------

### 1. Reproduce problem in old code

```bash
# Enter mesos source directory and remove build directory
cd mesos && rm -rf build
# Rebuild mesos
mkdir -p build && ./bootstrap && cd build && ../configure
# Run the single test
make -j8 check GTEST_FILTER="SlaveTest.ROOT_RunTaskWithCommandInfoWithUser"
```
When running this test case, the mesos containier running under user `nobody`. 
And when the containier start `build/src/mesos-executor`, 
`build/src/mesos-executor` would check the `build/src/.libs/lt-mesos-executor` 
exists or not. Because we never running other test cases before, 
`build/src/.libs/lt-mesos-executor` is not exists here. And then 
`build/src/mesos-executor` would try to compile and generate 
`build/src/.libs/lt-mesos-executor`. Because `build/src/mesos-executor` is 
running under user `nobody`, it don't have permissions to output files to 
`build` directory. This test cases failed finally.

### 2. My way to fix this problem

I start a prepare task with root first. And after this task finished with 
success, we could sure that `build/src/.libs/lt-mesos-executor` is exists. So 
when we start `build/src/mesos-executor` with user `nobody`, it not need to 
generate `build/src/.libs/lt-mesos-executor`. And then it could finish its 
tasks successfully.


Thanks,

haosdent huang

Reply via email to