Hi, 

I am using the LTP 20081031 version and I am encountering the error when
running hugeshmget03.
hugeshmget03 0 INFO : errno = 12: Cannot allocate memory
hugeshmget03 1 BROK : Didn't get ENOSPC in test setup.

I currently have 2 x 1GB Memory populated in my system.  I have also
configured 512 Hugepages of size 2048kb.  

Could someone give me a better insight to this failure and what this loop
does:
        /*
         * Use a while loop to create the maximum number of memory segments.
         * If the loop exceeds MAXIDS, then break the test and cleanup.
         */
        while ((shm_id_1 = shmget(IPC_PRIVATE, HUGE_SHM_SIZE, SHM_HUGETLB |
IPC_CREAT |
             IPC_EXCL | SHM_RW)) != -1) {
                shm_id_arr[num_shms++] = shm_id_1;
                if (num_shms == MAXIDS) {
                        tst_brkm(TBROK, cleanup, "The maximum number of shared "
                                 "memory ID's has been\n\t reached.  Please "
                                 "increase the MAXIDS value in the test.");
                }
        }

        /*
         * If the errno is other than ENOSPC, then something else is wrong.
         */
        if (errno != ENOSPC) {
                tst_resm(TINFO, "errno = %d : %s", errno, strerror(errno));
                tst_brkm(TBROK, cleanup, "Didn't get ENOSPC in test setup");
        }
}
When I was putting a watch to num_shms, it seems like once it reaches to the
value 1 or 2, it will exit the while loop.

Thanks for all your help



-- 
View this message in context: 
http://www.nabble.com/hugeshmget03.c-%22Didn%27t-get-ENOSPC-in-test-setup%22-tp21319323p21319323.html
Sent from the ltp-list mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to