lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJe_Zhdq4sFGgv-CJf12_qJzFq+oASTmsD8xReX877V1NYSCBw@mail.gmail.com>
Date:   Fri, 4 Oct 2019 11:34:45 -0500
From:   Jassi Brar <jaswinder.singh@...aro.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [BUGFIX PATCH] selftests: Use real temporary working directory
 for archiving

On Fri, 4 Oct 2019 at 00:13, Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> Use real temporary working directory for generating kselftest
> archive.
>
> tools/testing/selftests/kselftest directory has been used for
> the temporary working directory for making a tar archive from
> gen_kselftest_tar.sh, and it removes the directory for cleanup.
>
> However, since the kselftest directory became a part of the
> repository, it must not be used as a working dir.
>
> Introduce mktemp to prepare a temporary working directory
> for archiving kselftests.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
>  tools/testing/selftests/gen_kselftest_tar.sh |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/gen_kselftest_tar.sh b/tools/testing/selftests/gen_kselftest_tar.sh
> index a27e2eec3586..eba1e9987ffc 100755
> --- a/tools/testing/selftests/gen_kselftest_tar.sh
> +++ b/tools/testing/selftests/gen_kselftest_tar.sh
> @@ -38,16 +38,16 @@ main()
>         esac
>         fi
>
> -       install_dir=./kselftest
> +       tmpdir=`mktemp -d ./install-XXXXXX` || exit 1
>
>  # Run install using INSTALL_KSFT_PATH override to generate install
>  # directory
> -./kselftest_install.sh
> -tar $copts kselftest${ext} $install_dir
> +./kselftest_install.sh $tmpdir
> +tar $copts kselftest${ext} -C $tmpdir kselftest
>  echo "Kselftest archive kselftest${ext} created!"
>
>  # clean up install directory
> -rm -rf kselftest
> +rm -rf $tmpdir
>  }
>
>  main "$@"
>
FWIW,  Acked-by: Jassi Brar <jaswinder.singh@...aro.org>

-- 
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  -
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ