From 8a6f1f7fbae9ade2f403ad90abaaf16f46adb38c Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 27 Jan 2016 23:35:29 +0800 Subject: [PATCH] qa/workunits/fs/misc: Add a workunit for tar kernel Documents the test fails if some files were changed while being archived Signed-off-by: Yan, Zheng --- qa/workunits/fs/misc/kernel_untar_tar.sh | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 qa/workunits/fs/misc/kernel_untar_tar.sh diff --git a/qa/workunits/fs/misc/kernel_untar_tar.sh b/qa/workunits/fs/misc/kernel_untar_tar.sh new file mode 100755 index 00000000000..63f8c745b38 --- /dev/null +++ b/qa/workunits/fs/misc/kernel_untar_tar.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# check if there is file changed while being archived + +set -e + +KERNEL=linux-4.0.5 + +wget -q http://download.ceph.com/qa/$KERNEL.tar.xz + +mkdir untar_tar +cd untar_tar + +tar Jxvf ../$KERNEL.tar.xz $KERNEL/Documentation/ +tar cf doc.tar $KERNEL + +tar xf doc.tar +sync +tar c $KERNEL >/dev/null + +rm -rf $KERNEL + +tar xf doc.tar +sync +tar c $KERNEL >/dev/null + +echo Ok