summaryrefslogtreecommitdiff
path: root/test/udevd-test/udev-log-amplify.pl
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-12-12 03:35:39 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:13:48 -0700
commit98446db5533596fd4d32f5019479d37d9495f1a1 (patch)
tree4d4ed1f01abbc1dfc473092ce97e1ce7afd221f3 /test/udevd-test/udev-log-amplify.pl
parent7e0bd584756b87d57b3f3e62dcbac208476f1804 (diff)
[PATCH] udevd-test.pl: remove wrong date calculation
A hour wrap during the test run does not work :) Just remove all the useless date conversions as we are only interested in the seconds it takes to process. [root@pim udevd-test]# ./udevd-test.pl 9 ... device: /class/tty/console, action: remove forking udev time: Sat Dec 11 18:59:57 2004 the delay time is: 3 s device: /class/tty/ptmx, action: remove forking udev time: Sat Dec 11 19:00:07 2004 the delay time is: 4013 s the delay time is: 4013 udevd doesn't act properly.
Diffstat (limited to 'test/udevd-test/udev-log-amplify.pl')
-rw-r--r--test/udevd-test/udev-log-amplify.pl32
1 files changed, 4 insertions, 28 deletions
diff --git a/test/udevd-test/udev-log-amplify.pl b/test/udevd-test/udev-log-amplify.pl
index c2d4723974..9e2692ac0c 100644
--- a/test/udevd-test/udev-log-amplify.pl
+++ b/test/udevd-test/udev-log-amplify.pl
@@ -38,35 +38,11 @@ use strict;
my $udev_exe_time = 5;
my $log_file = "/tmp/udev_log.txt";
-# global variables
-my $devpath;
-my $action;
-my $subsystem;
-
-# common functions
-sub getDate {
- # Get current date/time
- # If we want GTM time, simply pass GMT as first argument to this function.
-
- my $format = @_;
- my $date;
-
- if( $format =~ /GMT/i ) {
- $date = gmtime() . " GMT";
- } else {
- $date = localtime();
- }
- return $date;
-}
-
-# main program
if ($ARGV[0]) {
- $subsystem = $ARGV[0];
- $devpath = $ENV{DEVPATH};
- $action = $ENV{ACTION};
-
- # Get current system date
- my $time = getDate();
+ my $subsystem = $ARGV[0];
+ my $devpath = $ENV{DEVPATH};
+ my $action = $ENV{ACTION};
+ my $time = time();
# Logging
if (open(LOGF, ">>$log_file")) {