File indexing completed on 2025-05-11 08:24:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifdef HAVE_CONFIG_H
0011 #include "config.h"
0012 #endif
0013
0014 #include <sys/stat.h>
0015 #include <stdio.h>
0016 #include <fcntl.h>
0017 #include <errno.h>
0018 #include <unistd.h>
0019
0020 #include "tmacros.h"
0021
0022 const char rtems_test_name[] = "SPFIFO 1";
0023
0024
0025 rtems_task Init(rtems_task_argument argument);
0026
0027 #define FIFO_PATH "/fifo01"
0028
0029 static void test_main(void)
0030 {
0031 mode_t rwx = S_IRWXU | S_IRWXG | S_IRWXO;
0032 int status;
0033
0034 TEST_BEGIN();
0035
0036 puts(
0037 "\nConfiguration: Pipes disabled.\n"
0038 "Creating named fifo '" FIFO_PATH "'.\n"
0039 "Must result in failure since pipes are disabled in the configuration."
0040 );
0041
0042 errno = 0;
0043 status = mkfifo(FIFO_PATH, rwx);
0044 rtems_test_assert(status == -1);
0045 rtems_test_assert(errno == ENOSYS);
0046
0047 errno = 0;
0048 status = mknod(FIFO_PATH, S_IFIFO | rwx, 0);
0049 rtems_test_assert(status == -1);
0050 rtems_test_assert(errno == ENOSYS);
0051
0052 TEST_END();
0053 }
0054
0055 rtems_task Init(rtems_task_argument not_used)
0056 {
0057 test_main();
0058 rtems_test_exit(0);
0059 }
0060
0061 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
0062 #define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
0063
0064 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 4
0065
0066 #define CONFIGURE_MAXIMUM_TASKS 1
0067
0068 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
0069
0070 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
0071
0072 #define CONFIGURE_INIT
0073
0074 #include <rtems/confdefs.h>