From 23e2a72ae0ac6a04a4b7b3d0659b20819694f199 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 18 Jun 2012 15:42:24 -0400 Subject: [PATCH] tapset: panic() and friends * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Pull in panic.stp. * tapset/guru-delay.stp: Fix typo. * tapset/panic.stp: Fix 'nother super important typo. * testsuite/buildok/guru.stp: Build-test the bad boys. --- doc/SystemTap_Tapset_Reference/tapsets.tmpl | 6 ++++-- tapset/guru-delay.stp | 2 +- tapset/panic.stp | 2 +- testsuite/buildok/guru.stp | 7 +++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100755 testsuite/buildok/guru.stp diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl index 6a31e684e..025a24f49 100644 --- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl +++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl @@ -360,13 +360,15 @@ - Delay tapset + Guru tapsets - Functions to insert a deliberate delay into a probe handler. + Functions to deliberately interfere with the system's behavior, in + order to inject faults or improve observability. All the functions in this tapset require the use of guru mode (-g). !Itapset/guru-delay.stp +!Itapset/panic.stp diff --git a/tapset/guru-delay.stp b/tapset/guru-delay.stp index 6710a59a3..34a954117 100644 --- a/tapset/guru-delay.stp +++ b/tapset/guru-delay.stp @@ -33,7 +33,7 @@ function mdelay(ms:long) %{ %} /** - * sfunction mdelay - microsecond delay + * sfunction udelay - microsecond delay * @us: Number of microseconds to delay. * * Description: This function inserts a multi-microsecond busy-delay into a probe handler. diff --git a/tapset/panic.stp b/tapset/panic.stp index 6fd69a950..4fe343483 100644 --- a/tapset/panic.stp +++ b/tapset/panic.stp @@ -21,7 +21,7 @@ * sfunction panic - trigger a panic * @msg: message to pass to kernel's panic() function * - * Description: this function triggers an immediate panic of the running + * Description: This function triggers an immediate panic of the running * kernel with a user-specified panic message. * It requires guru mode. */ diff --git a/testsuite/buildok/guru.stp b/testsuite/buildok/guru.stp new file mode 100755 index 000000000..6f34dbf0b --- /dev/null +++ b/testsuite/buildok/guru.stp @@ -0,0 +1,7 @@ +#! stap -gp4 + +probe begin { + mdelay(100); + udelay(-1); + panic("yo"); +} -- 2.43.5