Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'linux-kselftest-5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:

- lkdtm runner fixes to prevent dmesg clearing and shellcheck errors

- ftrace test handling when test module doesn't exist

- nsfs test fix to replace zero-length array with flexible-array

- dmabuf-heaps test fix to return clear error value

* tag 'linux-kselftest-5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests/lkdtm: Use grep -E instead of egrep
selftests/lkdtm: Don't clear dmesg when running tests
selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
tools/testing: Replace zero-length array with flexible-array
kselftests: dmabuf-heaps: Fix confused return value on expected error testing

+22 -12
+1
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
··· 351 351 } 352 352 353 353 printf("Expected error checking passed\n"); 354 + ret = 0; 354 355 out: 355 356 if (dmabuf_fd >= 0) 356 357 close(dmabuf_fd);
+8 -1
tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
··· 17 17 exit_unsupported 18 18 } 19 19 20 - modprobe $MOD || unsup "$MOD module not available" 20 + unres() { #msg 21 + reset_tracer 22 + rmmod $MOD || true 23 + echo $1 24 + exit_unresolved 25 + } 26 + 27 + modprobe $MOD || unres "$MOD module not available" 21 28 rmmod $MOD 22 29 23 30 grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
+12 -10
tools/testing/selftests/lkdtm/run.sh
··· 25 25 # Figure out which test to run from our script name. 26 26 test=$(basename $0 .sh) 27 27 # Look up details about the test from master list of LKDTM tests. 28 - line=$(egrep '^#?'"$test"'\b' tests.txt) 28 + line=$(grep -E '^#?'"$test"'\b' tests.txt) 29 29 if [ -z "$line" ]; then 30 30 echo "Skipped: missing test '$test' in tests.txt" 31 31 exit $KSELFTEST_SKIP_TEST 32 32 fi 33 33 # Check that the test is known to LKDTM. 34 - if ! egrep -q '^'"$test"'$' "$TRIGGER" ; then 34 + if ! grep -E -q '^'"$test"'$' "$TRIGGER" ; then 35 35 echo "Skipped: test '$test' missing in $TRIGGER!" 36 36 exit $KSELFTEST_SKIP_TEST 37 37 fi ··· 59 59 expect="call trace:" 60 60 fi 61 61 62 - # Clear out dmesg for output reporting 63 - dmesg -c >/dev/null 64 - 65 62 # Prepare log for report checking 66 - LOG=$(mktemp --tmpdir -t lkdtm-XXXXXX) 63 + LOG=$(mktemp --tmpdir -t lkdtm-log-XXXXXX) 64 + DMESG=$(mktemp --tmpdir -t lkdtm-dmesg-XXXXXX) 67 65 cleanup() { 68 - rm -f "$LOG" 66 + rm -f "$LOG" "$DMESG" 69 67 } 70 68 trap cleanup EXIT 69 + 70 + # Save existing dmesg so we can detect new content below 71 + dmesg > "$DMESG" 71 72 72 73 # Most shells yell about signals and we're expecting the "cat" process 73 74 # to usually be killed by the kernel. So we have to run it in a sub-shell ··· 76 75 ($SHELL -c 'cat <(echo '"$test"') >'"$TRIGGER" 2>/dev/null) || true 77 76 78 77 # Record and dump the results 79 - dmesg -c >"$LOG" 78 + dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$DMESG" - > "$LOG" || true 79 + 80 80 cat "$LOG" 81 81 # Check for expected output 82 - if egrep -qi "$expect" "$LOG" ; then 82 + if grep -E -qi "$expect" "$LOG" ; then 83 83 echo "$test: saw '$expect': ok" 84 84 exit 0 85 85 else 86 - if egrep -qi XFAIL: "$LOG" ; then 86 + if grep -E -qi XFAIL: "$LOG" ; then 87 87 echo "$test: saw 'XFAIL': [SKIP]" 88 88 exit $KSELFTEST_SKIP_TEST 89 89 else
+1 -1
tools/testing/selftests/nsfs/pidns.c
··· 27 27 #define __stack_aligned__ __attribute__((aligned(16))) 28 28 struct cr_clone_arg { 29 29 char stack[128] __stack_aligned__; 30 - char stack_ptr[0]; 30 + char stack_ptr[]; 31 31 }; 32 32 33 33 static int child(void *args)