| 1 |
/* COVERAGE: personality */ |
| 2 |
|
| 3 |
#include <sys/personality.h> |
| 4 |
#include <linux/version.h> |
| 5 |
|
| 6 |
int main() |
| 7 |
{ |
| 8 |
// The type of personality argument changed in upstream |
| 9 |
// commit 485d5276 from ulong to uint32. This patch is |
| 10 |
// present in vanila kernel v2.6.35-rc2~25. But apparently |
| 11 |
// it got backported to rhel6 distribution kernels 2.6.32. |
| 12 |
// So expecting uint32 here and letting this fail on rhel5. |
| 13 |
|
| 14 |
personality(0xffffffff); |
| 15 |
//staptest// personality (0xffffffff) = NNNN |
| 16 |
|
| 17 |
personality(0x12345678); |
| 18 |
//staptest// personality (0x12345678) = NNNN |
| 19 |
|
| 20 |
personality(-1); |
| 21 |
//staptest// personality (0xffffffff) = NNNN |
| 22 |
|
| 23 |
return 0; |
| 24 |
} |