~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to tests/library.at

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
])
21
21
AT_CLEANUP
22
22
 
 
23
AT_SETUP([test hash index])
 
24
AT_CHECK([test-hindex], [0], [.....................
 
25
])
 
26
AT_CLEANUP
 
27
 
 
28
AT_SETUP([test atomic operations])
 
29
AT_CHECK([test-atomic])
 
30
AT_CLEANUP
 
31
 
23
32
AT_SETUP([test linked lists])
24
33
AT_CHECK([test-list], [0], [..
25
34
])
103
112
m4_foreach(
104
113
  [testname],
105
114
  [[ctz],
 
115
   [round_up_pow2],
 
116
   [round_down_pow2],
106
117
   [popcount],
107
118
   [log_2_floor],
108
119
   [bitwise_copy],
114
125
   AT_CHECK([test-util testname], [0], [], [])
115
126
   AT_CLEANUP])
116
127
 
117
 
AT_SETUP([test unix socket -- short pathname])
 
128
AT_SETUP([test unix socket, short pathname - C])
118
129
AT_CHECK([test-unix-socket x])
119
130
AT_CLEANUP
120
131
 
123
134
dnl is about 100 bytes.  On Linux, we work around this by indirecting through
124
135
dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround
125
136
dnl for other platforms, so we skip the test there.
126
 
AT_SETUP([test unix socket -- long pathname])
127
 
AT_CHECK([dnl
128
 
    case `uname` in dnl (
129
 
      *[[lL]]inux*)
130
 
        exit 0
131
 
        ;; dnl (
132
 
      *)
133
 
        dnl Magic exit code to tell Autotest to skip this test.
134
 
        exit 77
135
 
        ;;
136
 
    esac
137
 
])
138
 
dnl Linux has a 108 byte limit; this is 150 bytes long.
139
 
mkdir 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
140
 
cd 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
141
 
AT_CHECK([test-unix-socket ../012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/socket socket])
 
137
AT_SETUP([test unix socket, long pathname - C])
 
138
AT_SKIP_IF([test ! -d /proc/self/fd])
 
139
dnl Linux has a 108 byte limit; this is 150 bytes long.
 
140
longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 
141
mkdir $longname
 
142
cd $longname
 
143
AT_CHECK([test-unix-socket ../$longname/socket socket])
 
144
AT_CLEANUP
 
145
 
 
146
AT_SETUP([test unix socket, short pathname - Python])
 
147
AT_SKIP_IF([test $HAVE_PYTHON = no])
 
148
AT_CHECK([$PYTHON $srcdir/test-unix-socket.py x])
 
149
AT_CLEANUP
 
150
 
 
151
dnl Unix sockets with long names are problematic because the name has to
 
152
dnl go in a fixed-length field in struct sockaddr_un.  Generally the limit
 
153
dnl is about 100 bytes.  On Linux, we work around this by indirecting through
 
154
dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround
 
155
dnl for other platforms, so we skip the test there.
 
156
AT_SETUP([test unix socket, long pathname - Python])
 
157
AT_SKIP_IF([test $HAVE_PYTHON = no])
 
158
AT_SKIP_IF([test ! -d /proc/self/fd])
 
159
dnl Linux has a 108 byte limit; this is 150 bytes long.
 
160
longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 
161
mkdir $longname
 
162
cd $longname
 
163
AT_CHECK([$PYTHON $abs_srcdir/test-unix-socket.py ../$longname/socket socket])
142
164
AT_CLEANUP
143
165
 
144
166
AT_SETUP([ovs_assert])