7 static void prepare (int argc
, char *argv
[]);
8 static int do_test (void);
9 #define PREPARE(argc, argv) prepare (argc, argv)
10 #define TEST_FUNCTION do_test ()
11 #include "../test-skeleton.c"
17 prepare (int argc
, char *argv
[])
22 buf
= xasprintf ("cp %s %n%s-copy", argv
[0], &off
, argv
[0]);
23 if (system (buf
) != 0)
25 puts ("system failed");
29 /* Make it not executable. */
31 if (chmod (copy
, 0666) != 0)
33 puts ("chmod failed");
44 char *argv
[] = { copy
, NULL
};
51 printf ("errno = %d (%m), expected EACCES\n", errno
);