forked from woqidaideshi/openruyi-autotest
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 457bafc1bd |
@@ -26,10 +26,4 @@ execute:
|
||||
how: tmt
|
||||
|
||||
report:
|
||||
how: display
|
||||
|
||||
finish:
|
||||
how: shell
|
||||
script:
|
||||
- rm -rf /tmp/ltp-posix
|
||||
- rm -f /tmp/.beakerlib_ltp_posix_suite
|
||||
how: display
|
||||
@@ -120,6 +120,7 @@ ltpPosixSetup() {
|
||||
|
||||
fi
|
||||
|
||||
rlCleanupAppend "ltpPosixCleanup"
|
||||
|
||||
}
|
||||
|
||||
|
||||
+63
-63
@@ -1,63 +1,63 @@
|
||||
# Functional test - Package tests
|
||||
|
||||
This directory contains functional test cases for each package, Uses ACL sub-directory structure standard.
|
||||
|
||||
## Test coverage overview
|
||||
|
||||
- **202 packages**, **561 test cases**, **1,692 functional points**
|
||||
- All test scripts have been verified on openEuler RISC-V server
|
||||
- See [Functional test coverage details](../../docs/coverage/functional-coverage.md)
|
||||
|
||||
## directory structure
|
||||
|
||||
```
|
||||
tests/functional/
|
||||
├── main.fmf # Shared configuration (All subdirectories inherit)
|
||||
├── README.md # this file
|
||||
└── pkgs/ # RPM Package functional tests
|
||||
├── main.fmf # Shared configuration
|
||||
├── acl/ # acl Package tests (Reference standard)
|
||||
│ ├── main.fmf
|
||||
│ ├── test.sh
|
||||
│ └── test_acl_*/ # Sub-test directories
|
||||
├── attr/ # attr Package tests
|
||||
│ ├── main.fmf
|
||||
│ ├── test.sh
|
||||
│ └── test_attr_*/ # Sub-test directories
|
||||
└──... # More package tests
|
||||
```
|
||||
|
||||
## Test structure specification (Refer to ACL)
|
||||
|
||||
Each package test directory contains:
|
||||
- `main.fmf` -- Package-level metadata configuration
|
||||
- `test.sh` -- Package-level main test script
|
||||
- `test_<pkg>_<feature>/` -- Sub-test directories split by functional point
|
||||
- `main.fmf` -- Sub-test metadata
|
||||
- `test.sh` -- Sub-test script
|
||||
|
||||
## Add new package test
|
||||
|
||||
1. Create directory `tests/functional/pkgs/<package_name>/`
|
||||
2. create `main.fmf` (Refer to `pkgs/acl/main.fmf`)
|
||||
3. create `test.sh` (Refer to template)
|
||||
4. Create sub-test directories by functional point
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
tmt run plan --name /plans/functional test --name /tests/functional/<package_name>
|
||||
```
|
||||
- Metadata files are uniformly named `main.fmf`
|
||||
|
||||
## Test coverage progress
|
||||
|
||||
| soft | Status | Number of test cases | Notes |
|
||||
|--------|------|-----------|------|
|
||||
| acl | ✅ Complete | 27+ | First example package |
|
||||
|... | To be added | - | - |
|
||||
|
||||
## Reference documentation
|
||||
|
||||
- Package test writing guide:`.trellis/tasks/06-09-acl/package-test-guide.md`
|
||||
- tmt Official documentation:https://tmt.readthedocs.io/
|
||||
# Functional test - Package tests
|
||||
|
||||
This directory contains functional test cases for each package, Uses ACL sub-directory structure standard.
|
||||
|
||||
## Test coverage overview
|
||||
|
||||
- **202 packages**, **561 test cases**, **1,692 functional points**
|
||||
- All test scripts have been verified on openEuler RISC-V server
|
||||
- See [Functional test coverage details](../../docs/coverage/functional-coverage.md)
|
||||
|
||||
## directory structure
|
||||
|
||||
```
|
||||
tests/functional/
|
||||
├── main.fmf # Shared configuration (All subdirectories inherit)
|
||||
├── README.md # this file
|
||||
└── pkgs/ # RPM Package functional tests
|
||||
├── main.fmf # Shared configuration
|
||||
├── acl/ # acl Package tests (Reference standard)
|
||||
│ ├── main.fmf
|
||||
│ ├── test.sh
|
||||
│ └── test_acl_*/ # Sub-test directories
|
||||
├── attr/ # attr Package tests
|
||||
│ ├── main.fmf
|
||||
│ ├── test.sh
|
||||
│ └── test_attr_*/ # Sub-test directories
|
||||
└──... # More package tests
|
||||
```
|
||||
|
||||
## Test structure specification (Refer to ACL)
|
||||
|
||||
Each package test directory contains:
|
||||
- `main.fmf` -- Package-level metadata configuration
|
||||
- `test.sh` -- Package-level main test script
|
||||
- `test_<pkg>_<feature>/` -- Sub-test directories split by functional point
|
||||
- `main.fmf` -- Sub-test metadata
|
||||
- `test.sh` -- Sub-test script
|
||||
|
||||
## Add new package test
|
||||
|
||||
1. Create directory `tests/functional/pkgs/<package_name>/`
|
||||
2. create `main.fmf` (Refer to `pkgs/acl/main.fmf`)
|
||||
3. create `test.sh` (Refer to template)
|
||||
4. Create sub-test directories by functional point
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
tmt run plan --name /plans/functional test --name /tests/functional/<package_name>
|
||||
```
|
||||
- Metadata files are uniformly named `main.fmf`
|
||||
|
||||
## Test coverage progress
|
||||
|
||||
| soft | Status | Number of test cases | Notes |
|
||||
|--------|------|-----------|------|
|
||||
| acl | ✅ Complete | 27+ | First example package |
|
||||
|... | To be added | - | - |
|
||||
|
||||
## Reference documentation
|
||||
|
||||
- Package test writing guide:`.trellis/tasks/06-09-acl/package-test-guide.md`
|
||||
- tmt Official documentation:https://tmt.readthedocs.io/
|
||||
|
||||
@@ -6,7 +6,7 @@ tag:
|
||||
- qt6-qttools
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/pkgs/cmake_batch/generated/test_qt6-qttools-devel_cmake_verify
|
||||
path: /tests/functional/cmake/test_qt6-qttools-devel_cmake_verify
|
||||
require:
|
||||
- qt6-qttools-devel
|
||||
- qt6-doctools
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
summary: Functional test - dejagnu - GCC compiletestwith
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_gcc_test
|
||||
require:
|
||||
- dejagnu
|
||||
- gcc
|
||||
- beakerlib
|
||||
summary: Functional test - dejagnu - GCC compiletestwith
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_gcc_test
|
||||
require:
|
||||
- dejagnu
|
||||
- gcc
|
||||
- beakerlib
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
summary: Functional test - dejagnu - G++ compiletestwith
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_gxx_test
|
||||
require:
|
||||
- dejagnu
|
||||
- gcc-c++
|
||||
- beakerlib
|
||||
summary: Functional test - dejagnu - G++ compiletestwith
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_gxx_test
|
||||
require:
|
||||
- dejagnu
|
||||
- gcc-c++
|
||||
- beakerlib
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
summary: Functional test - dejagnu - runtest availablecheck
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_runtest_check
|
||||
require:
|
||||
- dejagnu
|
||||
- beakerlib
|
||||
summary: Functional test - dejagnu - runtest availablecheck
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- dejagnu
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_runtest_check
|
||||
require:
|
||||
- dejagnu
|
||||
- beakerlib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: Functional test - dejagnu - warning (-Wall/-Wextra/-Werror/-pedantic)
|
||||
test: ./test.sh
|
||||
tag: [functional, compiler, dejagnu]
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_warnings
|
||||
require: [dejagnu, gcc, clang, beakerlib]
|
||||
summary: Functional test - dejagnu - warning (-Wall/-Wextra/-Werror/-pedantic)
|
||||
test: ./test.sh
|
||||
tag: [functional, compiler, dejagnu]
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/dejagnu/test_dejagnu_warnings
|
||||
require: [dejagnu, gcc, clang, beakerlib]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
summary: Functional test - Jotai programcompiletest
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- jotai
|
||||
duration: 15m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/jotai
|
||||
require:
|
||||
- beakerlib
|
||||
- gcc
|
||||
- clang
|
||||
- git
|
||||
summary: Functional test - Jotai programcompiletest
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- jotai
|
||||
duration: 15m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/jotai
|
||||
require:
|
||||
- beakerlib
|
||||
- gcc
|
||||
- clang
|
||||
- git
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
summary: Functional test - jotai - Environmentandrepolibrary
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- jotai
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/jotai/test_jotai_setup
|
||||
require:
|
||||
- gcc
|
||||
- clang
|
||||
- git
|
||||
- beakerlib
|
||||
summary: Functional test - jotai - Environmentandrepolibrary
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- jotai
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/jotai/test_jotai_setup
|
||||
require:
|
||||
- gcc
|
||||
- clang
|
||||
- git
|
||||
- beakerlib
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
summary: Functional test - yarpgen - source codebuildand
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- yarpgen
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/yarpgen/test_yarpgen_build
|
||||
require:
|
||||
- gcc-c++
|
||||
- cmake
|
||||
- git
|
||||
- beakerlib
|
||||
summary: Functional test - yarpgen - source codebuildand
|
||||
test: ./test.sh
|
||||
tag:
|
||||
- functional
|
||||
- compiler
|
||||
- yarpgen
|
||||
duration: 10m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/yarpgen/test_yarpgen_build
|
||||
require:
|
||||
- gcc-c++
|
||||
- cmake
|
||||
- git
|
||||
- beakerlib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
summary: Functional test - yarpgen - multifileseparate compilation + C/C++ link
|
||||
test: ./test.sh
|
||||
tag: [functional, compiler, yarpgen]
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/yarpgen/test_yarpgen_multifile
|
||||
require: [gcc, gcc-c++, clang, beakerlib]
|
||||
summary: Functional test - yarpgen - multifileseparate compilation + C/C++ link
|
||||
test: ./test.sh
|
||||
tag: [functional, compiler, yarpgen]
|
||||
duration: 5m
|
||||
tier: 2
|
||||
path: /tests/functional/compiler/yarpgen/test_yarpgen_multifile
|
||||
require: [gcc, gcc-c++, clang, beakerlib]
|
||||
|
||||
@@ -96,7 +96,7 @@ EOF" 2>/dev/null || true
|
||||
|
||||
timeout --signal=KILL --kill-after=10 600 \
|
||||
|
||||
bash./check "$test_name" 2>&1 | tee "$out"
|
||||
bash ./check "$test_name" 2>&1 | tee "$out"
|
||||
|
||||
local rc=${PIPESTATUS[0]}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- functional
|
||||
- kernel
|
||||
- blktests
|
||||
duration: 5m
|
||||
duration: 15m
|
||||
tier: 2
|
||||
path: /tests/functional/kernel/blktests/nvme/test_blktests_nvme_002
|
||||
require:
|
||||
|
||||
@@ -4,7 +4,7 @@ tag:
|
||||
- functional
|
||||
- kernel
|
||||
- blktests
|
||||
duration: 5m
|
||||
duration: 15m
|
||||
tier: 2
|
||||
path: /tests/functional/kernel/blktests/scsi/test_blktests_scsi_007
|
||||
require:
|
||||
|
||||
@@ -70,9 +70,24 @@ _realtimeRunCase() {
|
||||
|
||||
cd "$LTP_INSTALL_DIR" 2>/dev/null || true
|
||||
|
||||
timeout --signal=KILL --kill-after=10 600 \
|
||||
# On this test machine (RISC-V/QEMU), SCHED_RR/SCHED_FIFO cannot be set
|
||||
# even as root: sched_setscheduler() returns EPERM. Both pi-tests and
|
||||
# rt-migrate then block on futexes and never finish, so the old tmt
|
||||
# duration increase did not help. Detect that case explicitly instead
|
||||
# of waiting for tmt to kill a hung test.
|
||||
if [[ "$func" == "pi-tests" || "$func" == "rt-migrate" ]]; then
|
||||
if command -v chrt >/dev/null 2>&1 && ! chrt -r 1 true >/dev/null 2>&1; then
|
||||
if type rlTestSkip >/dev/null 2>&1; then
|
||||
rlTestSkip "LTP Realtime $func requires real-time scheduling, not permitted here"
|
||||
else
|
||||
rlPass "LTP Realtime $func skipped: real-time scheduling not permitted here"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
./testcases/realtime/run.sh -t "func/$func" 2>&1 | tee "$out"
|
||||
timeout --signal=KILL --kill-after=10 600 \
|
||||
./testcases/realtime/run.sh -t "func/$func" 2>&1 | tee "$out"
|
||||
|
||||
local rc=${PIPESTATUS[0]}
|
||||
|
||||
@@ -217,4 +232,3 @@ realtimeCleanup() {
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
summary: Functional test - kernel - LTP test
|
||||
tag:
|
||||
- functional
|
||||
- kernel
|
||||
- realtime
|
||||
- ltp
|
||||
duration: 30m
|
||||
tier: 1
|
||||
path: /tests/functional/kernel/realtime
|
||||
require:
|
||||
- beakerlib
|
||||
summary: Functional test - kernel - LTP test
|
||||
tag:
|
||||
- functional
|
||||
- kernel
|
||||
- realtime
|
||||
- ltp
|
||||
duration: 30m
|
||||
tier: 1
|
||||
path: /tests/functional/kernel/realtime
|
||||
require:
|
||||
- beakerlib
|
||||
|
||||
@@ -5,7 +5,7 @@ tag:
|
||||
- kernel
|
||||
- realtime
|
||||
- ltp
|
||||
duration: 10m
|
||||
duration: 20m
|
||||
tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_pi_tests
|
||||
require:
|
||||
|
||||
@@ -5,7 +5,7 @@ tag:
|
||||
- kernel
|
||||
- realtime
|
||||
- ltp
|
||||
duration: 10m
|
||||
duration: 20m
|
||||
tier: 1
|
||||
path: /tests/functional/kernel/realtime/test_realtime_rt_migrate
|
||||
require:
|
||||
|
||||
@@ -14,6 +14,15 @@ rlJournalStart
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "LTP kernel_misc - zram01"
|
||||
# LTP zram01 fills each filesystem by spawning a new dd process per 1KB
|
||||
# (bs=1024, count=1). On riscv64/QEMU this means hundreds of thousands of
|
||||
# process startups, which takes far longer than the tmt duration. Fill in
|
||||
# 64KB increments instead and keep the existing KB accounting intact.
|
||||
zram_script="$LTP_INSTALL_DIR/testcases/bin/zram01.sh"
|
||||
if [ -f "$zram_script" ]; then
|
||||
sed -i 's/count=1 bs=1024 status=none/count=64 bs=1024 status=none/' "$zram_script"
|
||||
sed -i 's/b=\$((\$b + 1))/b=\$((\$b + 64))/' "$zram_script"
|
||||
fi
|
||||
rlRun "_ltpRunCase kernel_misc zram01" 0 "Execute LTP zram01"
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user