Subject: tests - fix clone test on arm

Merge from trunk commit 2074.

Original message:
  apparmor: Fix clone test on quantal arm omap-4
  
  It turns out that PAGE_SIZE isn't defined on all architectures.
  
  This fixes a regression test failure happening on Ubuntu quantal
  on the arm ti-omap4 architecture.
  
  Signed-off-by: John Johansen <john.johansen@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Steve Beattie 2013-01-03 16:47:10 -08:00
parent ae12cc8e42
commit a99e93c412

View file

@ -23,6 +23,8 @@
#include <sched.h>
#include <linux/unistd.h>
#define STACK_SIZE 0x8000
struct option long_options[] =
{
{"newns", 0, 0, 'n'}, /* create a new namespace */
@ -59,7 +61,7 @@ int main(int argc, char *argv[])
int waitstatus;
int c;
char buf[BUFSIZ];
int stack_size = PAGE_SIZE << 4;
int stack_size = STACK_SIZE;
void *child_stack = malloc(stack_size);
int clone_flags = SIGCHLD;