]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: generic/273: do not use /proc/cpuinfo
authorStanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Wed, 23 Oct 2013 11:58:44 +0000 (11:58 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 23 Oct 2013 23:57:14 +0000 (18:57 -0500)
The content of /proc/cpuinfo file is platform-dependent.
So we can not use it reliably to check a number of available cpus.
It would be better to use sysfs interface, as _no_of_online_cpus() does.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
tests/generic/273

index d149808887637f1916d2663b44e9f17fce4d01ea..c0284383443f0e34723892874205ae52465c207f 100755 (executable)
@@ -47,7 +47,7 @@ count=2
 
 _threads_set()
 {
-       _cpu_num=`cat /proc/cpuinfo | grep "processor" | wc -l`
+       _cpu_num=`_no_of_online_cpus`
        threads=$(($_cpu_num * 50))
        if [ $threads -gt 200 ]
        then