From 07281896a910d6757fa9797dcddca16134c1a4a4 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 10 Dec 2015 09:06:33 -0600 Subject: [PATCH] Make 2 small syscall testsuite changes for arm. * testsuite/systemtap.syscall/stat.c: Mark fstatat64 as covered. * testsuite/systemtap.syscall/coverage.tcl: Add a few modifications for arm-based systems. --- testsuite/systemtap.syscall/coverage.tcl | 8 ++++++-- testsuite/systemtap.syscall/stat.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testsuite/systemtap.syscall/coverage.tcl b/testsuite/systemtap.syscall/coverage.tcl index 98423ee0a..45b7f1567 100755 --- a/testsuite/systemtap.syscall/coverage.tcl +++ b/testsuite/systemtap.syscall/coverage.tcl @@ -12,11 +12,12 @@ # - rt_sigreturn: rt_sigreturn is a syscall that you don't call # directly, so we can't really test it. glibc calls it # in signal handlers. +# - sigreturn: Ditto. # - socketcall: common entry point for other socket syscalls # - tux: obsolete set badlist { bdflush dmi_field_show dmi_modalias_show copyarea fillrect - imageblit ni_syscall rt_sigreturn socketcall tux + imageblit ni_syscall rt_sigreturn sigreturn socketcall tux } foreach f $badlist { @@ -31,7 +32,10 @@ if {[catch {eval exec $cmd} output]} { } foreach line [split $output "\n"] { if {[regexp {^kernel.function\(\"[Ss]y[Ss]_([^@\"]+)} $line match fn]} { - if {![info exists funcname($fn)]} { + # arm (and perhaps other platforms) has assembly language + # syscall wrappers like "sigreturn_wrapper". Notice we're + # ignoring these. + if {![info exists funcname($fn)] && ![regexp {_wrapper$} $fn]} { set funcname($fn) 0 } } diff --git a/testsuite/systemtap.syscall/stat.c b/testsuite/systemtap.syscall/stat.c index e5fd6dab9..57b15d258 100644 --- a/testsuite/systemtap.syscall/stat.c +++ b/testsuite/systemtap.syscall/stat.c @@ -1,4 +1,4 @@ -/* COVERAGE: getcwd fstat stat lstat fstatat utime */ +/* COVERAGE: getcwd fstat stat lstat fstatat fstatat64 utime */ /* COVERAGE: fstat64 stat64 lstat64 */ /* COVERAGE: newfstat newfstatat newlstat newstat */ #define _GNU_SOURCE -- 2.43.5