]>
git.saurik.com Git - apple/xnu.git/blob - libkern/kxld/tests/loadtest.py
4 from subprocess
import call
, Popen
, PIPE
7 pipe
= Popen("/usr/sbin/kextfind \( -l -and -x -and -arch i386 \)", shell
=True, stdout
=PIPE
).stdout
11 kexts
.append(line
.strip())
12 line
= pipe
.readline()
14 NULL
= open("/dev/null")
18 print "Processing", kext
19 #cmd = "/sbin/kextload -ns /tmp/syms \"%s\"" % kext
20 cmd
= "/sbin/kextload \"%s\"" % kext
21 kextload
= Popen(cmd
, shell
=True, stdin
=PIPE
, stdout
=PIPE
)
23 kextload
.stdin
.write("0x1000\n");
24 retcode
= kextload
.wait()
26 print >>sys
.stderr
, "*** kextload of %s was terminated by signal %d" % (kext
, -retcode
)
28 print >>sys
.stderr
, "*** kextload of %s failed with return code %d" % (kext
, retcode
)
30 print >>sys
.stderr
, "Execution failed:", e