/* * 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 mq_open() fails with ENAMETOOLONG if a component of the * name is greater than NAME_MAX. * * Since a component == the full name, this test will be identical to * 27-1.c for NAME_MAX. */ #include #include #include #include #include #include #include #include #include #include "posixtest.h" int main() { char qname[NAME_MAX*2]; mqd_t queue; int i; sprintf(qname, "/mq_open_27-1_%d", getpid()); //Ensures queue name will have > NAME_MAX chars for(i=0;i