assert that the write writes the whole packet

As a side effect this should avoid an unsigned signed failure in
jenkins.

Change-Id: I8e6a9c3dbd4252d37e6325f95fc80e49ce4cc59e