Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
* [GIT PULL] Kselftest update for Linux 5.7-rc6
@ 2020-05-15 17:42 Shuah Khan
  2020-05-15 20:15 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2020-05-15 17:42 UTC (permalink / raw)
  To: torvalds
  Cc: Shuah Khan, mpe, linux-kselftest, linux-kernel, rostedt,
	Kees Cook, shuah


[-- Attachment #1: Type: text/plain, Size: 2181 bytes --]

Hi Linus,

Please pull the following Kselftest update for Linux 5.7-rc6.

This Kselftest update for Linux 5.7-rc6 consists of

- 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

diff is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 0e698dfa282211e414076f9dc7e83c1c288314fd:

   Linux 5.7-rc4 (2020-05-03 14:56:04 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest 
tags/linux-kselftest-5.7-rc6

for you to fetch changes up to 851c4df54dc1bcae41d07e46e3d89e035b0a7140:

   selftests/lkdtm: Use grep -E instead of egrep (2020-05-08 09:46:17 -0600)

----------------------------------------------------------------
linux-kselftest-5.7-rc6

This Kselftest update for Linux 5.7-rc6 consists of

- 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

----------------------------------------------------------------
Gustavo A. R. Silva (1):
       tools/testing: Replace zero-length array with flexible-array

John Stultz (1):
       kselftests: dmabuf-heaps: Fix confused return value on expected 
error testing

Michael Ellerman (2):
       selftests/lkdtm: Don't clear dmesg when running tests
       selftests/lkdtm: Use grep -E instead of egrep

Po-Hsu Lin (1):
       selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if 
the test module does not exist

  tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c |  1 +
  .../ftrace/test.d/preemptirq/irqsoff_tracer.tc     |  9 ++++++++-
  tools/testing/selftests/lkdtm/run.sh               | 22 
++++++++++++----------
  tools/testing/selftests/nsfs/pidns.c               |  2 +-
  4 files changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------

[-- Attachment #2: linux-kselftest-5.7-rc6.diff --]
[-- Type: text/x-patch, Size: 3532 bytes --]

diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index cd5e1f602ac9..909da9cdda97 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -351,6 +351,7 @@ static int test_alloc_errors(char *heap_name)
 	}
 
 	printf("Expected error checking passed\n");
+	ret = 0;
 out:
 	if (dmabuf_fd >= 0)
 		close(dmabuf_fd);
diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
index cbd174334a48..2b82c80edf69 100644
--- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
+++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
@@ -17,7 +17,14 @@ unsup() { #msg
     exit_unsupported
 }
 
-modprobe $MOD || unsup "$MOD module not available"
+unres() { #msg
+    reset_tracer
+    rmmod $MOD || true
+    echo $1
+    exit_unresolved
+}
+
+modprobe $MOD || unres "$MOD module not available"
 rmmod $MOD
 
 grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh
index dadf819148a4..ee64ff8df8f4 100755
--- a/tools/testing/selftests/lkdtm/run.sh
+++ b/tools/testing/selftests/lkdtm/run.sh
@@ -25,13 +25,13 @@ fi
 # Figure out which test to run from our script name.
 test=$(basename $0 .sh)
 # Look up details about the test from master list of LKDTM tests.
-line=$(egrep '^#?'"$test"'\b' tests.txt)
+line=$(grep -E '^#?'"$test"'\b' tests.txt)
 if [ -z "$line" ]; then
 	echo "Skipped: missing test '$test' in tests.txt"
 	exit $KSELFTEST_SKIP_TEST
 fi
 # Check that the test is known to LKDTM.
-if ! egrep -q '^'"$test"'$' "$TRIGGER" ; then
+if ! grep -E -q '^'"$test"'$' "$TRIGGER" ; then
 	echo "Skipped: test '$test' missing in $TRIGGER!"
 	exit $KSELFTEST_SKIP_TEST
 fi
@@ -59,30 +59,32 @@ if [ -z "$expect" ]; then
 	expect="call trace:"
 fi
 
-# Clear out dmesg for output reporting
-dmesg -c >/dev/null
-
 # Prepare log for report checking
-LOG=$(mktemp --tmpdir -t lkdtm-XXXXXX)
+LOG=$(mktemp --tmpdir -t lkdtm-log-XXXXXX)
+DMESG=$(mktemp --tmpdir -t lkdtm-dmesg-XXXXXX)
 cleanup() {
-	rm -f "$LOG"
+	rm -f "$LOG" "$DMESG"
 }
 trap cleanup EXIT
 
+# Save existing dmesg so we can detect new content below
+dmesg > "$DMESG"
+
 # Most shells yell about signals and we're expecting the "cat" process
 # to usually be killed by the kernel. So we have to run it in a sub-shell
 # and silence errors.
 ($SHELL -c 'cat <(echo '"$test"') >'"$TRIGGER" 2>/dev/null) || true
 
 # Record and dump the results
-dmesg -c >"$LOG"
+dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$DMESG" - > "$LOG" || true
+
 cat "$LOG"
 # Check for expected output
-if egrep -qi "$expect" "$LOG" ; then
+if grep -E -qi "$expect" "$LOG" ; then
 	echo "$test: saw '$expect': ok"
 	exit 0
 else
-	if egrep -qi XFAIL: "$LOG" ; then
+	if grep -E -qi XFAIL: "$LOG" ; then
 		echo "$test: saw 'XFAIL': [SKIP]"
 		exit $KSELFTEST_SKIP_TEST
 	else
diff --git a/tools/testing/selftests/nsfs/pidns.c b/tools/testing/selftests/nsfs/pidns.c
index e0d86e1668c0..e3c772c6a7c7 100644
--- a/tools/testing/selftests/nsfs/pidns.c
+++ b/tools/testing/selftests/nsfs/pidns.c
@@ -27,7 +27,7 @@
 #define __stack_aligned__	__attribute__((aligned(16)))
 struct cr_clone_arg {
 	char stack[128] __stack_aligned__;
-	char stack_ptr[0];
+	char stack_ptr[];
 };
 
 static int child(void *args)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GIT PULL] Kselftest update for Linux 5.7-rc6
  2020-05-15 17:42 [GIT PULL] Kselftest update for Linux 5.7-rc6 Shuah Khan
@ 2020-05-15 20:15 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2020-05-15 20:15 UTC (permalink / raw)
  To: Shuah Khan
  Cc: torvalds, Shuah Khan, mpe, linux-kselftest, linux-kernel,
	rostedt, Kees Cook, shuah

The pull request you sent on Fri, 15 May 2020 11:42:30 -0600:

> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-5.7-rc6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ce24729667cf8aaebf290613a6026a50a22c3eee

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 17:42 [GIT PULL] Kselftest update for Linux 5.7-rc6 Shuah Khan
2020-05-15 20:15 ` pr-tracker-bot

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git