From: Erez Zadok Date: Sat, 14 May 2022 23:04:14 +0000 (-0400) Subject: rename file X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=8eab2d568b777b7aa87959fcc1c57f6e7d6e955c;p=wrapfs-mgmt.git rename file --- diff --git a/idmap-tests/test.sh b/idmap-tests/test.sh deleted file mode 100755 index 3d8eb01..0000000 --- a/idmap-tests/test.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -SCRATCH_DEV=/dev/sdb -SCRATCH_DIR=/n/scratch -LOWER_DIR=/n/lower -TMP_DIR=/n/tmp -FS_TYPE=ext4 - -function runcmd -{ - echo "CMD: $@" - sleep 0.25 - $@ - ret=$? - if test $ret -ne 0 && test "$1 $2 $3" != 'mount -t wrapfs'; then - echo "$0: exit code $ret" - exit $ret - fi -} - -dirs="$TMP_DIR $LOWER_DIR $SCRATCH_DIR" -for d in $dirs; do - echo checking dir $d - if cat /proc/mounts | grep $d; then - runcmd umount $d - fi -done - -runcmd mkfs -t $FS_TYPE $SCRATCH_DEV <<< y -runcmd mount $SCRATCH_DEV $SCRATCH_DIR -runcmd rm -rf $SCRATCH_DIR/* -runcmd touch $SCRATCH_DIR/root -runcmd touch $SCRATCH_DIR/ubuntu -runcmd chown ubuntu $SCRATCH_DIR/ubuntu -runcmd touch $SCRATCH_DIR/luser -runcmd chown luser $SCRATCH_DIR/luser -ls1=$(ls -l $SCRATCH_DIR) - -runcmd ./mount-idmapped --map-mount b:0:1000:1 --map-mount b:1000:1001:1 --map-mount b:1001:0:1 $SCRATCH_DIR $LOWER_DIR -runcmd mount -t wrapfs $LOWER_DIR $TMP_DIR -if test $ret != 32; then - echo wrapfs returned unexpected error: $ret -else - echo wrapfs returned correct error attempting to mount on idmapped mount -fi - -#ls2=$(ls -l $TMP_DIR) -#echo $ls1 -#echo $ls2