Skip to contentSkip to conversation

fix numactl test

PATCH In review Rick "Zero_Chaos" Farina 2 participants 4 messages May 4, 2015 – May 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix numactl test

I apologize if this is already handled, however, a quick google search didn't help me find any version control systems so I'm submitting here.

In Gentoo we got a bug, where numactl fails tests if it isn't already installed:

https://bugs.gentoo.org/show_bug.cgi?id=502586

./bind_range: line 92: numactl: command not found
./bind_range: line 93: numactl: command not found

The origin is fairly trivial, it appears that on the noted lines it's calling "numactl" instead of "../numactl" like it should. Which means it will try to use an installed numactl (possibly older) and fail if it isn't installed at all.

Here is the tested and trivial patch to fix this behavior, please accept it.

diff -Naur numactl-2.0.10-orig/test/bind_range
numactl-2.0.10/test/bind_range

test/bind_range +1 -4
@@ -93,8 +93,8 @@
 
 HIGHESTCPU=$(grep 'processor' /proc/cpuinfo | tail -n1 | cut -f2 -d':')
 HIGHESTCPU=$(echo $HIGHESTCPU | cut -f2 -d' ')
-HIGHESTNODE=$(numactl -H | grep -e 'node [0-9]* cpus' | tail -n1 | cut
-f2 -d' ')
-LOWESTNODE=$(numactl -H | grep -e 'node [0-9]* cpus' | head -n1 | cut
-f2 -d' ')
+HIGHESTNODE=$(../numactl -H | grep -e 'node [0-9]* cpus' | tail -n1 |

cut -f2 -d' ')
+LOWESTNODE=$(../numactl -H | grep -e 'node [0-9]* cpus' | head -n1 | cut -f2 -d' ')

get_mask

Thanks,
Zero

#1 lore raw

Hi Rick,

Quoted 2 lines · Rick "Zero_Chaos" Farina

I apologize if this is already handled, however, a quick google search didn't help me find any version control systems so I'm submitting here.

The numactl sources have been recently uploaded to this git repository:
https://github.com/numactl/numactl

Quoted 5 lines

In Gentoo we got a bug, where numactl fails tests if it isn't already installed:

https://bugs.gentoo.org/show_bug.cgi?id=502586

Quoted 7 lines

./bind_range: line 92: numactl: command not found
./bind_range: line 93: numactl: command not found

The origin is fairly trivial, it appears that on the noted lines it's calling "numactl" instead of "../numactl" like it should. Which means it will try to use an installed numactl (possibly older) and fail if it isn't installed at all.

Yes, this was fixed in this commit:
https://github.com/numactl/numactl/commit/25c052affbbcd2df0f67376d18d3ac4028326175

It's more general, as it adds the build directory to $PATH and it also works when an out-of-tree build is used.

May I suggest that you upgrade to the latest 2.0.10 which does contain this fix?

Cheers,
Filipe

#2 lore raw
Quoted 23 lines · Filipe Brandenburger

Hi Rick,

Quoted 2 lines · Rick "Zero_Chaos" Farina

I apologize if this is already handled, however, a quick google search didn't help me find any version control systems so I'm submitting here.

The numactl sources have been recently uploaded to this git repository:
https://github.com/numactl/numactl

Quoted 5 lines

In Gentoo we got a bug, where numactl fails tests if it isn't already installed:

https://bugs.gentoo.org/show_bug.cgi?id=502586

Quoted 7 lines

./bind_range: line 92: numactl: command not found
./bind_range: line 93: numactl: command not found

The origin is fairly trivial, it appears that on the noted lines it's calling "numactl" instead of "../numactl" like it should. Which means it will try to use an installed numactl (possibly older) and fail if it isn't installed at all.

Quoted 7 lines

Yes, this was fixed in this commit:
https://github.com/numactl/numactl/commit/25c052affbbcd2df0f67376d18d3ac4028326175

It's more general, as it adds the build directory to $PATH and it also works when an out-of-tree build is used.

May I suggest that you upgrade to the latest 2.0.10 which does contain this fix?

2.0.10 has a bug related to gentoo which I haven't figured out yet (doesn't appear to be upstream related afaict so far so don't worry about it) so when I saw the same call to numactl in both I assumed the bug was still there. Glad it's fixed, thanks for the work :-)

-Zero_Chaos

#3 lore raw

Hi Rick,

Quoted 3 lines · Rick "Zero_Chaos" Farina

2.0.10 has a bug related to gentoo which I haven't figured out yet (doesn't appear to be upstream related afaict so far so don't worry about it)

Do you have a Gentoo bug tracking the issue?

2.0.10 was the first version that switched the build to use autotools so the .ebuild probably needs to be updated to include a call to ./configure in the build process...

Cheers,
Filipe