From f3ef46faa11dbeb78a237dd305ae596447dfa562 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 16 Sep 2016 10:32:42 +0100 Subject: [PATCH] dtrace: test the new DTRACE_PROBE() n-argument macro Also verify that all eight of its arg-taking forms, as well as its existing non-arg-taking form, work. Signed-off-by: Nick Alcock Acked-by: Kris Van Hees Orabug: 24678897 --- dtrace/dt_test_dev.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dtrace/dt_test_dev.c b/dtrace/dt_test_dev.c index da14419f0469..f833fe9b26df 100644 --- a/dtrace/dt_test_dev.c +++ b/dtrace/dt_test_dev.c @@ -101,16 +101,29 @@ static long dt_test_ioctl(struct file *file, DTRACE_PROBE(sdt__test); + /* + * Test translation-to-nothing. + */ + DTRACE_PROBE(sdt__test__ioctl__file, int, cmd, int :, 666, + char * : (), 0, struct file *, file, int, arg); + + /* + * Probes with every valid count of args. + */ + DTRACE_PROBE(sdt__test__arg1, int, 1); + DTRACE_PROBE(sdt__test__arg2, int, 1, int, 2); + DTRACE_PROBE(sdt__test__arg3, int, 1, int, 2, int, 3); + DTRACE_PROBE(sdt__test__arg4, int, 1, int, 2, int, 3, int, 4); + DTRACE_PROBE(sdt__test__arg5, int, 1, int, 2, int, 3, int, 4, int, 5); + DTRACE_PROBE(sdt__test__arg6, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6); + DTRACE_PROBE(sdt__test__arg7, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6, int, 7); + DTRACE_PROBE(sdt__test__arg8, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6, int, 7, int, 8); + return -EAGAIN; } static int dt_test_open(struct inode *inode, struct file *file) { - /* - * Test translation-to-nothing. - */ - DTRACE_PROBE4(sdt__test__open__file, struct inode *,inode, int :, 666, - char * : (), 0, struct file *, file); return 0; } -- 2.50.1