* [LTP] [PATCH] fix the system call number of exit_group01
@ 2009-07-16 0:37 Wei Yongjun
2009-07-19 4:47 ` Garrett Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Wei Yongjun @ 2009-07-16 0:37 UTC (permalink / raw)
To: Subrata Modak, ltp-list
The system call number is depend on the system architecture, not
always 252. This patch fixed the problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
--- a/testcases/kernel/syscalls/exit_group/exit_group01.c 2009-05-22 02:14:40.000000000 +0800
+++ b/testcases/kernel/syscalls/exit_group/exit_group01.c 2009-07-15 09:26:23.000000000 +0800
@@ -136,7 +136,7 @@ int main(int ac, char **av) {
} else if (TEST_RETURN == 0){
tst_resm(TINFO, "In the child process");
sleep(5);
- TEST(syscall(252,4));
+ TEST(syscall(__NR_exit_group,4));
}else {
tst_resm(TINFO,"in the parent process");
TEST(w = wait(&status));
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] fix the system call number of exit_group01
2009-07-16 0:37 [LTP] [PATCH] fix the system call number of exit_group01 Wei Yongjun
@ 2009-07-19 4:47 ` Garrett Cooper
2009-07-19 5:22 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Garrett Cooper @ 2009-07-19 4:47 UTC (permalink / raw)
To: Wei Yongjun; +Cc: ltp-list
On Wed, Jul 15, 2009 at 5:37 PM, Wei Yongjun<yjwei@cn.fujitsu.com> wrote:
> The system call number is depend on the system architecture, not always 252. This patch fixed the problem.
>
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
>
> --- a/testcases/kernel/syscalls/exit_group/exit_group01.c 2009-05-22 02:14:40.000000000 +0800
> +++ b/testcases/kernel/syscalls/exit_group/exit_group01.c 2009-07-15 09:26:23.000000000 +0800
> @@ -136,7 +136,7 @@ int main(int ac, char **av) {
> } else if (TEST_RETURN == 0){
> tst_resm(TINFO, "In the child process");
> sleep(5);
> - TEST(syscall(252,4));
> + TEST(syscall(__NR_exit_group,4));
> }else {
> tst_resm(TINFO,"in the parent process");
> TEST(w = wait(&status));
Hi Wei,
The best way to do this (IMHO) may be to add the relevant syscall
number to the architecture specific .in file in
testcases/kernel/include. Do you have the syscall number for your
architecture?
Thanks,
-Garrett
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] fix the system call number of exit_group01
2009-07-19 4:47 ` Garrett Cooper
@ 2009-07-19 5:22 ` Mike Frysinger
2009-07-19 5:35 ` Garrett Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2009-07-19 5:22 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]
On Sunday 19 July 2009 00:47:29 Garrett Cooper wrote:
> On Wed, Jul 15, 2009 at 5:37 PM, Wei Yongjun<yjwei@cn.fujitsu.com> wrote:
> > The system call number is depend on the system architecture, not always
> > 252. This patch fixed the problem.
> >
> > --- a/testcases/kernel/syscalls/exit_group/exit_group01.c
> > - TEST(syscall(252,4));
> > + TEST(syscall(__NR_exit_group,4));
>
> The best way to do this (IMHO) may be to add the relevant syscall
> number to the architecture specific .in file in
> testcases/kernel/include. Do you have the syscall number for your
> architecture?
both should be done. syscall() should never be used with a hardcoded #.
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 389 bytes --]
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] fix the system call number of exit_group01
2009-07-19 5:22 ` Mike Frysinger
@ 2009-07-19 5:35 ` Garrett Cooper
0 siblings, 0 replies; 4+ messages in thread
From: Garrett Cooper @ 2009-07-19 5:35 UTC (permalink / raw)
To: Mike Frysinger; +Cc: ltp-list
On Sat, Jul 18, 2009 at 10:22 PM, Mike Frysinger<vapier@gentoo.org> wrote:
> On Sunday 19 July 2009 00:47:29 Garrett Cooper wrote:
>> On Wed, Jul 15, 2009 at 5:37 PM, Wei Yongjun<yjwei@cn.fujitsu.com> wrote:
>> > The system call number is depend on the system architecture, not always
>> > 252. This patch fixed the problem.
>> >
>> > --- a/testcases/kernel/syscalls/exit_group/exit_group01.c
>> > - TEST(syscall(252,4));
>> > + TEST(syscall(__NR_exit_group,4));
>>
>> The best way to do this (IMHO) may be to add the relevant syscall
>> number to the architecture specific .in file in
>> testcases/kernel/include. Do you have the syscall number for your
>> architecture?
>
> both should be done. syscall() should never be used with a hardcoded #.
Agreed.
-Garrett
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-19 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 0:37 [LTP] [PATCH] fix the system call number of exit_group01 Wei Yongjun
2009-07-19 4:47 ` Garrett Cooper
2009-07-19 5:22 ` Mike Frysinger
2009-07-19 5:35 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox