]> granicus.if.org Git - strace/commitdiff
tests: check decoding of alpha specific osf_utimes syscall
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Apr 2017 00:29:58 +0000 (00:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 17 Apr 2017 00:29:58 +0000 (00:29 +0000)
* 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.

tests/.gitignore
tests/Makefile.am
tests/gen_tests.in
tests/osf_utimes.c [new file with mode: 0644]
tests/pure_executables.list

index 03b221e343e9a7922a893a340038fcdb655103cd..5c6b5fe03357fbee41272736a05d740e62115020 100644 (file)
@@ -208,6 +208,7 @@ oldselect
 oldstat
 open
 openat
+osf_utimes
 pause
 pc
 perf_event_open
index 7ae4646e73c4d0935ebc9fd25b16ea4741698dce..f23dfab433d795454b5c5cfe815dab905aba3066 100644 (file)
@@ -270,6 +270,7 @@ check_PROGRAMS = \
        oldstat \
        open \
        openat \
+       osf_utimes \
        pause \
        pc \
        perf_event_open \
index 50fd11963c3e350826fa6d4568ea77055abafd3c..dab52147becdf2276b8b6eccdd390fd5ea1bb1e9 100644 (file)
@@ -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 (file)
index 0000000..7ac083e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Check decoding of osf_utimes syscall.
+ *
+ * Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
+ * 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 <asm/unistd.h>
+
+#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
index f0340f5e3de649d710d2a17a4db75036b2c2a773..c76114157886e2cf6db0e795f455d3223de54192 100755 (executable)
@@ -173,6 +173,7 @@ oldselect
 oldstat
 open
 openat
+osf_utimes
 pause
 perf_event_open
 personality