Skip to content

Commit 8a48ed1

Browse files
authored
Merge pull request torvalds#819 from fbq/dev/selftests
sample: rust: Add a selftest module
2 parents d6657ee + 235092f commit 8a48ed1

20 files changed

+137
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ jobs:
363363
grep '] rust_semaphore_c: Rust semaphore sample (in C, for comparison) (init)$' qemu-stdout.log
364364
grep '] rust_semaphore_c: Rust semaphore sample (in C, for comparison) (exit)$' qemu-stdout.log
365365
366+
- run: |
367+
grep '] rust_selftests: Rust self tests (init)$' qemu-stdout.log
368+
grep '] rust_selftests: All tests passed. Congratulations!$' qemu-stdout.log
369+
grep '] rust_selftests: Rust self tests (exit)$' qemu-stdout.log
370+
366371
# Report
367372
- run: |
368373
cat ${{ env.BUILD_DIR }}.config

.github/workflows/kernel-arm-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
17811781
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
17821782
CONFIG_SAMPLE_RUST_RANDOM=m
17831783
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1784+
CONFIG_SAMPLE_RUST_SELFTESTS=m
17841785
# CONFIG_STRICT_DEVMEM is not set
17851786

17861787
#

.github/workflows/kernel-arm-release.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
17051705
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
17061706
CONFIG_SAMPLE_RUST_RANDOM=m
17071707
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1708+
CONFIG_SAMPLE_RUST_SELFTESTS=m
17081709
# CONFIG_STRICT_DEVMEM is not set
17091710

17101711
#
@@ -1789,4 +1790,4 @@ CONFIG_RUST_KERNEL_KUNIT_TEST=y
17891790
# end of Rust hacking
17901791
# end of Kernel hacking
17911792

1792-
CONFIG_WERROR=y
1793+
CONFIG_WERROR=y

.github/workflows/kernel-arm64-debug-thinlto.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
14381438
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14391439
CONFIG_SAMPLE_RUST_RANDOM=m
14401440
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1441+
CONFIG_SAMPLE_RUST_SELFTESTS=m
14411442

14421443
#
14431444
# arm64 Debugging

.github/workflows/kernel-arm64-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
14331433
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14341434
CONFIG_SAMPLE_RUST_RANDOM=m
14351435
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1436+
CONFIG_SAMPLE_RUST_SELFTESTS=m
14361437

14371438
#
14381439
# arm64 Debugging

.github/workflows/kernel-arm64-release-thinlto.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
13561356
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
13571357
CONFIG_SAMPLE_RUST_RANDOM=m
13581358
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1359+
CONFIG_SAMPLE_RUST_SELFTESTS=m
13591360

13601361
#
13611362
# arm64 Debugging
@@ -1397,4 +1398,4 @@ CONFIG_RUST_KERNEL_KUNIT_TEST=y
13971398
# end of Rust hacking
13981399
# end of Kernel hacking
13991400

1400-
CONFIG_WERROR=y
1401+
CONFIG_WERROR=y

.github/workflows/kernel-arm64-release.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
13511351
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
13521352
CONFIG_SAMPLE_RUST_RANDOM=m
13531353
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1354+
CONFIG_SAMPLE_RUST_SELFTESTS=m
13541355

13551356
#
13561357
# arm64 Debugging
@@ -1392,4 +1393,4 @@ CONFIG_RUST_KERNEL_KUNIT_TEST=y
13921393
# end of Rust hacking
13931394
# end of Kernel hacking
13941395

1395-
CONFIG_WERROR=y
1396+
CONFIG_WERROR=y

.github/workflows/kernel-ppc64le-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
14931493
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14941494
CONFIG_SAMPLE_RUST_RANDOM=m
14951495
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1496+
CONFIG_SAMPLE_RUST_SELFTESTS=m
14961497
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
14971498
# CONFIG_STRICT_DEVMEM is not set
14981499

.github/workflows/kernel-ppc64le-release.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
14551455
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
14561456
CONFIG_SAMPLE_RUST_RANDOM=m
14571457
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1458+
CONFIG_SAMPLE_RUST_SELFTESTS=m
14581459
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
14591460
# CONFIG_STRICT_DEVMEM is not set
14601461

@@ -1500,4 +1501,4 @@ CONFIG_RUST_KERNEL_KUNIT_TEST=y
15001501
# end of Rust hacking
15011502
# end of Kernel hacking
15021503

1503-
CONFIG_WERROR=y
1504+
CONFIG_WERROR=y

.github/workflows/kernel-riscv64-debug.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@ CONFIG_SAMPLE_RUST_SEMAPHORE=m
12871287
CONFIG_SAMPLE_RUST_SEMAPHORE_C=m
12881288
CONFIG_SAMPLE_RUST_RANDOM=m
12891289
CONFIG_SAMPLE_RUST_HOSTPROGS=y
1290+
CONFIG_SAMPLE_RUST_SELFTESTS=m
12901291
# CONFIG_STRICT_DEVMEM is not set
12911292

12921293
#

0 commit comments

Comments
 (0)