代码拉取完成,页面将自动刷新
【标题描述】clock_gettime返回值错误, errno设置错误
【环境信息】
stm32f407
如果有特殊组网,请提供网络拓扑图
【问题复现步骤】
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test that clock_gettime() sets errno to EINVAL if clock_id does not
specify a known clock.
*/
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include "posixtest.h"
#define INVALIDCLOCK 9999
int clock_gettime_8_1(int argc, char *argv[])
{
struct timespec tp;
if (clock_gettime(INVALIDCLOCK, &tp) == -1) {
if (EINVAL == errno) {
printf("Test PASSED\n");
return PTS_PASS;
} else {
printf("errno not set to EINVAL\n");
printf("Test FAILED\n");
return PTS_FAIL;
}
} else {
printf("clock_gettime() did not return failure\n");
return PTS_UNRESOLVED;
}
printf("This code should not be executed.\n");
return PTS_UNRESOLVED;
}
【预期结果】
测试通过
【实际结果】
测试失败
【附件信息】
Hi saarloos, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-embedded, and any of the maintainers: @wl1587 , @beiling.xie , @linzichang , @Wayne Ren
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论