|
From: <sv...@va...> - 2015-09-25 20:53:16
|
Author: iraisr
Date: Fri Sep 25 21:53:09 2015
New Revision: 15683
Log:
Provide test for AT_SUN_SYSSTAT_ADDR emulation.
n-i-bz
Added:
trunk/memcheck/tests/solaris/gethrusec.c
trunk/memcheck/tests/solaris/gethrusec.stderr.exp
trunk/memcheck/tests/solaris/gethrusec.stdout.exp
trunk/memcheck/tests/solaris/gethrusec.vgtest
Modified:
trunk/README.solaris
trunk/memcheck/tests/solaris/ (props changed)
trunk/memcheck/tests/solaris/Makefile.am
Modified: trunk/README.solaris
==============================================================================
--- trunk/README.solaris (original)
+++ trunk/README.solaris Fri Sep 25 21:53:09 2015
@@ -130,7 +130,6 @@
to see this in effect. Would require awareness of syscall parameter semantics.
- Correctly print arguments of DW_CFA_ORCL_arg_loc in show_CF_instruction() when
it is implemented in libdwarf.
-- Provide tests for AT_SUN_SYSSTAT_ADDR and AT_SUN_SYSSTAT_ZONE_ADDR.
Contacts
Modified: trunk/memcheck/tests/solaris/Makefile.am
==============================================================================
--- trunk/memcheck/tests/solaris/Makefile.am (original)
+++ trunk/memcheck/tests/solaris/Makefile.am Fri Sep 25 21:53:09 2015
@@ -19,6 +19,7 @@
execx.stderr.exp execx.stdout.exp execx.vgtest \
getzoneoffset.stderr.exp getzoneoffset.vgtest \
gethrtime.stderr.exp gethrtime.stdout.exp gethrtime.vgtest \
+ gethrusec.stderr.exp gethrusec.stdout.exp gethrusec.vgtest \
ldynsym.stderr.exp ldynsym.stdout.exp ldynsym.vgtest \
lsframe1.stderr.exp lsframe1.stdout.exp lsframe1.vgtest \
lsframe2.stderr.exp lsframe2.stdout.exp lsframe2.vgtest \
@@ -78,6 +79,10 @@
check_PROGRAMS += execx
endif
+if SOLARIS_RESERVE_SYSSTAT_ADDR
+check_PROGRAMS += gethrusec
+endif
+
if SOLARIS_GETZONEOFFSET_FASTTRAP
check_PROGRAMS += getzoneoffset
endif
Added: trunk/memcheck/tests/solaris/gethrusec.c
==============================================================================
--- trunk/memcheck/tests/solaris/gethrusec.c (added)
+++ trunk/memcheck/tests/solaris/gethrusec.c Fri Sep 25 21:53:09 2015
@@ -0,0 +1,24 @@
+/* Test for gethrusec which depends on the correct emulation of
+ AT_SUN_SYSSTAT_ADDR in the auxiliary vector. */
+
+#include <stdio.h>
+#include <strings.h>
+#include <sys/system_stats.h>
+
+int main(void)
+{
+ hrtime_t t = 0;
+ get_hrusec(&t);
+ printf("get_hrusec(): %s\n", (t == 0) ? "FAIL" : "PASS");
+
+ memtime_sec_t m = 0;
+ memset(&m, 0, sizeof(m));
+ get_sec_fromepoch(&m);
+ printf("get_sec_fromepoch(): %s\n", (m == 0) ? "FAIL" : "PASS");
+
+ t = 0;
+ get_nsec_fromepoch(&t);
+ printf("get_nsec_fromepoch(): %s\n", (t == 0) ? "FAIL" : "PASS");
+ return 0;
+}
+
Added: trunk/memcheck/tests/solaris/gethrusec.stderr.exp
==============================================================================
(empty)
Added: trunk/memcheck/tests/solaris/gethrusec.stdout.exp
==============================================================================
--- trunk/memcheck/tests/solaris/gethrusec.stdout.exp (added)
+++ trunk/memcheck/tests/solaris/gethrusec.stdout.exp Fri Sep 25 21:53:09 2015
@@ -0,0 +1,3 @@
+get_hrusec(): PASS
+get_sec_fromepoch(): PASS
+get_nsec_fromepoch(): PASS
Added: trunk/memcheck/tests/solaris/gethrusec.vgtest
==============================================================================
--- trunk/memcheck/tests/solaris/gethrusec.vgtest (added)
+++ trunk/memcheck/tests/solaris/gethrusec.vgtest Fri Sep 25 21:53:09 2015
@@ -0,0 +1,3 @@
+prereq: test -e gethrusec
+prog: gethrusec
+vgopts: -q
|