소스 검색

* properly check for linux version supporting statx

git-svn-id: trunk@48469 -
florian 4 년 전
부모
커밋
33cd5778cd
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      tests/test/units/linux/tstatx.pp

+ 6 - 6
tests/test/units/linux/tstatx.pp

@@ -1,7 +1,7 @@
 { %target=linux }
 { %target=linux }
 uses
 uses
   ctypes,baseunix,linux;
   ctypes,baseunix,linux;
-  
+
 var
 var
   un : utsname;
   un : utsname;
   mystatx : statx;
   mystatx : statx;
@@ -21,13 +21,13 @@ begin
         major:=system.copy(st,1,p-1);
         major:=system.copy(st,1,p-1);
         system.val(major,major_release,err);
         system.val(major,major_release,err);
         if err<>0 then
         if err<>0 then
-          begin 
+          begin
             writeln('Unable to parse first part of linux version ',st,'(',major,') correctly');
             writeln('Unable to parse first part of linux version ',st,'(',major,') correctly');
             halt(2);
             halt(2);
           end;
           end;
         break;
         break;
       end;
       end;
-  
+
   for i:=p+1 to UTSNAME_LENGTH do
   for i:=p+1 to UTSNAME_LENGTH do
     if st[i]='.' then
     if st[i]='.' then
       begin
       begin
@@ -35,20 +35,20 @@ begin
         minor:=system.copy(st,p+1,e-p-1);
         minor:=system.copy(st,p+1,e-p-1);
         system.val(minor,minor_release,err);
         system.val(minor,minor_release,err);
         if err<>0 then
         if err<>0 then
-          begin 
+          begin
             writeln('Unable to second part of parse linux version ',st,'i(',minor,') correctly');
             writeln('Unable to second part of parse linux version ',st,'i(',minor,') correctly');
             halt(2);
             halt(2);
           end;
           end;
         break;
         break;
       end;
       end;
-  if (major_release<4) or (minor_release<11) then
+  if (major_release<4) or ((major_release=4) and (minor_release<11)) then
     begin
     begin
       writeln('This version of Linux: ',st,' does not have fstatx syscall');
       writeln('This version of Linux: ',st,' does not have fstatx syscall');
       halt(0);
       halt(0);
     end
     end
   else
   else
     writeln('This linux version ',st,' should support statx syscall');
     writeln('This linux version ',st,' should support statx syscall');
-     
+
   assign(f,'test.txt');
   assign(f,'test.txt');
   rewrite(f);
   rewrite(f);
   write(f,'ccccc');
   write(f,'ccccc');