]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rosted...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Oct 2018 16:47:28 +0000 (09:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Oct 2018 16:47:28 +0000 (09:47 -0700)
Pull tracing fixes from Steven Rostedt:
 "Masami had a couple more fixes to the synthetic events. One was a
  proper error return value, and the other is for the self tests"

* tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  selftests/ftrace: Fix synthetic event test to delete event correctly
  tracing: Return -ENOENT if there is no target synthetic event

kernel/trace/trace_events_hist.c
tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-createremove.tc

index d239004aaf29052eec50aaf61772c2b0de7c7947..eb908ef2ececf336fc2ed8996439005a32f5afc9 100644 (file)
@@ -1063,8 +1063,10 @@ static int create_synth_event(int argc, char **argv)
                event = NULL;
                ret = -EEXIST;
                goto out;
-       } else if (delete_event)
+       } else if (delete_event) {
+               ret = -ENOENT;
                goto out;
+       }
 
        if (argc < 2) {
                ret = -EINVAL;
index 8d647fb572dd396564ede17eaffa2947f6009f60..41128219231a7cd19f8820330af8ebbe428ebd37 100644 (file)
@@ -25,18 +25,18 @@ fi
 
 reset_trigger
 
-echo "Test create synthetic event with an error"
-echo 'wakeup_latency  u64 lat pid_t pid char' > synthetic_events > /dev/null
+echo "Test remove synthetic event"
+echo '!wakeup_latency  u64 lat pid_t pid char comm[16]' >> synthetic_events
 if [ -d events/synthetic/wakeup_latency ]; then
-    fail "Created wakeup_latency synthetic event with an invalid format"
+    fail "Failed to delete wakeup_latency synthetic event"
 fi
 
 reset_trigger
 
-echo "Test remove synthetic event"
-echo '!wakeup_latency  u64 lat pid_t pid char comm[16]' > synthetic_events
+echo "Test create synthetic event with an error"
+echo 'wakeup_latency  u64 lat pid_t pid char' > synthetic_events > /dev/null
 if [ -d events/synthetic/wakeup_latency ]; then
-    fail "Failed to delete wakeup_latency synthetic event"
+    fail "Created wakeup_latency synthetic event with an invalid format"
 fi
 
 exit 0