commit | e0c38eba262a9c92dc5579b11ed446e7097f16f8 | [log] [tgz] |
---|---|---|
author | Martijn Coenen <maco@google.com> | Mon Oct 12 13:26:52 2020 +0200 |
committer | Martijn Coenen <maco@google.com> | Mon Oct 12 16:59:50 2020 +0200 |
tree | fe1a60d33500e7048d251ac96f415d2fbd5866e3 | |
parent | dd66de13ea0461e133070d2a09a7befdd576f427 [diff] |
Use dm.CreateDevice() with a timeout. Using the regular CreateDevice() variant with getDmDeviceByName() has a race-condition that is documented in libdm/dm.h; instead, use the variant with a timeout, which guarantees that the block device exists when it returns. Test: atest AdoptableHostTest Bug: 150935323 Change-Id: Ic06cad9af7c44e23359d95b262f68dba27ddfb3a