Hi,
Following warnings are generated when compiling mm_core_apis.c:
cc -I../../../../include -Wall mm_core_apis.c -L../../../../lib -lltp
-lmm -o mm_core_apis
mm_core_apis.c: In function ‘mm_core_test01’:
mm_core_apis.c:110: warning: pointer targets in assignment differ in
signedness
mm_core_apis.c: In function ‘mm_core_test02’:
mm_core_apis.c:202: warning: pointer targets in assignment differ in
signedness
Attached path fixes them:
Signed-Off-By: Subrata Modak<[EMAIL PROTECTED]>,
--
--- ltp-full-20081023/testcases/kernel/mem/libmm/mm_core_apis.c.orig
2008-10-30 10:04:01.000000000 +0530
+++ ltp-full-20081023/testcases/kernel/mem/libmm/mm_core_apis.c
2008-10-30 10:02:12.000000000 +0530
@@ -107,7 +107,7 @@ mm_core_test01()
tst_resm(TINFO, "test01: Testing Memory Segment Access\n");
tst_resm(TINFO, "test01: Creating 16KB shared memory core area\n");
- if ((alloc_mem_ptr = (char *)mm_core_create(16*1024, NULL)) ==
NULL)
+ if ((alloc_mem_ptr = (unsigned char *)mm_core_create(16*1024,
NULL)) == NULL)
{
mm_err = (char *)mm_error();
tst_brkm(TBROK, cleanup, "test01: mm_core_create: %s\n",
@@ -199,7 +199,7 @@ mm_core_test02()
tst_resm(TINFO, "test02: Testing Memory Locking\n");
tst_resm(TINFO, "test02: Creating shared memory core area\n");
- if ((alloc_mem_ptr = (char *)mm_core_create(16*1024, NULL)) ==
NULL)
+ if ((alloc_mem_ptr = (unsigned char *)mm_core_create(16*1024,
NULL)) == NULL)
{
mm_err = (char *)mm_error();
tst_brkm(TBROK, cleanup, "test02: mm_core_create: %s\n",
Regards--
Subrata
On Thu, 2008-10-30 at 09:57 +0530, Subrata Modak wrote:
> Thanks Jin,
>
> On Thu, 2008-10-30 at 11:23 +0800, Jin Bing Guo wrote:
> > On 10/29 20:25PM, Subrata Modak wrote:
> > > Hi,
> > >
> > > While investigating, i found that:
> > >
> > > ltp-full-20081023/testcases/kernel/mem/libmm
> > >
> > > is not built/installed/run.
> > >
> > > When i tried to build it, it gave me the following error:
> > >
> > > cc -I../../../../include -Wall mm_core_apis.c -L../../../../lib -lltp
> > > -lmm -o mm_core_apis
> > > mm_core_apis.c:44:16: error: mm.h: No such file or directory
> > > mm_core_apis.c: In function 鈥榤m_core_test01鈥?:
> > > mm_core_apis.c:110: warning: implicit declaration of function
> > > 鈥榤m_core_create鈥?
> > > mm_core_apis.c:110: warning: pointer targets in assignment differ in
> > > signedness
> > > mm_core_apis.c:112: warning: implicit declaration of function 鈥榤m_error鈥?
> > > mm_core_apis.c:119: warning: implicit declaration of function
> > > 鈥榤m_core_size鈥?
> > > mm_core_apis.c:147: warning: implicit declaration of function
> > > 鈥榤m_core_delete鈥?
> > > mm_core_apis.c: In function 鈥榤m_core_test02鈥?:
> > > mm_core_apis.c:202: warning: pointer targets in assignment differ in
> > > signedness
> > > mm_core_apis.c:222: warning: implicit declaration of function
> > > 鈥榤m_core_lock鈥?
> > > mm_core_apis.c:222: error: 鈥楳M_LOCK_RW鈥? undeclared (first use in this
> > > function)
> > > mm_core_apis.c:222: error: (Each undeclared identifier is reported only
> > > once
> > > mm_core_apis.c:222: error: for each function it appears in.)
> > > mm_core_apis.c:273: warning: implicit declaration of function
> > > 鈥榤m_core_unlock鈥?
> > > make: *** [mm_core_apis] Error 1
> > >
> > >
> > > Now i have again the following questions:
> > >
> > > 1) Has anybody tried to compile them before,
> > > 2) Is there any necessity to execute these tests now ?
> > >
> > > If yes, how do we solve this and integrate them ? And if not, can we
> > > remove them ?
> > >
> > > Regards--
> > > Subrata
> >
> > I looked into this case. It depends upon the libmm library
> > (http://www.ossp.org/pkg/lib/mm/). Afte instlled the mm-1.4.2.tar.gz on
> > the ppc64, I could compile it well. But it failed in running.
> >
> > [EMAIL PROTECTED] libmm]# make
> > cc -I../../../../include -Wall mm_core_apis.c -L../../../../lib
> > -Wl,--rpath -Wl,/usr/local/lib -lltp -lmm -o mm_core_apis
> > mm_core_apis.c: In function ‘mm_core_test01’:
> > mm_core_apis.c:110: warning: pointer targets in assignment differ in
> > signedness
> > mm_core_apis.c: In function ‘mm_core_test02’:
> > mm_core_apis.c:202: warning: pointer targets in assignment differ in
> > signedness
> > [EMAIL PROTECTED] libmm]# ./mm_core_apis
> > mm_core_apis 0 INFO : Testing Low-Level Shared memory API
> >
> > mm_core_test01 0 INFO : test01: Testing Memory Segment Access
> >
> > mm_core_test01 0 INFO : test01: Creating 16KB shared memory core
> > area
> >
> > mm_core_test01 0 INFO : test01: created shared mem of size: 16384
> >
> > mm_core_test01 0 INFO : test01: Writing 0xf5 bytes to memory area
> >
> > mm_core_test01 0 INFO : test01: Reading 0xf5 bytes from memory
> > area
> >
> > mm_core_test01 0 INFO : Deleting shared memory segment.
> >
> > mm_core_test01 1 PASS : mm_core_test01: Testing Memory Segment
> > Access success
> > mm_core_test02 0 INFO : test02: Testing Memory Locking
> >
> > mm_core_test02 0 INFO : test02: Creating shared memory core area
> >
> > mm_core_test02 0 INFO : test02: child: locking shared memory
> >
> > mm_core_test02 0 INFO : test02: child: lock accuired
> >
> > mm_core_test02 0 INFO : test02: child: writing 0xf4 to memory
> >
> > mm_core_test02 0 INFO : test02: parent: locking shared memory
> >
> > mm_core_test02 0 INFO : test02: child: check if parent could
> > overwrite mem
> >
> > mm_core_test02 2 FAIL : test02: child: parent wrote mem locked by
> > child
> >
> > mm_core_test02 0 INFO : test02: parent: lock accuired
> >
> > mm_core_test02 0 INFO : test02: parent: writing 0xf5 to memory
> >
> > mm_core_test02 0 INFO : test02: parent: check if child could
> > overwrite mem
> >
> > mm_core_test02 0 INFO : test02: parent: child did not overwite
> > parent mem
> >
> > mm_core_test02 0 INFO : test02: parent: unlocking memory
> >
> > mm_core_test02 0 INFO : test02: parent: child exited with: 255
> >
> > Thanks,
> > -- Jin Bing Guo
>
> I installed the library and it built fine, but as you said it failed in
> the execution as below:
>
> $ ./mm_core_apis
> mm_core_apis 0 INFO : Testing Low-Level Shared memory API
>
> mm_core_test01 0 INFO : test01: Testing Memory Segment Access
>
> mm_core_test01 0 INFO : test01: Creating 16KB shared memory core
> area
>
> mm_core_test01 0 INFO : test01: created shared mem of size: 16384
>
> mm_core_test01 0 INFO : test01: Writing 0xf5 bytes to memory area
>
> mm_core_test01 0 INFO : test01: Reading 0xf5 bytes from memory
> area
>
> mm_core_test01 0 INFO : Deleting shared memory segment.
>
> mm_core_test01 1 PASS : mm_core_test01: Testing Memory Segment
> Access success
> mm_core_test02 0 INFO : test02: Testing Memory Locking
>
> mm_core_test02 0 INFO : test02: Creating shared memory core area
>
> mm_core_test02 0 INFO : test02: child: locking shared memory
>
> mm_core_test02 0 INFO : test02: child: lock accuired
>
> mm_core_test02 0 INFO : test02: child: writing 0xf4 to memory
>
> mm_core_test02 0 INFO : test02: parent: locking shared memory
>
> mm_core_test02 0 INFO : test02: child: check if parent could
> overwrite mem
>
> mm_core_test02 2 FAIL : test02: child: parent wrote mem locked by
> child
>
> mm_core_test02 0 INFO : test02: parent: lock accuired
>
> mm_core_test02 0 INFO : test02: parent: writing 0xf5 to memory
>
> mm_core_test02 0 INFO : test02: parent: check if child could
> overwrite mem
>
> mm_core_test02 0 INFO : test02: parent: child did not overwite
> parent mem
>
> mm_core_test02 0 INFO : test02: parent: unlocking memory
>
> mm_core_test02 0 INFO : test02: parent: child exited with: 255
>
> $ echo $?
> 255
>
> If possible, somebody can investigate this and come up with the fix.
> Meanwhile, i will integrate it inside runalltests.sh for users to
> selectively build and run this.
>
> Regards--
> Subrata
>
> > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > Build the coolest Linux based applications with Moblin SDK & win great
> > > prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in the
> > > world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > _______________________________________________
> > > Ltp-list mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/ltp-list
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
--- ltp-full-20081023/testcases/kernel/mem/libmm/mm_core_apis.c.orig 2008-10-30 10:04:01.000000000 +0530
+++ ltp-full-20081023/testcases/kernel/mem/libmm/mm_core_apis.c 2008-10-30 10:02:12.000000000 +0530
@@ -107,7 +107,7 @@ mm_core_test01()
tst_resm(TINFO, "test01: Testing Memory Segment Access\n");
tst_resm(TINFO, "test01: Creating 16KB shared memory core area\n");
- if ((alloc_mem_ptr = (char *)mm_core_create(16*1024, NULL)) == NULL)
+ if ((alloc_mem_ptr = (unsigned char *)mm_core_create(16*1024, NULL)) == NULL)
{
mm_err = (char *)mm_error();
tst_brkm(TBROK, cleanup, "test01: mm_core_create: %s\n",
@@ -199,7 +199,7 @@ mm_core_test02()
tst_resm(TINFO, "test02: Testing Memory Locking\n");
tst_resm(TINFO, "test02: Creating shared memory core area\n");
- if ((alloc_mem_ptr = (char *)mm_core_create(16*1024, NULL)) == NULL)
+ if ((alloc_mem_ptr = (unsigned char *)mm_core_create(16*1024, NULL)) == NULL)
{
mm_err = (char *)mm_error();
tst_brkm(TBROK, cleanup, "test02: mm_core_create: %s\n",
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list