A few "undeclared function" warnings could make tests untested.
We ununtest a bunch.
int main() { return 0; }
-extern int (*func_alias) __attribute__ ((alias ("main")));
+extern int func_alias () __attribute__ ((alias ("main")));
#endif
+#if defined (LIBPLT1) // decls for LIBPLT2 pieces
+void * fatal (const char *ptr);
+void * xmalloc (size_t size);
+char * savestring (const char *ptr);
+int open2 (char *str1, char *str2, int flags);
+int open3 (char *str1, char *str2, int flags);
+char * basename2 (char *prog);
+int critters (void);
+int widgets (void);
+int datetime (void);
+#endif
+
+
+
#if defined (LIBPLT1) || defined (NOLIBPLT)
void
zenme ()
#include "sys/sdt.h"
+#include <unistd.h>
void sleeper () {
sleep(1);
marker_here:
STAP_PROBE(tmp_test_file, while_start);
}
+ if (0) // suppress gcc warning about unused label
+ goto marker_here;
return 0;
}
void
makenull (s)
+ int s;
{
stack[s] = 0;
}
#include <asm/prctl.h>
#include <sys/prctl.h>
+// This decl is missing from glibc; it's a deprecated syscall.
+#define arch_prctl(x,y) syscall(__NR_arch_prctl,x,y)
+
int main()
{
unsigned long fs;
#include <linux/capability.h>
+#define capget(x,y) syscall(__NR_capget,x,y)
+#define capset(x,y) syscall(__NR_capset,x,y)
+
static struct __user_cap_header_struct header;
static struct __user_cap_data_struct data;
// its args vary between those two archs. Not all are
// being addressed in the tapset.
+#define iopl(x) syscall(__NR_iopl,x)
+
iopl(3);
//staptest// iopl (3) = NNNN
#include <fcntl.h>
#include <linux/version.h>
+#define capget(x,y) syscall(__NR_capget,x,y)
+#define capset(x,y) syscall(__NR_capset,x,y)
+
static struct __user_cap_header_struct header;
static struct __user_cap_data_struct data;
#include <unistd.h>
#include <sys/xattr.h>
#include <endian.h>
+#include <fcntl.h>
#define PATH "foobar"
#define XATTR_NAME "user.systemtap.test"
#include <unistd.h>
#include <string.h>
#include <sys/syscall.h>
+#include <sys/ioctl.h>
#ifdef __NR_perf_event_open
#include <linux/perf_event.h>
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
+#include <linux/version.h>
int main()
{
// language function that we can't probe. This was changed in
// 2.6.22.
#if defined(__NR_uselib) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#define uselib(x) syscall(__NR_uselib,x)
uselib("blah");
//staptest// [[[[uselib ("blah") = -NNNN!!!!ni_syscall () = -NNNN (ENOSYS)]]]]