Hi all, I find a FAIL result in syscalls/swapon03 with RHEL6 kernel, on a x86_64 machine, it always fails with the following message:
swapon03 1 TFAIL : Failed swapon for file swapfile30: errno=EPERM(1): Operation not permitted swapon03 1 TFAIL : Failed to setup swaps This is because in some >=2.6.32 kernels, the CONFIG_MEMORY_FAILURE option is enabled by default in kernel. As the NOTES in man 2 swapon says: "...Since kernel 2.6.32, the limit is decreased by 1 if the kernel is built with the CONFIG_MEMORY_FAILURE option..." so MAX_SWAPFILES is not 30 anymore, it's 29. While LTP defines MAX_SWAPFILES to 30 in include/swaponoff.h(hmmm....hardcode, I don't think it's a good idea :-|). So the way to solve(maybe) the problem is clear: change MAX_SWAPFILES to 29 when CONFIG_MEMORY_FAILURE is enabled. My question is: is there a good way to check whether a kernel option is enabled or not? I searched in the old discussions in this maillist and found nothing. I want to know if the developers have some new ideas? Thanks, Caspar -- /---------------------------------------\ | Name: Caspar Zhang | | Team: Kernel-QE | | IRC: caspar @ #kernel-qe, #eng-china | | Phone: +86-10-6260-8150 | | Cellphone: +86-1381-073-0090 | \---------------------------------------/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
