Bug 7976

Summary: Image feature tests should not be touching user's ~/.ssh/known_hosts file
Product: [QA/Testing] Runtime Testing Reporter: Paul Eggleton <bluelightning>
Component: generalAssignee: Daniel Istrate <daniel.alexandrux.istrate>
Status: VERIFIED FIXED QA Contact: Costin <costin.c.constantin>
Severity: normal    
Priority: Medium CC: ross.burton
Version: 1.7   
Target Milestone: 1.9 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 8176    

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.