I believe that shared memory test is failing because the value of KEY is being set as 0xdeadbeef, which when treated as a signed integer becomes a negative value. Due to this the following check in gshmget () fails:
if (key < 0 || size == 0) (key is considered as a signed integer)
The change is to set KEY value to 0x7eadbeef, a non-negative number. With this change, it is working fine for me.
Fixes the KEY in shm test