TODO: investinage bugs in framebuffer test code