Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/tests/rms_check.py # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / tests / rms_check.py` 215 lines ยท 13408 bytes Raw Blame History 1 #!/usr/bin/env python3 2 """Host-only fake CUSE acceptance. Python is an independent test oracle, not backend.""" 3 import argparse, hashlib, os, random, socket, struct, subprocess, tempfile 4 from pathlib import Path 5 import rme_check as base 6 from rms_fixture import fixture 7 ROOT=base.ROOT 8 class Server(base.Server): 9 def ioctl(self,fh,nr,header,params=b'',nested=b'',error=0,raw=False): 10 cmd=nr if raw else 0xc0004600|(len(header)<<16)|nr 11 out=self.raw(fh,cmd);stages=[header,header+params,header+params+nested] 12 for stage in stages: 13 if not (len(out)>=16 and struct.unpack_from('`4194304`:return 31 49 if sum(self.objects.values())+size>`4194304`:return 81 50 self.objects[obj]=size;self.dead.add(obj);return 0 51 def map(self,obj,va,n,off=0): 52 if obj not in self.objects:return 51 53 if off>self.objects[obj] or n>self.objects[obj]-off or not n or n%4096 or va%4096:return 31 54 if any(va