1 Star 0 Fork 27

small_leek/zstd

forked from src-openEuler/zstd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-zstd-1.5.0-patch-2-add-tests-set-mtime-on-output-files.patch 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxiao 提交于 2021-11-03 16:33 . add tests - set-mtime-on-output-files
diff -Nur zstd-1.5.0/tests/playTests.sh new-zstd-1.5.0/tests/playTests.sh
--- zstd-1.5.0/tests/playTests.sh 2021-05-14 22:59:34.000000000 +0800
+++ new-zstd-1.5.0/tests/playTests.sh 2021-11-03 11:22:19.974962223 +0800
@@ -124,6 +124,13 @@
Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
esac
+assertSameMTime() {
+ MT1=$($MTIME "$1")
+ MT2=$($MTIME "$2")
+ echo MTIME $MT1 $MT2
+ [ "$MT1" = "$MT2" ] || die "mtime on $1 doesn't match mtime on $2 ($MT1 != $MT2)"
+}
+
GET_PERMS="stat -c %a"
case "$UNAME" in
Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;;
@@ -583,6 +590,17 @@
rm -f tmp.img tmp.img.zst tmp.img.copy
fi
+println "\n==> zstd created file timestamp tests"
+datagen > tmp
+touch -m -t 200001010000.00 tmp
+println "test: copy mtime in file -> file compression"
+zstd -f tmp -o tmp.zst
+assertSameMTime tmp tmp.zst
+println "test: copy mtime in file -> file decopmresssion"
+zstd -f -d tmp.zst -o tmp.out
+assertSameMTime tmp.zst tmp.out
+rm -f tmp
+
println "\n===> compress multiple files into an output directory, --output-dir-flat"
println henlo > tmp1
mkdir tmpInputTestDir
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/small_leek/zstd.git
[email protected]:small_leek/zstd.git
small_leek
zstd
zstd
master

搜索帮助