-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathresources_clientserver.yaml
More file actions
80 lines (80 loc) · 2.48 KB
/
Copy pathresources_clientserver.yaml
File metadata and controls
80 lines (80 loc) · 2.48 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
tests:
- name: test_resources_clientserver_tcp4
description: "Demonstrates the `clientServer` resource over TCP/IPv4. For connection-oriented protocols the client is automatically connected to the server, so a plain `write` on the exposed `client.fd` sends data to the server."
runner: HostRunner
resources:
- type: clientServer
name: cs1
l4Proto: tcp4
address: 127.0.0.1:9999
steps:
- type: syscall
name: w1
syscall: write
args:
fd: "${cs1.client.fd}"
buffer: "client to server over tcp4"
- name: test_resources_clientserver_tcp6
description: "Demonstrates the `clientServer` resource over TCP/IPv6"
runner: HostRunner
resources:
- type: clientServer
name: cs1
l4Proto: tcp6
address: "[::1]:9999"
steps:
- type: syscall
name: w1
syscall: write
args:
fd: "${cs1.client.fd}"
buffer: "client to server over tcp6"
- name: test_resources_clientserver_udp4
description: "Demonstrates the `clientServer` resource over UDP/IPv4. UDP sockets are not auto-connected, so the destination must be supplied via `sendto`."
runner: HostRunner
resources:
- type: clientServer
name: cs1
l4Proto: udp4
address: 127.0.0.1:9999
steps:
- type: syscall
name: s1
syscall: sendto
args:
fd: "${cs1.client.fd}"
buf: "client to server over udp4"
flags: 0
destAddr: 127.0.0.1:9999
- name: test_resources_clientserver_udp6
description: "Demonstrates the `clientServer` resource over UDP/IPv6"
runner: HostRunner
resources:
- type: clientServer
name: cs1
l4Proto: udp6
address: "[::1]:9999"
steps:
- type: syscall
name: s1
syscall: sendto
args:
fd: "${cs1.client.fd}"
buf: "client to server over udp6"
flags: 0
destAddr: "[::1]:9999"
- name: test_resources_clientserver_unix
description: "Demonstrates the `clientServer` resource over Unix sockets. The `address` must be the empty string; the runtime picks the socket path internally."
runner: HostRunner
resources:
- type: clientServer
name: cs1
l4Proto: unix
address: ""
steps:
- type: syscall
name: w1
syscall: write
args:
fd: "${cs1.client.fd}"
buffer: "client to server over unix"