blob: 7ebc103f50dd3ca9f11c9c6198fdd908afcac3f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#
# $Id$
#
# COPYRIGHT (c) 1989-1999.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
# http://www.rtems.com/license/LICENSE.
#
This file describes the directives and concepts tested by this test set.
Configuration:
Pipes enabled.
Maximum number of barriers is set to 2.
Coverage concepts:
With number of barriers set to 2, and provided there is sufficient
memory available, fifo_open -> pipe_new must be able to create a new
pipe_control_t successfully.
This test
- Creates a directory /tmp
- Creates a fifo file /tmp/fifo01
- Opens the fifo in read-write mode, covering one of the cases of the
switch statement (this should be successful)
- Closes the fifo
- Opens the file in read-only, non-blocing mode, covering another case
of the switch (this should be successful)
- Closes the fifo
- Opens the file in write-only, non-blocking mode, covering yet
another case in the switch. (this should not be successful, instead,
since we opened the fifo in a WRONLY and NONBLOCK mode, we receive
an ENXIO error)
- fifo_open (pipe_new) maintains a static character variable, which it
uses to create semaphores and barriers. The value of this character
goes from a -> z -> a -> z... To hit the case where z is wrapped
back to a, fifo_open must be called a minimum total of 26
times. This is achieved by repeated opens on the fifo file created.
- After every successful open, the file is closed
- Remove fifo file
- Remove tmp directory
|