Bug 10489 - "test_1_logrotate_setup" fails on second run of test image due existing files
Summary: "test_1_logrotate_setup" fails on second run of test image due existing files
Status: RESOLVED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.3 M2
Assignee: Jose Perez C
QA Contact: Juan Ramos
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-10-24 16:16 UTC by Jose Perez C
Modified: 2017-01-17 13:59 UTC (History)
0 users

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 Jose Perez C 2016-10-24 16:16:30 UTC
A cleanup is needed on logrotate, on second execution is failing:

1.- Add below info to conf/local.conf

INHERIT += "testimage"
TEST_TARGET = "simpleremote"
TEST_SERVER_IP = "HOST ip" --> IP of the machine being used to launch tests
TEST_TARGET_IP = "DUT ip"  --> IP of the device under test
TEST_SUITES = "logrotate"

2.- run `bitbake core-image-sato-sdk -c testimage`
3.- run again `bitbake core-image-sato-sdk -c testimage`

Expected Results:
   All test cases should be PASS

Actual Result:

======================================================================
FAIL: test_1_logrotate_setup (oeqa.runtime.logrotate.LogrotateTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokylsbx86-x64/meta/lib/oeqa/utils/decorators.py", line 97, in wrapped_f
    return f(*args, **kwargs)
  File "/home/pokylsbx86-x64/meta/lib/oeqa/runtime/logrotate.py", line 18, in test_1_logrotate_setup
    self.assertEqual(status, 0, msg = "Could not create logrotate_dir. Output: %s" % output)
AssertionError: 1 != 0 : Could not create logrotate_dir. Output: mkdir: cannot create directory '/home/root/logrotate_dir': File exists

----------------------------------------------------------------------

===================== STEPS ===================================
Comment 1 Jose Perez C 2017-01-06 20:38:02 UTC
Patch sent to the list 

http://lists.openembedded.org/pipermail/openembedded-core/2017-January/130845.html
Comment 2 Jose Perez C 2017-01-17 13:59:16 UTC
this was already merged on master 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=970b76a728509854ee5048f4e2ee8cdab827f25f