On Tue, Apr 12, 2016 at 02:57:46PM +0800, Fei Jie wrote: [...] > --- /dev/null > +++ b/tests/shmxt.c > @@ -0,0 +1,27 @@ > +#include "tests.h" > +#include <errno.h> > +#include <stdio.h> > +#include <sys/shm.h> > + > +int > +main(void) > +{ > + int id = shmget(IPC_PRIVATE, 1, 0600); > + if (id < 0) > + perror_msg_and_fail("shmget");
There are kernels built without CONFIG_SYSVIPC enabled, so this error shouldn't be treated as fatal. > + void *shmaddr = shmat(id, NULL, 0); Please also test some SHM_* flags decoding. > + if (shmaddr == (void *)(-1)) > + perror_msg_and_fail("shmat"); All resources allocated by shmget must be explicitly released, see e.g. tests/ipc_shm.c -- ldv
pgpTSTk1XQjF9.pgp
Description: PGP signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel