--=_courier-16710-1049730110-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sorry for the delay in response.....I was very busy with this month's
release. I reviewed the testcase, and you have coded it the correct way
using __syscall. I believe the problem is that we need to define
__NR_timer_create/delete in the test itself. I tried this and the test
compiled and executed correctly. However, I looked at the kernel, and it
seems that there is a BUG in the code....there are different numbers
assigned to the timer system calls for different archs:
# grep -r __NR_timer_create /usr/src/linux-2.5.66/include/*
/usr/src/linux-2.5.66/include/asm-i386/unistd.h:#define __NR_timer_create
259
/usr/src/linux-2.5.66/include/asm-ppc/unistd.h:#define __NR_timer_create
240
/usr/src/linux-2.5.66/include/asm-ppc64/unistd.h:#define __NR_timer_create
240
/usr/src/linux-2.5.66/include/asm-x86_64/unistd.h:#define __NR_timer_create
222
# grep -r __NR_timer_delete /usr/src/linux-2.5.66/include/*
/usr/src/linux-2.5.66/include/asm-i386/unistd.h:#define __NR_timer_delete
(__NR_timer_create+4)
/usr/src/linux-2.5.66/include/asm-ppc/unistd.h:#define __NR_timer_delete
244
/usr/src/linux-2.5.66/include/asm-ppc64/unistd.h:#define __NR_timer_delete
244
/usr/src/linux-2.5.66/include/asm-x86_64/unistd.h:#define __NR_timer_delete
226
Obviously, we could add additional code to check for the running arch and
define the syscall accordingly, however I'm not sure this is the correct
way to go. I'm copying our list, as well as the kernel mailing list about
this, because I "think" the system calls should be defined to the same
numbers across all architectures....but I'm not positive. BTW, I attached
the testcase with my changes....which will only work on i386.
- Robbie
Robert V. Williamson <robbiew@us.ibm.com>
Linux Test Project
Web: http://ltp.sourceforge.net
IRC: #ltp on freenode.irc.net
====================
"Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former." -Albert Einstein
(See attached file: timer_delete01.c)(See attached file: Makefile)
"Aniruddha M
Marathe" To: Robert Williamson/Austin/IBM@IBMUS
<aniruddha.marathe cc:
@wipro.com> Subject: Makefile issue
04/03/2003 05:27
AM
Hi,
I am writing testcases for system calls that were recently added in the 2.5
versions of kernel. Since there are some new header files / added
definitions in other header files in 2.5 versions, I have to give something
like
-I/src/ (kernel that supports new definitions/include in makefile for clean
compilation.
I am attaching a test case for timer_delete(2) and a Makefile to give you
an exact idea of the problem.
Please see the makefile
Now if I remove "-I/usr/src/linux-2.5.64/include" from CFLAGS, the
compilation will fail as:
timer_delete01.c: In function `timer_create':
timer_delete01.c:86: `__NR_timer_create' undeclared (first use in this
function)
Since I can't generalize any such path, these test cases will fail for
others. Note that its not issue of kernel version. I can check kernel
version with uname -r in makefile and then compile it (or do not compile
it). The issue is of path.
Can you suggest any way out?
Thanks,
Aniruddha.
#### Makefile has been removed from this note on April 07, 2003 by Robert
Williamson
#### timer_delete01.c has been removed from this note on April 07, 2003 by
Robert Williamson
--=_courier-16710-1049730110-0001-2
Content-Type: application/octet-stream; name="timer_delete01.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="timer_delete01.c"
LyoKICogQ29weXJpZ2h0IChjKSBXaXBybyBUZWNobm9sb2dpZXMgTHRkLCAyMDAzLiAgQWxsIFJp
Z2h0cyBSZXNlcnZlZC4KICoKICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBj
YW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQKICogdW5kZXIgdGhlIHRlcm1zIG9m
IHZlcnNpb24gMiBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMKICogcHVibGlz
aGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24uCiAqCiAqIFRoaXMgcHJvZ3JhbSBp
cyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdvdWxkIGJlIHVzZWZ1bCwgYnV0CiAq
IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkg
b2YKICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1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ciBwcmVtYXR1cmUgZXhpdAogKi8KCnZvaWQKY2xlYW51
cCAoKQp7CgkvKgoJKiBwcmludCB0aW1pbmcgc3RhdHMgaWYgdGhhdCBvcHRpb24gd2FzIHNwZWNp
ZmllZC4KCSogcHJpbnQgZXJybm8gbG9nIGlmIHRoYXQgb3B0aW9uIHdhcyBzcGVjaWZpZWQuCgkq
LwoJVEVTVF9DTEVBTlVQOwoKCS8qIGV4aXQgd2l0aCByZXR1cm4gY29kZSBhcHByb3ByaWF0ZSBm
b3IgcmVzdWx0cyAqLwoJdHN0X2V4aXQgKCk7Cn0JLyogRW5kIGNsZWFudXAoKSAqLwoK
--=_courier-16710-1049730110-0001-2
Content-Type: application/octet-stream; name=Makefile
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Makefile"
Iw0KIyAgQ29weXJpZ2h0IChjKSBJbnRlcm5hdGlvbmFsIEJ1c2luZXNzIE1hY2hpbmVzICBDb3Jw
LiwgMjAwMQ0KIw0KIyAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7ICB5b3UgY2FuIHJl
ZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5DQojICBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhl
IEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQ0KIyAgdGhlIEZyZWUg
U29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IN
CiMgIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uDQojDQojICBUaGlzIHByb2dy
YW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwNCiMg
IGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgIHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJy
YW50eSBv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