OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [stat8.c] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 jlechner
/* For this test, we need to do the lstat syscall directly, or else
2
   glibc gets a SEGV.
3
#notarget: cris*-*-elf
4
*/
5
 
6
#include <unistd.h>
7
#include <sys/syscall.h>
8
#include <stdio.h>
9
#include <errno.h>
10
#include <stdlib.h>
11
 
12
int main (void)
13
{
14
  int ret;
15
 
16
  /* From Linux, we get EFAULT.  The simulator sends us EINVAL.  */
17
  ret = syscall (SYS_lstat64, ".", NULL);
18
  if (ret != -1 || (errno != EINVAL && errno != EFAULT))
19
    {
20
      perror ("lstat");
21
      abort ();
22
    }
23
 
24
  printf ("pass\n");
25
  exit (0);
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.