From: "kosaki (Motohiro KOSAKI)" Date: 2013-10-15T03:52:03+09:00 Subject: [ruby-core:57852] [ruby-trunk - Bug #9008] TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM Issue #9008 has been updated by kosaki (Motohiro KOSAKI). ENOTSUPP Note: 524 mean ENOSUPP. CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM uses following code. That says, it's a kernel bug. linux/kernel/time/alarmtimer.c --------------------------- /** * alarm_clock_getres - posix getres interface * @which_clock: clockid * @tp: timespec to fill * * Returns the granularity of underlying alarm base clock */ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp) { clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid; if (!alarmtimer_get_rtcdev()) return -ENOTSUPP; return hrtimer_get_res(baseid, tp); } --------------------------------------------------- Any question? ---------------------------------------- Bug #9008: TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM https://bugs.ruby-lang.org/issues/9008#change-42450 Author: vo.x (Vit Ondruch) Status: Open Priority: Normal Assignee: akr (Akira Tanaka) Category: Target version: ruby -v: ruby -v: ruby 2.1.0dev (2013-09-22 trunk 43011) [armv7hl-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN =begin I observe following two errors on ARM Building Ruby for Fedora Rawhide. It seems that (({:CLOCK_REALTIME_ALARM})) and (({:CLOCK_BOOTTIME_ALARM})) are not supported there. The error message is confusing, though :/ 3) Error: TestProcess#test_clock_getres_constants: Errno::E524: Unknown error 524 - clock_getres /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1752:in `clock_getres' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1752:in `block in test_clock_getres_constants' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1749:in `each' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1749:in `test_clock_getres_constants' 4) Error: TestProcess#test_clock_gettime_constants: Errno::E524: Unknown error 524 - clock_gettime /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1676:in `clock_gettime' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1676:in `block in test_clock_gettime_constants' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1673:in `each' /builddir/build/BUILD/ruby-2.1.0-preview1/test/ruby/test_process.rb:1673:in `test_clock_gettime_constants' I am going to resolve the issue temporary by applying sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ test/ruby/test_process.rb on ARM platform, but is there some better solution? =end -- http://bugs.ruby-lang.org/