mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
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:
@@ -23,6 +23,8 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
|
|
||||||
|
#define STACK_SIZE 0x8000
|
||||||
|
|
||||||
struct option long_options[] =
|
struct option long_options[] =
|
||||||
{
|
{
|
||||||
{"newns", 0, 0, 'n'}, /* create a new namespace */
|
{"newns", 0, 0, 'n'}, /* create a new namespace */
|
||||||
@@ -59,7 +61,7 @@ int main(int argc, char *argv[])
|
|||||||
int waitstatus;
|
int waitstatus;
|
||||||
int c;
|
int c;
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
int stack_size = PAGE_SIZE << 4;
|
int stack_size = STACK_SIZE;
|
||||||
void *child_stack = malloc(stack_size);
|
void *child_stack = malloc(stack_size);
|
||||||
int clone_flags = SIGCHLD;
|
int clone_flags = SIGCHLD;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user