Bug 11115 - Downloading cvs tarball for buildcvs.py selftest shouldn't use /tmp
Summary: Downloading cvs tarball for buildcvs.py selftest shouldn't use /tmp
Status: RESOLVED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3
Assignee: yeoh ee peng
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-01 17:32 UTC by Richard Purdie
Modified: 2017-05-25 15:14 UTC (History)
4 users (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 Richard Purdie 2017-03-01 17:32:22 UTC
The autobuilder normally uses a cached copy of tarballs from DL_DIR if present for the runtime build tests (cvs, iptables and galculator).

If these aren't present, it will download to /tmp/. This is racy as several buiulds may download to the same location and tests can fail. There are two problems:

a) DL_DIR is never populated
b) /tmp/ is used for the temporary file which can race with other builds.

I've added a copy of the tarballs to the new AB so this error won't occur but we need to fix the underlying races and initial populatation.

Its complicated by the same tests being used against the target images and against the sdk/extsdk. We need to fix all cases to be consistent and not use /tmp for tmp files.

NOTE: core-image-sato-sdk-1.0-r0 do_testimage: ======================================================================
NOTE: core-image-sato-sdk-1.0-r0 do_testimage: ERROR [0.000s]: setUpClass (buildcvs.BuildCvsTest)
NOTE: core-image-sato-sdk-1.0-r0 do_testimage: ----------------------------------------------------------------------
NOTE: core-image-sato-sdk-1.0-r0 do_testimage: Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc/build/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass
    clss.setUpClassMethod()
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc/build/meta/lib/oeqa/runtime/cases/buildcvs.py", line 17, in setUpClass
    cls.project.download_archive()
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc/build/meta/lib/oeqa/runtime/utils/targetbuildproject.py", line 17, in download_archive
    status, output = self.target.copyTo(self.localarchive, self.targetdir)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc/build/meta/lib/oeqa/core/target/ssh.py", line 103, in copyTo
    return self._run(scpCmd, ignore_status=False)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc/build/meta/lib/oeqa/core/target/ssh.py", line 61, in _run
    "status %d:\n%s" % (command, status, output))
AssertionError: Command '['scp', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'LogLevel=ERROR', '/tmp/cvs-1.12.13.tar.bz2', 'root@192.168.7.10:~/']' returned non-zero exit status 1:
/tmp/cvs-1.12.13.tar.bz2: No such file or directory
Comment 1 Ross Burton 2017-05-25 15:14:56 UTC
oe-core c43c966e0ed4ed836bdf90b1d4c3f2f45426f1ec fixed this.

    oeqa/utils/targetbuild: tmp dir improvements

    Don't hard-code /tmp as the tmpdir, instead use WORKDIR as the tmpdir if the
    instantiater doesn't specify a value.