master,tests: Read-only exports tests and fixes

Ensure read-only exports can be read but not written to.

Change-Id: I148acfff8fd6acd9f511d0159fe72f7c47d43370