I'm writing a ptrace based debugging/testing suite for an embedded application. The application runs on raraspbery-pi-like hardware and writes directly to the Linux framebuffer, without any display server involved. The testing suite should run on usual Linux/Amd64 with X-server. The main goal is that I don't want to change the source of the app and test it like it would run in the field.
Running this app in a X-session could cause the x-Server to crash and changing the app isn't an option right now. Hence my idea is, to redirect writes from the app to /dev/fb0 and generate some sort of image or stream of it. This interception of calls to open/ioctl/mmap could be done by using ptrace and/or LD_PRELOAD.
I'm not quite sure if this works at all. Isn't it possible on Linux to create a "faked" /dev/fbX device, or is there maybe an existing tool which I haven't found yet?