Re: [vserver] 4.1.39 patch

From: Ghislain Adnet <gadnet_at_aqueos.com>
Date: Wed 05 Apr 2017 - 10:10:13 BST
Message-ID: <e98fed2b-b5db-52e6-fecf-e452eb2e8b2e@aqueos.com>

testfs works if i correct the syntax for recent df on debian. I added the -P flag to have posix output:

here is the mighty patch :

HOST:root@58386hd51145:[~]: diff -Naur testfs.sh testfs.sh.1
--- testfs.sh 2017-04-05 11:02:46.118757957 +0200
+++ testfs.sh.1 2009-11-30 19:46:52.000000000 +0100
@@ -279,9 +279,9 @@
     local space_used=0
     local inodes_used=0

- _DLIMIT_DF_SPACE=`df -P "$path" |
+ _DLIMIT_DF_SPACE=`df "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
- _DLIMIT_DF_INODE=`df -P -i "$path" |
+ _DLIMIT_DF_INODE=`df -i "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
     eval `vdlimit --xid "$xid" "$path" | grep _used=`

@@ -300,7 +300,7 @@
     local df_space=0
     local df_inode=0

- df_space=`df -P "$path" |
+ df_space=`df "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
     df_inode=`df -i "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`

and the result:

HOST:root@58386hd51145:[~]: bash ./testfs.sh -v -D /dev/md/jessieguest2 -M /mnt/ -x -y -z -F ext4
Linux-VServer FS Test [V0.23] Copyright (C) 2005-2009 H.Poetzl
Linux 4.1.39-vs2.3.8.5.2aq x86_64/0.30.216
VCI: 0002:0308 236 13113f11 (ID24)

---
testing ext4 filesystem ...
mke2fs 1.42.12 (29-Aug-2014)
[000]# succeeded.
[001]# succeeded.
mount: /mnt not mounted or bad option
       In some cases useful info is found in syslog - try
       dmesg | tail or so.
[002]# succeeded.
tag related tests ...
[011]# succeeded.
[012]# succeeded.
[014]# succeeded.
cat: /mnt//file_2: Permission denied
cat: /mnt//file_3: Permission denied
[015]# succeeded.
[019]# succeeded.
[020]# succeeded.
[021]# succeeded.
[022]# succeeded.
[023]# succeeded.
[024]# succeeded.
cat: /mnt//file_2: Permission denied
cat: /mnt//file_3: Permission denied
[025]# succeeded.
[026]# succeeded.
tee: /mnt//file_2: Permission denied
tee: /mnt//file_3: Permission denied
[027]# succeeded.
[028]# succeeded.
[033]# succeeded.
[034]# succeeded.
cat: /mnt//file_1: Permission denied
[035]# succeeded.
tee: /mnt//file_1: Permission denied
tee: /mnt//file_2: Permission denied
[037]# succeeded.
[045]# succeeded.
[047]# succeeded.
xattr related tests ...
[101]# succeeded.
[103]# succeeded.
[104]# succeeded.
[106]# succeeded.
[107]# succeeded.
[109]# succeeded.
[112]# succeeded.
[113]# succeeded.
[114]# succeeded.
chattr: Permission denied while reading flags on /mnt//dir_19718
[115]# succeeded.
chmod: changing permissions of ‘/mnt//dir_19718’: Permission denied
[116]# succeeded.
[118]# succeeded.
[119]# succeeded.
[122]# succeeded.
[123]# succeeded.
[124]# succeeded.
[125]# succeeded.
[127]# succeeded.
[128]# succeeded.
[129]# succeeded.
[131]# succeeded.
[132]# succeeded.
[133]# succeeded.
[134]# succeeded.
[135]# succeeded.
[138]# succeeded.
[139]# succeeded.
[148]# succeeded.
[149]# succeeded.
disk limit related tests ...
[201]# succeeded.
16+0 records in
16+0 records out
16384 bytes (16 kB) copied, 0.00012465 s, 131 MB/s
[202]# succeeded.
[203]# succeeded.
[204]# succeeded.
[205]# succeeded.
dd: error writing ‘/mnt//space-300’: No space left on device
33+0 records in
32+0 records out
32768 bytes (33 kB) copied, 0.097836 s, 335 kB/s
[206]# succeeded.
touch: cannot touch ‘/mnt//inodes-300-5’: No space left on device
[207]# succeeded.
[208]# succeeded.
[211]# succeeded.
5+0 records in
5+0 records out
5120 bytes (5.1 kB) copied, 8.5374e-05 s, 60.0 MB/s
[212]# succeeded.
[213]# succeeded.
43+0 records in
43+0 records out
44032 bytes (44 kB) copied, 0.000140861 s, 313 MB/s
touch: cannot touch ‘/mnt//cow-300-1’: No space left on device
[222]# succeeded.
[223]# succeeded.
[231]# succeeded.
3+0 records in
3+0 records out
3072 bytes (3.1 kB) copied, 7.785e-05 s, 39.5 MB/s
touch: cannot touch ‘/mnt//cow-300-9’: No space left on device
[232]# succeeded.
[233]# succeeded.
[239]# succeeded.
[999]# succeeded.
we just need a little look to the hunk fuzz and  replacement Guy made to the patch from Bertl to be officialy compatible :)
ghislain.
Received on Wed Apr 5 10:10:17 2017
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 05 Apr 2017 - 10:10:17 BST by hypermail 2.1.8