139bac055674d23770b9a724221b728e443196ea7Elliott Hughes/*
239bac055674d23770b9a724221b728e443196ea7Elliott Hughes * Check decoding of osf_utimes syscall.
339bac055674d23770b9a724221b728e443196ea7Elliott Hughes *
439bac055674d23770b9a724221b728e443196ea7Elliott Hughes * Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
539bac055674d23770b9a724221b728e443196ea7Elliott Hughes * All rights reserved.
639bac055674d23770b9a724221b728e443196ea7Elliott Hughes *
739bac055674d23770b9a724221b728e443196ea7Elliott Hughes * Redistribution and use in source and binary forms, with or without
839bac055674d23770b9a724221b728e443196ea7Elliott Hughes * modification, are permitted provided that the following conditions
939bac055674d23770b9a724221b728e443196ea7Elliott Hughes * are met:
1039bac055674d23770b9a724221b728e443196ea7Elliott Hughes * 1. Redistributions of source code must retain the above copyright
1139bac055674d23770b9a724221b728e443196ea7Elliott Hughes *    notice, this list of conditions and the following disclaimer.
1239bac055674d23770b9a724221b728e443196ea7Elliott Hughes * 2. Redistributions in binary form must reproduce the above copyright
1339bac055674d23770b9a724221b728e443196ea7Elliott Hughes *    notice, this list of conditions and the following disclaimer in the
1439bac055674d23770b9a724221b728e443196ea7Elliott Hughes *    documentation and/or other materials provided with the distribution.
1539bac055674d23770b9a724221b728e443196ea7Elliott Hughes * 3. The name of the author may not be used to endorse or promote products
1639bac055674d23770b9a724221b728e443196ea7Elliott Hughes *    derived from this software without specific prior written permission.
1739bac055674d23770b9a724221b728e443196ea7Elliott Hughes *
1839bac055674d23770b9a724221b728e443196ea7Elliott Hughes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1939bac055674d23770b9a724221b728e443196ea7Elliott Hughes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2039bac055674d23770b9a724221b728e443196ea7Elliott Hughes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2139bac055674d23770b9a724221b728e443196ea7Elliott Hughes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2239bac055674d23770b9a724221b728e443196ea7Elliott Hughes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2339bac055674d23770b9a724221b728e443196ea7Elliott Hughes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2439bac055674d23770b9a724221b728e443196ea7Elliott Hughes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2539bac055674d23770b9a724221b728e443196ea7Elliott Hughes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2639bac055674d23770b9a724221b728e443196ea7Elliott Hughes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2739bac055674d23770b9a724221b728e443196ea7Elliott Hughes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2839bac055674d23770b9a724221b728e443196ea7Elliott Hughes */
2939bac055674d23770b9a724221b728e443196ea7Elliott Hughes
3039bac055674d23770b9a724221b728e443196ea7Elliott Hughes#include "tests.h"
3139bac055674d23770b9a724221b728e443196ea7Elliott Hughes#include <asm/unistd.h>
3239bac055674d23770b9a724221b728e443196ea7Elliott Hughes
3339bac055674d23770b9a724221b728e443196ea7Elliott Hughes#ifdef __NR_osf_utimes
3439bac055674d23770b9a724221b728e443196ea7Elliott Hughes
3539bac055674d23770b9a724221b728e443196ea7Elliott Hughes# define TEST_SYSCALL_NR	__NR_osf_utimes
3639bac055674d23770b9a724221b728e443196ea7Elliott Hughes# define TEST_SYSCALL_STR	"osf_utimes"
3739bac055674d23770b9a724221b728e443196ea7Elliott Hughes# define TEST_STRUCT		struct timeval32
3839bac055674d23770b9a724221b728e443196ea7Elliott Hughesstruct timeval32 { int tv_sec, tv_usec; };
3939bac055674d23770b9a724221b728e443196ea7Elliott Hughes# include "xutimes.c"
4039bac055674d23770b9a724221b728e443196ea7Elliott Hughes
4139bac055674d23770b9a724221b728e443196ea7Elliott Hughes#else
4239bac055674d23770b9a724221b728e443196ea7Elliott Hughes
4339bac055674d23770b9a724221b728e443196ea7Elliott HughesSKIP_MAIN_UNDEFINED("__NR_osf_utimes")
4439bac055674d23770b9a724221b728e443196ea7Elliott Hughes
4539bac055674d23770b9a724221b728e443196ea7Elliott Hughes#endif
46