The review is fix for Bug 234713.
The simple test program was written to compile on linux and run on linuxulator to be sure, that correct values are returned:
Yep, it could be moved to linux_util.h. Together with DUMMY macro declaration .
The r326282, which cause the user bug was part of my effort to implement xattrs in the linuxulator some time ago, but the process was stacked.
My be I will get back to this topic in the future).