Hello,

The gethostid01 test fails when the host id is not set on a system. The
gethostid() call retrieves "00000000" as the host id. Added a check to
compare the return value with "000000" (omitted 1st two 0's as they
could also be 0x on some systems; needs confirmation).

Signed-off by : Vinay Sridhar <[EMAIL PROTECTED]>

diff -Nuarp
ltp-full-20080930.old/testcases/kernel/syscalls/gethostid/gethostid01.c
ltp-full-20080930/testcases/kernel/syscalls/gethostid/gethostid01.c
---
ltp-full-20080930.old/testcases/kernel/syscalls/gethostid/gethostid01.c
2008-09-30 18:06:40.000000000 +0530
+++ ltp-full-20080930/testcases/kernel/syscalls/gethostid/gethostid01.c
2008-10-15 13:50:36.000000000 +0530
@@ -201,6 +201,11 @@ main(int ac, char **av)
            /* strip off the \n we got from reading the file */
            name[strlen(name)-1] = 0;
 
+           if(strstr(hostid,"000000")) {
+                tst_resm(TCONF, "Host ID has not been set.");
+                tst_exit();   
+            } 
+
            if (strcmp(name, hostid) == 0) {
                tst_resm(TPASS, "Hostid command and gethostid both report hostid
"
                                "is %s", hostid);



Regards,
Vinay

Vinay Sridhar,
Linux Technology Centre,
IBM ISTL,
Bangalore, India


-------------------------------------------------------------------------
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

Reply via email to