xfs
[Top] [All Lists]

Re: [PATCH] xfstests: src/feature.c: print a number of online CPUs

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfstests: src/feature.c: print a number of online CPUs
From: Stanislav Kholmanskikh <stanislav.kholmanskikh@xxxxxxxxxx>
Date: Thu, 24 Oct 2013 18:33:16 +0400
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131024131800.GA27701@xxxxxxxxxxxxxxxxxx>
References: <20131023213152.GP2797@dastard> <1382604998-11037-1-git-send-email-stanislav.kholmanskikh@xxxxxxxxxx> <20131024104042.GT2797@dastard> <20131024131800.GA27701@xxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130917 Thunderbird/17.0.9

On 10/24/2013 05:18 PM, Carlos Maiolino wrote:
Hi Dave,

I'm not sure about setting the default to 1 cpu might me a good behavior. My
apologies if I'm saying something wrong, but, if the 'tester' are trying to do
some test trusting on the amount of cpus, it might not be a good behavior.
I was thinking, how about issue an error message if xfstests can't properly
detect the amount of cpus from the system, and add any kind of usage option to
specify the numbers of cpus? So in case of a error while detecting the amount of
cpus.
What about this:

If we can not determine the number of available cpus we just
print '-1' (as sysconf() returns in that case) and exit with non-zero status.
And verify the exit status in the test cases.

What do you mean by:
"and add any kind of usage option to specify the numbers of cpus"
?

Thanks.



Actually, I'd say we shoul default to 1 cpu if we can't get the
number of CPUs. Clearly we have at least one if we can run this
code. :)

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>