oec-hardware/oec-hardware-1.1.6-2-fix-dpdk-show-numa-pages.patch
xieguangyao00 e82ca714a9 Fix dpdk show numa pages
(cherry picked from commit 8019a7335b7b99b1892d5cb601d1739117a5d972)
2024-10-26 16:47:56 +08:00

15 lines
786 B
Diff

diff -Naur rpm/tests/compatible/dpdk/hugepages.py oech/tests/compatible/dpdk/hugepages.py
--- rpm/tests/compatible/dpdk/hugepages.py 2024-09-25 15:21:01.000000000 +0800
+++ oech/tests/compatible/dpdk/hugepages.py 2024-10-18 10:06:36.033839943 +0800
@@ -62,6 +62,10 @@
for numa_path in glob.glob('/sys/devices/system/node/node*'):
node = numa_path[29:] # slice after /sys/devices/system/node/node
path = os.path.join(numa_path, 'hugepages')
+ if not os.path.exists(path):
+ self.logger.info("%s doesn't exist" % path)
+ continue
+
for hdir in os.listdir(path):
comm = self.command.run_cmd("cat %s/%s/nr_hugepages" % (path, hdir))
pages = int(comm[0].strip('\n'))