编译curl 源码包出现"TESTFAIL: These test cases failed: 20 172 507 "等相关的错误
2014-10-23 15:11
344 查看
最近在编译centos6.5 的一些源码包,整个编译工作到了最后收尾的阶段,但是最后有个包curl-7.19.7-37.1.el6.src.rpm 总是编译出错,下面是出错信息:
第一眼看上去出错应该是和test 相关,于是rpmbuild -bp curl.spec,在BUILD 目录下make了一下,编译通过,然后试了试了一下make test,这下出错了,出错的test 有3个,分别是test20,test172,test507
注:这里编译的是curl-7.19.7-37.1.el6.src.rpm 这个版本,在centos6.5 或者centos7 源里的其他版本出错信息可能有差异,此文仅作参考
curl 的包里找到test20,test172,test507 这个三个文件,先看一下test20:
然后看一下报错信息:
表面上能看出的是: 程序返回值应该是6,但返回的是0,所以出错
更深层次的原因网上找了找,资料不多,以下解释翻译自网络:
test20 以及test507 依赖一个不存在的hostname(主机名)---non-existing-host.haxx.se.
然后如果运行的ISP 是某个运营商的话就没法工作,并且登陆该hostname 的时候页面都会显示"What you're looking for doesn't exist"
看起来像是一头雾水,但没猜错的话出错原因应该就是该hostname 不能正常解析,导致test 出错,最后编译出错的
严格意义上来说,这不能算是一个bug,在本机上host 该DNS 也出错:
网上是这么分析的,但是没有给出相应的解决办法,于是根据test20 中的错误返回代码,将6改成0,和程序返回保持一致,test 507 修改方法一样
然后make test , 这样就test 通过了,至于test 172 ,在centos6.5的Update 目录下的版本以及centos 7 中的版本已修复这个问题,详情见patch:
修改好之后,make test 通过.
三个test文件都改好之后,打上patch,Mock 环境中编译通过.
注:如果有更好的解决办法,欢迎贴出来,大家一起讨论.
TESTFAIL: These test cases failed: 20 172 507 TESTDONE: 546 tests were considered during 1593 seconds. TESTINFO: 10 tests were skipped due to these restraints: TESTINFO: "configured as DISABLED" 2 times (563, 564) TESTINFO: "curl lacks netrc_debug support" 6 times (130, 131, 132, 133, 134, 257) TESTINFO: "curl lacks OpenSSL support" 2 times (307, 308)
第一眼看上去出错应该是和test 相关,于是rpmbuild -bp curl.spec,在BUILD 目录下make了一下,编译通过,然后试了试了一下make test,这下出错了,出错的test 有3个,分别是test20,test172,test507
注:这里编译的是curl-7.19.7-37.1.el6.src.rpm 这个版本,在centos6.5 或者centos7 源里的其他版本出错信息可能有差异,此文仅作参考
curl 的包里找到test20,test172,test507 这个三个文件,先看一下test20:
<testcase> <info> <keywords> HTTP FAILURE non-existing host </keywords> </info> # Server-side <reply> <data> </data> </reply> # Client-side <client> <server> none </server> <features> http </features> <name> attempt connect to non-existing host name </name> <command> non-existing-host.haxx.se. </command> </client> # Verify data after the test has been "shot" <verify> <errorcode> 6 </errorcode> </verify> </testcase>
然后看一下报错信息:
表面上能看出的是: 程序返回值应该是6,但返回的是0,所以出错
更深层次的原因网上找了找,资料不多,以下解释翻译自网络:
test20 以及test507 依赖一个不存在的hostname(主机名)---non-existing-host.haxx.se.
然后如果运行的ISP 是某个运营商的话就没法工作,并且登陆该hostname 的时候页面都会显示"What you're looking for doesn't exist"
看起来像是一头雾水,但没猜错的话出错原因应该就是该hostname 不能正常解析,导致test 出错,最后编译出错的
严格意义上来说,这不能算是一个bug,在本机上host 该DNS 也出错:
网上是这么分析的,但是没有给出相应的解决办法,于是根据test20 中的错误返回代码,将6改成0,和程序返回保持一致,test 507 修改方法一样
# Verify data after the test has been "shot" <verify> <errorcode> 0 </errorcode> </verify>
然后make test , 这样就test 通过了,至于test 172 ,在centos6.5的Update 目录下的版本以及centos 7 中的版本已修复这个问题,详情见patch:
修改好之后,make test 通过.
三个test文件都改好之后,打上patch,Mock 环境中编译通过.
注:如果有更好的解决办法,欢迎贴出来,大家一起讨论.
相关文章推荐
- Android Studio创建新module时出现: "Failed to resolve: junit:junit:4.12" 编译错误
- 使用Openjdk7编译android源码出现"Could not initialize NSS"错误的解决办法
- 编译出现"undefined reference to `GTK_WIDGET_REALIZED',`GTK_WIDGET_VISIBLE' "相关错误的解决方法
- MTK8127源码编译出现的错误及相关解决办法
- maven编译的时候出现一大堆Test相关的错误
- maven编译的时候出现一大堆Test相关的错误
- 编译ROS包出现错误 提示:invoking "make cmake_check_build_system" failed
- MTK8127源码编译出现的错误及相关解决办法
- android 源码编译 出现 Error occurred during initialization of VM 错误
- 添加#include "windef.h"后出现编译错误的解决办法
- 编译linux下的CVM出现的错误"_libc_wait"的解决
- 关于make/编译android源码中的Launcher2出现错误/error41
- 编译busybox时出现"ioprio_set" undeclared等错误
- 出现"若要针对 .NET Framework 4.0 或更高版本进行编译,则提供程序选项中“compilerVersion”特性的值必须为“v4.0”或更高版本。……"错误
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- 编译内核出现"make CONFIG_DEBUG_SECTION_MISMATCH=y"错误
- Android4.0编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- 编译android源码时错误提示:"duplicate entry: xxx.xx"
- 编译后错误提示为pls-00103:出现符号""在需要下列之一时:begin case declare
- ubuntu11.10,32位操作系统,编译源码的时候出现一下错误