Bug 7976 - Image feature tests should not be touching user's ~/.ssh/known_hosts file
Summary: Image feature tests should not be touching user's ~/.ssh/known_hosts file
Status: VERIFIED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium normal
Target Milestone: 1.9 M2
Assignee: Daniel Istrate
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks: 8176
  Show dependency tree
 
Reported: 2015-07-09 09:32 UTC by Paul Eggleton
Modified: 2016-01-19 10:07 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2015-07-09 09:32:41 UTC
A failure on the autobuilder made me notice that the tests for SSH logins are touching the user's ~/.ssh/known_hosts file:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/67/steps/Running%20oe-selftest/logs/stdio

We should *never* be writing to user configuration files like this. Probably the easiest alternative is to pass "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" as we do in the oe-selftest tests for devtool.
Comment 1 Daniel Istrate 2015-07-14 08:58:55 UTC
Hi Paul,

I updated the testcases as you suggested.
Also the testcases now determine the qemu ip address dynamically in order to be able to ssh into it, so they don't assume 192.168.7.2 any more.

--Daniel
Comment 2 Daniel Istrate 2015-07-14 09:09:40 UTC
Code review is needed.
Comment 3 Daniel Istrate 2015-07-14 09:10:16 UTC
Waiting for code review.
Comment 4 Ross Burton 2015-07-23 10:44:22 UTC
Fixed in oe-core f58df3a630b774083934171463b2b07add29dc0e.
Comment 5 Costin 2016-01-19 10:07:36 UTC
Hello,

Checked for last version of test cases in master (839fb1893546ad58a1f5475a9e852b81afb056d6) under poky/meta/lib/oeqa/selftest/imagefeatures.py and no ssh command touches any file from ~/.ssh

Marking as verified.