Skip to content
Commit 63583373 authored by Richard Purdie's avatar Richard Purdie Committed by Anuj Mittal
Browse files

oeqa: Update cleanup code to wait for hashserv exit



We sometimes see exceptions from code seeing the hashserv DB files
being removed at directory cleanup time. Add a check to ensure the
hashserv has written the data base journal (and hence likely exited)
before cleaning up.

This will hopefully avoid errors like:

Traceback (most recent call last):
  File "[...]/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 30, in test_libc
    delay = delay - 1
  File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__
    self.cleanup()
  File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup
    _rmtree(self.name)
  File "/usr/lib/python3.6/shutil.py", line 486, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.6/shutil.py", line 424, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib/python3.6/shutil.py", line 444, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.6/shutil.py", line 442, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal'

Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0b07d9ad)
Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
parent 2f9feadd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment