[Qemu-devel] [PATCH] qemu_iotests: Remove _readlink()

Kevin Wolf posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1492761662-5644-1-git-send-email-kwolf@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
tests/qemu-iotests/common.config | 18 ------------------
1 file changed, 18 deletions(-)
[Qemu-devel] [PATCH] qemu_iotests: Remove _readlink()
Posted by Kevin Wolf 6 years, 11 months ago
It is unused.

Suggestetd-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/common.config | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 1222e43..66f4e0b 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -204,23 +204,5 @@ fi
 
 export SAMPLE_IMG_DIR
 
-_readlink()
-{
-    if [ $# -ne 1 ]; then
-        echo "Usage: _readlink filename" 1>&2
-        exit 1
-    fi
-
-    perl -e "\$in=\"$1\";" -e '
-    $lnk = readlink($in);
-    if ($lnk =~ m!^/.*!) {
-        print "$lnk\n";
-    }
-    else {
-        chomp($dir = `dirname $in`);
-        print "$dir/$lnk\n";
-    }'
-}
-
 # make sure this script returns success
 true
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH] qemu_iotests: Remove _readlink()
Posted by Fam Zheng 6 years, 11 months ago
On Fri, 04/21 10:01, Kevin Wolf wrote:
> It is unused.
> 
> Suggestetd-by: Fam Zheng <famz@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.config | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
> index 1222e43..66f4e0b 100644
> --- a/tests/qemu-iotests/common.config
> +++ b/tests/qemu-iotests/common.config
> @@ -204,23 +204,5 @@ fi
>  
>  export SAMPLE_IMG_DIR
>  
> -_readlink()
> -{
> -    if [ $# -ne 1 ]; then
> -        echo "Usage: _readlink filename" 1>&2
> -        exit 1
> -    fi
> -
> -    perl -e "\$in=\"$1\";" -e '
> -    $lnk = readlink($in);
> -    if ($lnk =~ m!^/.*!) {
> -        print "$lnk\n";
> -    }
> -    else {
> -        chomp($dir = `dirname $in`);
> -        print "$dir/$lnk\n";
> -    }'
> -}
> -
>  # make sure this script returns success
>  true
> -- 
> 1.8.3.1
> 

Reviewed-by: Fam Zheng <famz@redhat.com>

Re: [Qemu-devel] [PATCH] qemu_iotests: Remove _readlink()
Posted by Eric Blake 6 years, 11 months ago
On 04/21/2017 03:01 AM, Kevin Wolf wrote:
> It is unused.

Might be worth also mentioning that it was the file's only client of
perl, so removing it also makes it easier to justify removing a check
for $PERL.

> 
> Suggestetd-by: Fam Zheng <famz@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.config | 18 ------------------
>  1 file changed, 18 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu_iotests: Remove _readlink()
Posted by Max Reitz 6 years, 11 months ago
On 21.04.2017 10:01, Kevin Wolf wrote:
> It is unused.
> 
> Suggestetd-by: Fam Zheng <famz@redhat.com>

*Suggested

And, since it now would be rude not to, with that fixed:

Reviewed-by: Max Reitz <mreitz@redhat.com>

> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.config | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
> index 1222e43..66f4e0b 100644
> --- a/tests/qemu-iotests/common.config
> +++ b/tests/qemu-iotests/common.config
> @@ -204,23 +204,5 @@ fi
>  
>  export SAMPLE_IMG_DIR
>  
> -_readlink()
> -{
> -    if [ $# -ne 1 ]; then
> -        echo "Usage: _readlink filename" 1>&2
> -        exit 1
> -    fi
> -
> -    perl -e "\$in=\"$1\";" -e '
> -    $lnk = readlink($in);
> -    if ($lnk =~ m!^/.*!) {
> -        print "$lnk\n";
> -    }
> -    else {
> -        chomp($dir = `dirname $in`);
> -        print "$dir/$lnk\n";
> -    }'
> -}
> -
>  # make sure this script returns success
>  true
>