Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readme file for cases and environ variable for ce-oem-provider (New) #1312

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

## <a id='top'>environ keys for crypto tests</a>

- HWRNG
- Affected Test Cases:
- [ce-oem-crypto/hwrng-current](#ce-oem-crypto/hwrng-current)

## Detailed test cases contains environ variable
### <a id='ce-oem-crypto/hwrng-current'>ce-oem-crypto/hwrng-current</a>
- **summary:**
Check if current Hardware Random Number Generate is expected.

- **description:**
```
None
```

- **file:**
[source file](accelerator.pxu#L1)

- **environ:**
HWRNG

- **command:**
```
path_hwrng='/sys/class/misc/hw_random/'
if [ -e "$path_hwrng/rng_available" ]; then
echo "HWRNG_Available: $(cat "$path_hwrng"rng_available)"
fi
if [ -e "$path_hwrng/rng_current" ]; then
echo "HWRNG_Current: $(cat "$path_hwrng"rng_current)"
fi
if [ -e "$path_hwrng/rng_qulity" ]; then
echo "HWRNG_Quality: $(cat "$path_hwrng"rng_qulity)"
fi
if [ -e "$path_hwrng/rng_selected" ]; then
echo "HWRNG_Selected: $(cat "$path_hwrng"rng_selected)"
fi
if [ -z "$HWRNG" ];then
echo "FAIL: Checkbox config HWRNG has not been set!"
exit 1
elif [ "$HWRNG" == "$(cat "$path_hwrng"rng_current)" ];then
echo "PASS: $HWRNG is available"
exit 0
else
echo "FAIL: $HWRNG is not available"
exit 1
fi
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

## <a id='top'>environ keys for digital-io tests</a>

- DIGITAL_IO_LOOPBACK_GPIO
- Affected Test Cases:
- [ce-oem-digital-io/loopback_mapping_gpio](#ce-oem-digital-io/loopback_mapping_gpio)
- DIGITAL_IO_LOOPBACK_SERIAL
- Affected Test Cases:
- [ce-oem-digital-io/loopback_mapping_serial](#ce-oem-digital-io/loopback_mapping_serial)

## Detailed test cases contains environ variable
### <a id='ce-oem-digital-io/loopback_mapping_gpio'>ce-oem-digital-io/loopback_mapping_gpio</a>
- **summary:**
Generates a digital I/O loopback ports mapping for digital I/O loopback test

- **description:**
```
A digital I/O loopback ports mapping. By giving a pair of digital I/O port on machnie to generates test jobs.
Usage of parameter:
DIGITAL_IO_LOOPBACK_GPIO=do_port:do_gpio_pin:di_port:di_gpio_pin do_port:do_gpio_pin:di_port:di_gpio_pin ...
e.g. DIGITAL_IO_LOOPBACK_GPIO=1:733:2:765 3:734:4:766
```

- **file:**
[source file](jobs.pxu#L1)

- **environ:**
DIGITAL_IO_LOOPBACK_GPIO

- **command:**
```
awk '{
split($0, record, " ")
for (i in record) {
split(record[i], data, ":")
printf "DO: %s\nDO_GPIO: %s\nDI: %s\nDI_GPIO: %s\n\n", data[1], data[2], data[3], data[4]
}
}' <<< "$DIGITAL_IO_LOOPBACK_GPIO"
```
[Back to top](#top)

### <a id='ce-oem-digital-io/loopback_mapping_serial'>ce-oem-digital-io/loopback_mapping_serial</a>
- **summary:**
Generates a digital I/O loopback ports mapping for digital I/O loopback test

- **description:**
```
A digital I/O loopback ports mapping. By giving a pair of digital I/O port on machnie to generates test jobs.
Usage of parameter:
DIGITAL_IO_LOOPBACK_SERIAL=do_port:do_byte_pin:di_port:di_byte_pin do_port:do_byte_pin:di_port:di_byte_pin ...
e.g. DIGITAL_IO_LOOPBACK_SERIAL=1:2:1:6 2:3:2:7 3:4:3:8 4:5:4:9
```

- **file:**
[source file](jobs.pxu#L41)

- **environ:**
DIGITAL_IO_LOOPBACK_SERIAL

- **command:**
```
awk '{
split($0, record, " ")
for (i in record) {
split(record[i], data, ":")
printf "DO: %s\nDO_REGISTER_BYTE: %s\nDI: %s\nDI_REGISTER_BYTE: %s\n\n", data[1], data[2], data[3], data[4]
}
}' <<< "$DIGITAL_IO_LOOPBACK_SERIAL"
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

## <a id='top'>environ keys for ethernet tests</a>

- TCP_MULTI_CONNECTIONS_SERVER_IP
- Affected Test Cases:
- [ce-oem-ethernet/tcp-multi-connections](#ce-oem-ethernet/tcp-multi-connections)
- TCP_MULTI_CONNECTIONS_START_PORT
- Affected Test Cases:
- [ce-oem-ethernet/tcp-multi-connections](#ce-oem-ethernet/tcp-multi-connections)
- TCP_MULTI_CONNECTIONS_END_PORT
- Affected Test Cases:
- [ce-oem-ethernet/tcp-multi-connections](#ce-oem-ethernet/tcp-multi-connections)
- TCP_MULTI_CONNECTIONS_PAYLOAD_SIZE
- Affected Test Cases:
- [ce-oem-ethernet/tcp-multi-connections](#ce-oem-ethernet/tcp-multi-connections)
- TCP_ECHO_SERVER_IP
- Affected Test Cases:
- [ce-oem-ethernet/tcp-echo-stress-interface](#ce-oem-ethernet/tcp-echo-stress-interface)
- TCP_ECHO_SERVER_PORT
- Affected Test Cases:
- [ce-oem-ethernet/tcp-echo-stress-interface](#ce-oem-ethernet/tcp-echo-stress-interface)
- TCP_ECHO_LOOP_ITERATIONS
- Affected Test Cases:
- [ce-oem-ethernet/tcp-echo-stress-interface](#ce-oem-ethernet/tcp-echo-stress-interface)

## Detailed test cases contains environ variable
### <a id='ce-oem-ethernet/tcp-multi-connections'>ce-oem-ethernet/tcp-multi-connections</a>
- **summary:**
Check if the system can handle multiple connections on TCP without error.

- **description:**
```
This job will connect to server listened ports(200 ports in total),
and send the payload(64KB) for few times of each port. This job will
send the payload after all ports connection is established.
Need a server(the same as DUT) to run the following command
before running the test.
e.g. Run a server to listen on port range from 1024 to 1223.
$ tcp_multi_connections.py server -p 1024 -e 1223
```

- **file:**
[source file](jobs.pxu#L24)

- **environ:**
TCP_MULTI_CONNECTIONS_SERVER_IP TCP_MULTI_CONNECTIONS_START_PORT TCP_MULTI_CONNECTIONS_END_PORT TCP_MULTI_CONNECTIONS_PAYLOAD_SIZE

- **command:**
```
tcp_multi_connections.py client -H "$TCP_MULTI_CONNECTIONS_SERVER_IP" -p "$TCP_MULTI_CONNECTIONS_START_PORT" -e "$TCP_MULTI_CONNECTIONS_END_PORT" -P "$TCP_MULTI_CONNECTIONS_PAYLOAD_SIZE"
```
[Back to top](#top)

### <a id='ce-oem-ethernet/tcp-echo-stress-interface'>ce-oem-ethernet/tcp-echo-stress-interface</a>
- **summary:**
Check if TCP echo via {{ interface }} without error.

- **template_summary:**
None

- **description:**
```
This job will use BASH to handle TCP socket via /dev/tcp.
Need a server to run the following command before running the test.
$ nc -lk -p {port_num}
```

- **file:**
[source file](jobs.pxu#L1)

- **environ:**
TCP_ECHO_SERVER_IP TCP_ECHO_SERVER_PORT TCP_ECHO_LOOP_ITERATIONS

- **command:**
```
tcpecho_stress.sh -s {{ interface }} -i "$TCP_ECHO_SERVER_IP" -p "$TCP_ECHO_SERVER_PORT" -l "$TCP_ECHO_LOOP_ITERATIONS" -o "${PLAINBOX_SESSION_SHARE}"/tcp_echo.log
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

## <a id='top'>environ keys for gpio tests</a>

- EXPECTED_GADGET_GPIO
- Affected Test Cases:
- [ce-oem-gpio/check-slots](#ce-oem-gpio/check-slots)

## Detailed test cases contains environ variable
### <a id='ce-oem-gpio/check-slots'>ce-oem-gpio/check-slots</a>
- **summary:**
Check gadget snap defined GPIO slots.

- **description:**
```
Use checkbox config EXPECTED_GADGET_GPIO to define the expected GPIO.
Usage EXPECTED_GADGET_GPIO=499,500:502
Sprate by comma, and also colon to define a range of ports
```

- **file:**
[source file](jobs.pxu#L1)

- **environ:**
EXPECTED_GADGET_GPIO

- **command:**
```
check_gpio.py check-gpio -c "$EXPECTED_GADGET_GPIO"
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

## <a id='top'>environ keys for iio-sensors tests</a>

- IIO_SENSORS
- Affected Test Cases:
- [ce-oem-iio-sensors/resource](#ce-oem-iio-sensors/resource)

## Detailed test cases contains environ variable
### <a id='ce-oem-iio-sensors/resource'>ce-oem-iio-sensors/resource</a>
- **summary:**
Generates a IIO sensors mapping for IIO sensor test

- **description:**
```
A IIO sensors mapping. By giving an IIO sensors on machnie to generates test jobs.
Usage of parameter:
IIO_SENSORS=device:sensor_type device:sensor_type ...
e.g. IIO_SENSORS=0:pressure 1:accelerometer 2:humidityrelative
```

- **file:**
[source file](jobs.pxu#L1)

- **environ:**
IIO_SENSORS

- **command:**
```
iio_sensor_test.py sensor-resource "$IIO_SENSORS"
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

## <a id='top'>environ keys for mir tests</a>

- PLAINBOX_SESSION_SHARE
- Affected Test Cases:
- [mir/glmark2-es2-wayland-auto](#mir/glmark2-es2-wayland-auto)
- GL_VENDOR
- Affected Test Cases:
- [mir/glmark2-es2-wayland-auto](#mir/glmark2-es2-wayland-auto)
- GL_RENDERER
- Affected Test Cases:
- [mir/glmark2-es2-wayland-auto](#mir/glmark2-es2-wayland-auto)

## Detailed test cases contains environ variable
### <a id='mir/glmark2-es2-wayland-auto'>mir/glmark2-es2-wayland-auto</a>
- **summary:**
Run OpenGL ES 2.0 Wayland benchmark on the GPU

- **description:**
```
None
```

- **file:**
[source file](jobs.pxu#L15)

- **environ:**
PLAINBOX_SESSION_SHARE GL_VENDOR GL_RENDERER

- **command:**
```
graphics_test.sh glmark2
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

## <a id='top'>environ keys for optee tests</a>

- OPTEE_CASES
- Affected Test Cases:
- [ce-oem-optee-test-list](#ce-oem-optee-test-list)
- [ce-oem-optee-test-list-pkcs11](#ce-oem-optee-test-list-pkcs11)

## Detailed test cases contains environ variable
### <a id='ce-oem-optee-test-list'>ce-oem-optee-test-list</a>
- **summary:**
Collect the test cases support by OP-TEE test(xtest)

- **description:**
```
None
```

- **file:**
[source file](jobs.pxu#L68)

- **environ:**
OPTEE_CASES

- **command:**
```
filepath=""
if [[ -n "$OPTEE_CASES" ]]; then
filepath="$OPTEE_CASES"
else
filepath="$PLAINBOX_PROVIDER_DATA/optee-test.json"
fi
parse_optee_test.py "$filepath"
```
[Back to top](#top)

### <a id='ce-oem-optee-test-list-pkcs11'>ce-oem-optee-test-list-pkcs11</a>
- **summary:**
Collect the test cases related with PKCS11 support by OP-TEE test(xtest)

- **description:**
```
None
```

- **file:**
[source file](jobs.pxu#L83)

- **environ:**
OPTEE_CASES

- **command:**
```
filepath=""
if [[ -n "$OPTEE_CASES" ]]; then
filepath="$OPTEE_CASES"
else
filepath="$PLAINBOX_PROVIDER_DATA/optee-test.json"
fi
parse_optee_test.py "$filepath" -p
```
[Back to top](#top)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

## <a id='top'>environ keys for otg tests</a>

- OTG
- Affected Test Cases:
- [otg_ports](#otg_ports)

## Detailed test cases contains environ variable
### <a id='otg_ports'>otg_ports</a>
- **summary:**
Gather list of USB ports and UDC.

- **description:**
```
A USB port and UDC mapping resource that relies on the user specifying in config varirable.
Usage of parameter: OTG={port1}:{node1} {port2}:{node2} ...
e.g. OTG=USB-C1:11200000 USB-Micro:112a1000
```

- **file:**
[source file](jobs.pxu#L1)

- **environ:**
OTG

- **command:**
```
if [ "$OTG" ]; then
multiple-otg.sh -c "$OTG"
else
echo "OTG config variable: not found"
fi
```
[Back to top](#top)
Loading