Bug 9204 - Cleanup should be made after testing smart
Summary: Cleanup should be made after testing smart
Status: RESOLVED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M3
Assignee: Plauchu Edwin
QA Contact: Francisco Pedraza
URL:
Whiteboard:
: 8988 9776 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-03 11:52 UTC by Cristina Agurida
Modified: 2016-09-13 15:54 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
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 Cristina Agurida 2016-03-03 11:52:33 UTC
When trying to retest some smart tests they are failing because the artifacts are already present in image. 
A solution to avoid this failures could be to cleanup those artifacts (oeqa/runtime/rpm.py and oeqa/runtime/smart.py) before retesting smart.

To reproduce this:

1. Prepare testing environment
2. Set TEST_SUITES = "smart rpm"

launch testing: bitbake -c testimage core-image-sato-sdk (everything will be OK)
and after, re-launch again tests.
Comment 1 Richard Purdie 2016-09-07 09:00:54 UTC
Note that to reproduce this under qemu, you'd need to disable the copying of the image so that the same image gets reused multiple times. If you don't do that, a fresh copy of the image is used each time under qemu and the changes are lost. See my "snapshot" changes to runqemu for examples of how that can be turned on/off.
Comment 2 Plauchu Edwin 2016-09-07 22:40:11 UTC
Getting this error (it was gotten by testing over physical hardware "beaglebone black")
anybody knows If this is the error reported ?


| ======================================================================
| FAIL: test_rpm_query_nonroot (oeqa.runtime.rpm.RpmInstallRemoveTest)
| ----------------------------------------------------------------------
| Traceback (most recent call last):
|   File "/home/pianodaemon/GIT_REPOS/QA_POKY_QEMU_32_64/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
|     return func(*args, **kwargs)
|   File "/home/pianodaemon/GIT_REPOS/QA_POKY_QEMU_32_64/meta/lib/oeqa/utils/decorators.py", line 97, in wrapped_f
|     return f(*args, **kwargs)
|   File "/home/pianodaemon/GIT_REPOS/QA_POKY_QEMU_32_64/meta/lib/oeqa/runtime/rpm.py", line 55, in test_rpm_query_nonroot
|     self.assertTrue(status == 0, msg="Failed to create new user: " + output)
| AssertionError: False is not true : Failed to create new user: useradd: user 'test1' already exists
| 
| ----------------------------------------------------------------------
| Ran 52 tests in 1121.844s
| 
| FAILED (failures=2)
| DEBUG: Python function do_testimage finished
| ERROR: Function failed: core-image-sato-sdk - FAILED - check the task log and the ssh log
ERROR: Task (/home/pianodaemon/GIT_REPOS/QA_POKY_QEMU_32_64/meta/recipes-sato/images/core-image-sato-sdk.bb:do_testimage) failed with exit code '1'
NOTE: Tasks Summary: Attempted 64 tasks of which 63 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/pianodaemon/GIT_REPOS/QA_POKY_QEMU_32_64/meta/recipes-sato/images/core-image-sato-sdk.bb:do_testimage
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 4 Ross Burton 2016-09-08 11:06:39 UTC
*** Bug 9776 has been marked as a duplicate of this bug. ***
Comment 5 Ross Burton 2016-09-08 11:27:25 UTC
*** Bug 8988 has been marked as a duplicate of this bug. ***
Comment 6 Plauchu Edwin 2016-09-09 15:48:06 UTC
Patch V2 submitted at
http://lists.openembedded.org/pipermail/openembedded-core/2016-September/126350.html