(1) This sounds like a hack, should we be concerned?
25 + // sleeping between calls to fake_devices hides race conditions
The sleep call already exists, so it's functionally no worse. Only the new comment could concern the reader.
(2) It's probably better practice to keep "<" instead of "!=" in loops like this:
for (int i = 0; i != device_change_count; ++i)
Because that protects you from potential changes to i's initial conditions or increment.
Although if this fixes the bug then neither of those issues are worth blocking on.
(1) This sounds like a hack, should we be concerned?
25 + // sleeping between calls to fake_devices hides race conditions
The sleep call already exists, so it's functionally no worse. Only the new comment could concern the reader.
(2) It's probably better practice to keep "<" instead of "!=" in loops like this: change_ count; ++i)
for (int i = 0; i != device_
Because that protects you from potential changes to i's initial conditions or increment.
Although if this fixes the bug then neither of those issues are worth blocking on.