From: chrubis@suse.cz
To: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] modify_ldt/modify_ldt03.c: add a new test
Date: Tue, 18 Mar 2014 14:35:54 +0100 [thread overview]
Message-ID: <20140318133554.GA12227@rei> (raw)
In-Reply-To: <1392894122.2053.11.camel@G08JYZSD130126>
Hi!
> +#include "config.h"
> +#include "test.h"
> +#include "usctest.h"
> +
> +TCID_DEFINE(modify_ldt03);
This macro is primarily used to define right TCID when compiling two
tests from one source (the _16 ones). There is no need to use it
otherwise.
> +int TST_TOTAL = 1;
> +
> +#if defined(__i386__) && defined(HAVE_MODIFY_LDT)
> +
> +#ifdef HAVE_ASM_LDT_H
> +#include <asm/ldt.h>
> +#endif
> +extern int modify_ldt(int, void *, unsigned long);
> +
> +#include <asm/unistd.h>
> +#include <string.h>
> +#include <sys/wait.h>
> +#include <errno.h>
> +#include "safe_macros.h"
> +
> +static unsigned long bytecount = 10;
Where did you get this number from? Is this sizeof(struct user_desc) ?
> +static void *ptr;
Do you need to allocate the memory, wouldn't char buf[bytecount] do the
same?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-03-18 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 11:02 [LTP] [PATCH] modify_ldt/modify_ldt03.c: add a new test Zeng Linggang
2014-03-18 13:35 ` chrubis [this message]
[not found] ` <1395207368.3217.1.camel@G08JYZSD130126>
2014-03-19 16:31 ` [LTP] [PATCH v2] " chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140318133554.GA12227@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=zenglg.jy@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox