Re: [PATCH 2/2 -mm] fault-injection: lightweight code-coverage maximizer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 27, 2006 at 11:51:30PM -0800, Don Mullis wrote:
> Allow all non-unique call stacks, as judged by pushed sequence of EIPs,
> to be to be ignored as failure candidates.
> 
> Upon keying in
> 	echo 1 >probability
> 	echo 3 >verbose
> 	echo -1 >times
> a few dozen stacks are printk'ed, then system responsiveness
> recovers to normal.  Similarly, starting a non-trivial program
> will print a few stacks before responsiveness recovers.

What kind of test did you do?

> Intent is to make code-coverage-maximizing test lightweight, perhaps
> light enough to remain enabled during the course of the developer's
> interactive testing of new code.
> 
> Enabled by default. (/debug/fail*/stacktrace-depth > 0)

This doesn't maximize code coverage. It makes fault-injector reject
any failures which have same stacktrace before.

So it should not be default.

> +static bool fail_uniquestack(struct fault_attr *attr)
> +{
> +	u32 oldhash;
> +	u32 newhash;
> +	uint offset = 0;
> +
> +	newhash = unique_stack_p(attr);
> +
> +	for ( oldhash = newhash; oldhash != 0; offset++) {
> +		oldhash = atomic_xchg(
> +			&attr->uniquestack_hash_table[
> +				(newhash+offset)%ARRAY_SIZE(attr->uniquestack_hash_table)],
> +			oldhash);
> +		if (oldhash == newhash)
> +			return false;
> +		if (offset >= ARRAY_SIZE(attr->uniquestack_hash_table)) {
> +			printk(KERN_NOTICE
> +			       "FAULT_INJECTION: table overflow -- "
> +			       "fault injection disabled\n");
> +			return false;
> +		}
> +	}

Updating array in this way is not safe (SMP or interrupt).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux