mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay/017: use af_unix to create socket test file
Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
3813cafb81
commit
8a76c40445
+4
-1
@@ -34,6 +34,7 @@ seq=`basename $0`
|
|||||||
seqres=$RESULT_DIR/$seq
|
seqres=$RESULT_DIR/$seq
|
||||||
echo "QA output created by $seq"
|
echo "QA output created by $seq"
|
||||||
|
|
||||||
|
here=`pwd`
|
||||||
tmp=/tmp/$$
|
tmp=/tmp/$$
|
||||||
status=1 # failure is the default!
|
status=1 # failure is the default!
|
||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
@@ -52,6 +53,7 @@ _cleanup()
|
|||||||
_supported_fs overlay
|
_supported_fs overlay
|
||||||
_supported_os Linux
|
_supported_os Linux
|
||||||
_require_scratch
|
_require_scratch
|
||||||
|
_require_test_program "af_unix"
|
||||||
|
|
||||||
rm -f $seqres.full
|
rm -f $seqres.full
|
||||||
|
|
||||||
@@ -68,6 +70,7 @@ ln -s $lowerdir/file $lowerdir/symlink
|
|||||||
mknod $lowerdir/chrdev c 1 1
|
mknod $lowerdir/chrdev c 1 1
|
||||||
mknod $lowerdir/blkdev b 1 1
|
mknod $lowerdir/blkdev b 1 1
|
||||||
mknod $lowerdir/fifo p
|
mknod $lowerdir/fifo p
|
||||||
|
$here/src/af_unix $lowerdir/socket
|
||||||
|
|
||||||
|
|
||||||
_scratch_mount
|
_scratch_mount
|
||||||
@@ -78,7 +81,7 @@ rm -f $tmp.*
|
|||||||
# Test stable stat(2) st_ino
|
# Test stable stat(2) st_ino
|
||||||
|
|
||||||
# Record inode numbers before and after copy up
|
# Record inode numbers before and after copy up
|
||||||
for f in dir file symlink chrdev blkdev fifo; do
|
for f in dir file symlink chrdev blkdev fifo socket; do
|
||||||
ls -id $SCRATCH_MNT/$f >> $tmp.before
|
ls -id $SCRATCH_MNT/$f >> $tmp.before
|
||||||
# chown -h modifies all those file types
|
# chown -h modifies all those file types
|
||||||
chown -h 100 $SCRATCH_MNT/$f
|
chown -h 100 $SCRATCH_MNT/$f
|
||||||
|
|||||||
Reference in New Issue
Block a user