Bruce Dubbs wrote:
> Bruce Dubbs wrote:
>
>> pmap: Unknown format in smaps file!
>
>> This indicates a kernel issue to me.  Indeed, looking at /proc/1/smaps,
>> it looks quite different from /proc/1/maps.  The pmap.c code does:
>>
>> fields = sscanf(mapbuf,...
>> if (nfields < 6)
>>       xerrx(EXIT_FAILURE, _("Unknown format in smaps file!"));
>>
>> Now that I look at this, the code has not caught up with the kernel.
>>
>> $ sudo cat /proc/1/smaps
>>
>> 00400000-00408000 r-xp 00000000 103:00 853659 /sbin/init
>> Size:                 32 kB
>> Rss:                  32 kB
>>
>> I suspect it would work with just changing the above to:
>>
>> if (nfields < 6) continue;
>
> That's the wrong fix, but I'm going to debug it!

I'm pretty sure I tracked down this problem.  In pmap.exp there is:

spawn $pmap -X 1
expect_pass $test "$pmap_initname\$"

and spawn is doing some things with stty and the pmap program's newline 
characters are being converted to \r\n.  The expect command is doing a 
regular expression match looking for a newline and \r\n does not match 
that.  To make that pass, we need to do:

sed -i -r 's/(pmap_initname)\\\$/\1/' ./testsuite/pmap.test/pmap.exp

Use -r here instead of -e to avoid some extra baskslashes.

Another note is that the checks for procps-ng need almost all the 
virtual file systems: /dev, /dev/pts, /proc, and /sys.  The only one 
that isn't needed here is /run/shm.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to