summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-13 09:24:36 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:26 +0100
commit3d5dc0215f7acc752e0ff5904361b86e6bc78695 (patch)
tree69e7c08cf21203a102a8bfbd3524ee91c1d6dd2c /src/test
parent720c2fda98c48f7e65241c22abc0297d06ca5299 (diff)
detect-virt: do not try to read all of /proc/cpuinfo
Quoting https://github.com/systemd/systemd/issues/10074: > detect_vm_uml() reads /proc/cpuinfo with read_full_file() > read_full_file() has a file max limit size of READ_FULL_BYTES_MAX=(4U*1024U*1024U) > Unfortunately, the size of my /proc/cpuinfo is bigger, approximately: > echo $(( 4* $(cat /proc/cpuinfo | wc -c))) > 9918072 > This causes read_full_file() to fail and the Condition test fallout. Let's just read line by line until we find an intersting line. This also helps if not running under UML, because we avoid reading as much data. (cherry picked from commit 6058516a14ada1748313af6783f5b4e7e3006654)
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions