]> sourceware.org Git - systemtap.git/commitdiff
A new testcase for tty tapset
authorBreno Leitão <leitao@linux.vnet.ibm.com>
Fri, 2 Oct 2009 20:38:46 +0000 (16:38 -0400)
committerBreno Leitao <leitao@linux.vnet.ibm.com>
Thu, 29 Oct 2009 16:12:04 +0000 (14:12 -0200)
This is a basic test to assure that the tty tapset is working
compiling and working properly

testsuite/buildok/tty.stp [new file with mode: 0755]

diff --git a/testsuite/buildok/tty.stp b/testsuite/buildok/tty.stp
new file mode 100755 (executable)
index 0000000..0b5018d
--- /dev/null
@@ -0,0 +1,51 @@
+#! stap -wp4
+
+probe tty.poll{
+       printf("Pooling tty %s for wait queue key %d\n", file_name, wait_key);
+}
+
+probe tty.register {
+       printf("Device registered using index %d using driver %s(%s/%s)\n", index, driver_name, name, module)
+}
+
+probe tty.unregister {
+       printf("Device registered using index %d using driver %s(%s/%s)\n", index, driver_name, name, module)
+}
+
+probe tty.release {
+       printf("Closing file %s\n", file_name)
+       printf("INODE: number %d\nState: %d\nFlag: %d\n", inode_number, inode_state, inode_flags)
+       printf("File: %s (mode %x flags %x)\n", file_name, file_mode, file_flags)
+}
+
+probe tty.open {
+       printf("Opening tty file %s\n", file_name)
+       printf("INODE: number %d\nState: %d\nFlag: %d\n", inode_number, inode_state, inode_flags)
+       printf("File: %s mode %x flags %x\n", file_name, file_mode, file_flags)
+}
+
+probe tty.resize {
+       printf("Resizing %s from %dx%d (%d/%d) to %dx%d (%d/%d)\n", name, old_row, old_col, old_xpixel, old_ypixel,
+                new_row, new_col, new_xpixel, new_ypixel)
+}
+
+probe tty.ioctl {
+       printf("Ioctling file %s with %d %d\n", name, cmd, arg)
+}
+
+probe tty.init {
+       printf("new tty with name %s from driver %s and module %s\nn", driver_name, name, module)
+}
+
+probe tty.receive {
+       printf("Driver %s/%s (%d/%d) received %s (%s) with len %d\n", name, driver_name, index, id, cp, fp, count)
+}
+
+
+probe tty.write {
+       printf("Buffer %s (len %d) wrote on file %s (driver %s)\n", buffer, nr, file_name, driver_name)
+}
+
+probe tty.read {
+       printf("Reading tty file %s (driver %s) to a buffer with size %d containing %s\n", file_name, driver_name, nr, buffer)
+}
This page took 0.08939 seconds and 5 git commands to generate.