Open MatthiasWeidmann opened 3 years ago
As POSIX host- or usernames are not allowed to contain /
(and many other characters), there are likely more places in labgrid that would fail, so we can't easily change that.
I agree that we should check that more strictly.
@jluebbe : I have added a pull request, but I'm not that familiar with python and your code. I tried checking the tests, but it seems that the test is skipped? Could you please provide me guidance how to test my pull request?
git clone https://github.com/MatthiasWeidmann/labgrid.git
git checkout patch-1
cd labgrid
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
python -m pytest -vvv tests/test_remote_client.py
Output:
====================================================================== test session starts =======================================================================
platform darwin -- Python 3.9.6, pytest-6.1.2, py-1.10.0, pluggy-0.13.1 -- /Users/mw/git/github.com/matthiasweidmann/labgrid/venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/mw/git/github.com/matthiasweidmann/labgrid, configfile: setup.cfg
collected 0 items / 1 skipped
======================================================================= 1 skipped in 0.01s =======================================================================
@MatthiasWeidmann Try: python -m pytest -vvv -ra tests/test_remote_client.py
. This should show you the reason why the tests are skipped. Also please follow the installation instructions and use dev-requirements.txt
instead of requirements.txt
. You should end up with everything you need to run the tests.
Hi,
Setup I'm running labgrid-cooridnator with a self build docker image which uses the master branch https://github.com/labgrid-project/labgrid/commit/41b297faba60f32e4986678554af32dbff83ce98 I checked this by running
git logs
on/opt/labgrid
within the container.For connecting to the coordinator I'm using the official image from hub.docker.com: labgrid/client@sha256:c2808c805d6e14505b5050a1cb493ea1e4ecad81bbde8ce5aaadab0d6cdb8667
Description
If one of the environment variables LG_USERNAME or LG_HOSTNAME contain a
/
, I'm not able to unlock a reserved place (labgrid-client -p + unlock
), nor show the current usage (labgrid-client who
).Procedure
Errors
Personal Conclusion
From what I understand, a
/
should not be allowed in the username or hostname.