Fix spelling mistake: wierd*hacks --> weird*hacks

Also add a testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@265
This commit is contained in:
Julian Seward 2002-05-12 10:52:16 +00:00
parent 2943666eb5
commit d6920d2b5c
13 changed files with 63 additions and 20 deletions

View File

@ -565,7 +565,7 @@ follows:
described in detail in <a href="#cache">Section 7</a>.
</li><br><p>
<li><code>--wierd-hacks=hack1,hack2,...</code>
<li><code>--weird-hacks=hack1,hack2,...</code>
Pass miscellaneous hints to Valgrind which slightly modify the
simulated behaviour in nonstandard or dangerous ways, possibly
to help the simulation of strange features. By default no hacks

View File

@ -565,7 +565,7 @@ follows:
described in detail in <a href="#cache">Section 7</a>.
</li><br><p>
<li><code>--wierd-hacks=hack1,hack2,...</code>
<li><code>--weird-hacks=hack1,hack2,...</code>
Pass miscellaneous hints to Valgrind which slightly modify the
simulated behaviour in nonstandard or dangerous ways, possibly
to help the simulation of strange features. By default no hacks

View File

@ -67,7 +67,7 @@ do
--suppressions=*) vgopts="$vgopts $arg"; shift;;
--cachesim=yes) vgopts="$vgopts $arg"; shift;;
--cachesim=no) vgopts="$vgopts $arg"; shift;;
--wierd-hacks=*) vgopts="$vgopts $arg"; shift;;
--weird-hacks=*) vgopts="$vgopts $arg"; shift;;
# options for debugging Valgrind
--sanity-level=*) vgopts="$vgopts $arg"; shift;;
--single-step=yes) vgopts="$vgopts $arg"; shift;;
@ -133,7 +133,7 @@ if [ $# = 0 ] || [ z"$dousage" = z1 ]; then
echo " --check-addrVs=no|yes experimental lighterweight checking? [yes]"
echo " yes == Valgrind's original behaviour"
echo " --cachesim=no|yes do cache profiling? [no]"
echo " --wierd-hacks=hack1,hack2,... [no hacks selected]"
echo " --weird-hacks=hack1,hack2,... [no hacks selected]"
echo " recognised hacks are: ioctl-VTIME"
echo ""
echo

View File

@ -263,7 +263,7 @@ extern Int VG_(clo_dump_error);
/* Number of parents of a backtrace. Default: 8. */
extern Int VG_(clo_backtrace_size);
/* Engage miscellaneous wierd hacks needed for some progs. */
extern Char* VG_(clo_wierd_hacks);
extern Char* VG_(clo_weird_hacks);
/* ---------------------------------------------------------------------

View File

@ -441,7 +441,7 @@ Int VG_(clo_trace_pthread_level);
ULong VG_(clo_stop_after);
Int VG_(clo_dump_error);
Int VG_(clo_backtrace_size);
Char* VG_(clo_wierd_hacks);
Char* VG_(clo_weird_hacks);
/* This Bool is needed by wrappers in vg_clientmalloc.c to decide how
to behave. Initially we say False. */
@ -534,7 +534,7 @@ static void process_cmd_line_options ( void )
VG_(clo_stop_after) = 1000000000000LL;
VG_(clo_dump_error) = 0;
VG_(clo_backtrace_size) = 4;
VG_(clo_wierd_hacks) = NULL;
VG_(clo_weird_hacks) = NULL;
eventually_logfile_fd = VG_(clo_logfile_fd);
@ -799,8 +799,8 @@ static void process_cmd_line_options ( void )
else if (STREQ(argv[i], "--trace-pthread=all"))
VG_(clo_trace_pthread_level) = 2;
else if (STREQN(14, argv[i], "--wierd-hacks="))
VG_(clo_wierd_hacks) = &argv[i][14];
else if (STREQN(14, argv[i], "--weird-hacks="))
VG_(clo_weird_hacks) = &argv[i][14];
else if (STREQN(13, argv[i], "--stop-after="))
VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);

View File

@ -979,7 +979,7 @@ void poll_for_ready_fds ( void )
writable, for some reason. Ask me not why. Since this
is strange and potentially troublesome we only do it if
the user asks specially. */
if (VG_(strstr)(VG_(clo_wierd_hacks), "ioctl-VTIME") != NULL)
if (VG_(strstr)(VG_(clo_weird_hacks), "ioctl-VTIME") != NULL)
VKI_FD_SET(fd, &writefds);
VKI_FD_SET(fd, &readfds); break;
case __NR_write:

View File

@ -565,7 +565,7 @@ follows:
described in detail in <a href="#cache">Section 7</a>.
</li><br><p>
<li><code>--wierd-hacks=hack1,hack2,...</code>
<li><code>--weird-hacks=hack1,hack2,...</code>
Pass miscellaneous hints to Valgrind which slightly modify the
simulated behaviour in nonstandard or dangerous ways, possibly
to help the simulation of strange features. By default no hacks

View File

@ -565,7 +565,7 @@ follows:
described in detail in <a href="#cache">Section 7</a>.
</li><br><p>
<li><code>--wierd-hacks=hack1,hack2,...</code>
<li><code>--weird-hacks=hack1,hack2,...</code>
Pass miscellaneous hints to Valgrind which slightly modify the
simulated behaviour in nonstandard or dangerous ways, possibly
to help the simulation of strange features. By default no hacks

43
tests/weirdioctl.c Normal file
View File

@ -0,0 +1,43 @@
/* A program which sets a readable fd to have a timeout, and therefore
needs --weird-hacks=ioctl-VTIME in order to run without
blocking. */
#include <stdio.h>
#include <sys/ioctl.h>
#include <termio.h>
int main ( void )
{
int c;
int res;
struct termio tty, oldtty;
/**
** Save the old tty settings, and get rid of echo
** for the new tty settings
**/
ioctl(0, TCGETA, &oldtty);
tty = oldtty;
tty.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL);
tty.c_cc[VMIN] = 0;
tty.c_cc[VTIME] = 5;
res = ioctl(0, TCSETA, &tty);
printf("first ioctl returned %d\n", res);
/**
** Now do whatever stuff you want non-echoed
**/
while (1) {
c = getchar();
printf("got %d\n", c);
}
/**
** Now reset the old settings
**/
res = ioctl(0, TCSETA, &oldtty);
printf("second ioctl returned %d\n", res);
return 0;
}

View File

@ -67,7 +67,7 @@ do
--suppressions=*) vgopts="$vgopts $arg"; shift;;
--cachesim=yes) vgopts="$vgopts $arg"; shift;;
--cachesim=no) vgopts="$vgopts $arg"; shift;;
--wierd-hacks=*) vgopts="$vgopts $arg"; shift;;
--weird-hacks=*) vgopts="$vgopts $arg"; shift;;
# options for debugging Valgrind
--sanity-level=*) vgopts="$vgopts $arg"; shift;;
--single-step=yes) vgopts="$vgopts $arg"; shift;;
@ -133,7 +133,7 @@ if [ $# = 0 ] || [ z"$dousage" = z1 ]; then
echo " --check-addrVs=no|yes experimental lighterweight checking? [yes]"
echo " yes == Valgrind's original behaviour"
echo " --cachesim=no|yes do cache profiling? [no]"
echo " --wierd-hacks=hack1,hack2,... [no hacks selected]"
echo " --weird-hacks=hack1,hack2,... [no hacks selected]"
echo " recognised hacks are: ioctl-VTIME"
echo ""
echo

View File

@ -263,7 +263,7 @@ extern Int VG_(clo_dump_error);
/* Number of parents of a backtrace. Default: 8. */
extern Int VG_(clo_backtrace_size);
/* Engage miscellaneous wierd hacks needed for some progs. */
extern Char* VG_(clo_wierd_hacks);
extern Char* VG_(clo_weird_hacks);
/* ---------------------------------------------------------------------

View File

@ -441,7 +441,7 @@ Int VG_(clo_trace_pthread_level);
ULong VG_(clo_stop_after);
Int VG_(clo_dump_error);
Int VG_(clo_backtrace_size);
Char* VG_(clo_wierd_hacks);
Char* VG_(clo_weird_hacks);
/* This Bool is needed by wrappers in vg_clientmalloc.c to decide how
to behave. Initially we say False. */
@ -534,7 +534,7 @@ static void process_cmd_line_options ( void )
VG_(clo_stop_after) = 1000000000000LL;
VG_(clo_dump_error) = 0;
VG_(clo_backtrace_size) = 4;
VG_(clo_wierd_hacks) = NULL;
VG_(clo_weird_hacks) = NULL;
eventually_logfile_fd = VG_(clo_logfile_fd);
@ -799,8 +799,8 @@ static void process_cmd_line_options ( void )
else if (STREQ(argv[i], "--trace-pthread=all"))
VG_(clo_trace_pthread_level) = 2;
else if (STREQN(14, argv[i], "--wierd-hacks="))
VG_(clo_wierd_hacks) = &argv[i][14];
else if (STREQN(14, argv[i], "--weird-hacks="))
VG_(clo_weird_hacks) = &argv[i][14];
else if (STREQN(13, argv[i], "--stop-after="))
VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);

View File

@ -979,7 +979,7 @@ void poll_for_ready_fds ( void )
writable, for some reason. Ask me not why. Since this
is strange and potentially troublesome we only do it if
the user asks specially. */
if (VG_(strstr)(VG_(clo_wierd_hacks), "ioctl-VTIME") != NULL)
if (VG_(strstr)(VG_(clo_weird_hacks), "ioctl-VTIME") != NULL)
VKI_FD_SET(fd, &writefds);
VKI_FD_SET(fd, &readfds); break;
case __NR_write: