]>
git.proxmox.com Git - ovs.git/blob - tests/test-stream.c
2 * Copyright (c) 2018 Ilya Maximets <i.maximets@samsung.com>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "fatal-signal.h"
20 #include "openvswitch/vlog.h"
24 VLOG_DEFINE_THIS_MODULE(test_stream
);
27 main(int argc
, char *argv
[])
30 struct stream
*stream
;
32 fatal_ignore_sigpipe();
33 set_program_name(argv
[0]);
36 ovs_fatal(0, "usage: %s REMOTE", argv
[0]);
39 error
= stream_open_block(stream_open(argv
[1], &stream
, DSCP_DEFAULT
),
42 VLOG_ERR("stream_open_block(%s) failure: %s",
43 argv
[1], ovs_strerror(error
));
45 return (error
|| !stream
) ? 1 : 0;