This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] A new testcase for tty tapset


This is a basic test to assure that the tty tapset is working
compiling and working properly
---
 testsuite/buildok/tty.stp |   51 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100755 testsuite/buildok/tty.stp

diff --git a/testsuite/buildok/tty.stp b/testsuite/buildok/tty.stp
new file mode 100755
index 0000000..0b5018d
--- /dev/null
+++ b/testsuite/buildok/tty.stp
@@ -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)
+}
-- 
1.6.0.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]