From: Dmitry V. Levin Date: Mon, 17 Apr 2017 00:29:58 +0000 (+0000) Subject: tests: check decoding of alpha specific osf_utimes syscall X-Git-Tag: v4.17~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb8b94b7d55b2365152d2550711d93cbc4ed4a65;p=strace tests: check decoding of alpha specific osf_utimes syscall * tests/osf_utimes.c: New file. * tests/gen_tests.in (osf_utimes): New entry. * tests/Makefile.am (check_PROGRAMS): Add osf_utimes. * tests/pure_executables.list: Likewise. * tests/.gitignore: Likewise. --- diff --git a/tests/.gitignore b/tests/.gitignore index 03b221e3..5c6b5fe0 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -208,6 +208,7 @@ oldselect oldstat open openat +osf_utimes pause pc perf_event_open diff --git a/tests/Makefile.am b/tests/Makefile.am index 7ae4646e..f23dfab4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -270,6 +270,7 @@ check_PROGRAMS = \ oldstat \ open \ openat \ + osf_utimes \ pause \ pc \ perf_event_open \ diff --git a/tests/gen_tests.in b/tests/gen_tests.in index 50fd1196..dab52147 100644 --- a/tests/gen_tests.in +++ b/tests/gen_tests.in @@ -188,6 +188,7 @@ oldlstat -a32 -v -P $NAME.sample -P /dev/full oldstat -a32 -v -P $NAME.sample -P /dev/full open -a30 -P $NAME.sample openat -P $NAME.sample +osf_utimes -a21 pause -a8 -esignal=none perf_event_open -a1 perf_event_open_nonverbose -a34 -e verbose=none -e trace=perf_event_open diff --git a/tests/osf_utimes.c b/tests/osf_utimes.c new file mode 100644 index 00000000..7ac083e6 --- /dev/null +++ b/tests/osf_utimes.c @@ -0,0 +1,45 @@ +/* + * Check decoding of osf_utimes syscall. + * + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_osf_utimes + +# define TEST_SYSCALL_NR __NR_osf_utimes +# define TEST_SYSCALL_STR "osf_utimes" +# define TEST_STRUCT struct timeval32 +struct timeval32 { int tv_sec, tv_usec; }; +# include "xutimes.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_osf_utimes") + +#endif diff --git a/tests/pure_executables.list b/tests/pure_executables.list index f0340f5e..c7611415 100755 --- a/tests/pure_executables.list +++ b/tests/pure_executables.list @@ -173,6 +173,7 @@ oldselect oldstat open openat +osf_utimes pause perf_event_open personality