/* * Copyright (c) 2003, Intel Corporation. All rights reserved. * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. */ /* * Test that EMSGSIZE is returned if msg_len is not <= mq_attr->mq_msgsize. */ #include #include #include #include #include #include #include #include #include #include #include "posixtest.h" #define NAMESIZE 50 #define MSGSTR "01234567890123456789" #define NUMINVALID 3 static long messagesize[NUMINVALID] = { 19, 2, 1 }; int main() { char qname[NAMESIZE]; const char *msgptr = MSGSTR; struct timespec ts; mqd_t queue; int unresolved=0, failure=0, i; struct mq_attr attr; sprintf(qname, "/mq_timedsend_14-1_%d", getpid()); ts.tv_sec=time(NULL); ts.tv_nsec=0; for (i=0; i