Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#301184 - 01/08/2007 20:38 I hate microsoft
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
(copy and paste from my LiveJournal...)

My job usually involves setting up little private domains, servers, clients, routers, and access points to test a particular bugfix.

It also usually involves running lots of automated tests to exercise and stress the components involved in that bugfix.

Often, the tests must be performed simultaneously on a 32-bit computing platform and a 64-bit computing platform.

Once in a while, my job involves a large amount of hand-testing rather than automated testing. An example of a place where hand-testing comes into play is when you need to test whether a piece of software correctly handles the computer going into sleep mode or hibernate mode. No software can wake up the computer in that case, you need a human finger to push the button.

Very rarely, my job involves a large matrix of different things to test on multiple types of different wireless hardware.

Last week, I needed to start a test suite which involved all of the above. It was very large, involved multiple test machines, and resulted in a test matrix about 80 items deep. Each part of the test matrix involved a lot of swapping of wireless cards, doing various little tasks, and lots of sleeping/hibernating/waking of test computers.

In the middle of all of this last week, my building and my test lab went down due to a power outage, right in the middle of it. Due to the nature of what I was testing and the way the automated portions worked, much of it had to be started over from scratch. Then I had to start all over again the following day, when the circuit panels for my lab, damaged from the prior day's power failure, needed to be replaced.

Meanwhile, another point of confusion was locating various pieces of hardware which met the test requirements, a surprisingly tricky task. I was attempting to locate and verify the hardware right in the middle of the whole power fiasco.

In the confusion, I managed to forget one important point when creating my test matrix: I was supposed to have enabled debug tracing and kept debug logs of each item in the test matrix.

When I completed the test matrix last Friday and reported the results, my manager asked for the log files. I went white as a sheet. I felt awful, I'd let him down. Worse, I had to start the whole procedure over again from scratch. Already behind a couple of days, I was going to have to do it all over again.

So on Monday, when I started over again, I made certain I could keep careful track of the log files. I created and tested a small batch file which would back up and organize the log files, indexing them against each point in the test matrix.

For instance, the batch file contained these lines:

mkdir %1
copy *.etl %1\test%1.etl

This means: make a subfolder named "variable". In this case, "variable" is a sequential number, such as 10, so make a subfolder named 10. Then copy whatever ETL file is sitting in this folder to a file named "test10.etl" in the "10" subfolder. There is only one ETL file in the folder at this point, so saying *.ETL grabs only one file.

It's really a simple batch file. There's more to it than that, but that's the essential heart of it. Each time I would run a test item in the matrix, I would back up the log files into sequentially-numbered folders, with sequentially-numbered names for good measure. Each number corresponding to a point in the test matrix. Then I would note which file corresponded to which test, for later reporting.

I worked for two days getting all of the test items completed and all of the logs backed up. Tuesday, just before leaving for the day, I zip up the logs and send them to the dev to be analyzed.

Today, the dev tells me that the log files are not the correct size. What's up?

He looks at the machine and notices my batch file.

He says the COPY statement is the problem.

It seems that because I said "copy *.etl" instead of "copy wlan.etl", i.e., using a wildcard instead of the exact file name, the files got interpreted as ASCII (they're not) and got truncated whenever they hit an ASCII 26 byte (EOF, or Ctrl-Z).

If I'd simply spec'd the exact filename instead of using *, this wouldn't have happened. (I also could have used the /b parameter to force binary, but I shouldn't have needed that either.)

I now have to do all of that work over again, A THIRD TIME, because of a long-standing bug in the DOS COPY command.

Do they have cyanide pills in the firstaid cabinets here at Microsoft?
_________________________
Tony Fabris

Top
#301185 - 01/08/2007 21:47 Re: I hate microsoft [Re: tfabris]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5543
Loc: Ajijic, Mexico
I seem to remember someone telling a story of a similar genre...

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#301186 - 01/08/2007 21:51 Re: I hate microsoft [Re: tanstaafl.]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Yeah, but that time I was being genuinely stupid.

This time, the COPY command genuinely has a bug. According to the helptext, it should use /B as the default unless combining files. I wasn't combining files. I wasn't being stupid, I had no way of knowing this.
_________________________
Tony Fabris

Top
#301187 - 01/08/2007 21:53 Re: I hate microsoft [Re: tfabris]
AndrewT
old hand

Registered: 16/02/2002
Posts: 867
Loc: Oxford, UK
Bells started ringing for me before I got to the end of your blog... I thought about it from the other end of the problem where I'd want to append a series of binary files using /b.

Technet article
Quote:
Combining files

If you specify more than one Source, separating entries with a plus sign (+), copy combines the files into a single file. If you use wildcard characters (that is, * or ?) in Source, but you specify a single file name in Destination, copy combines all files matching the file name in Source and creates a single file with the file name specified in Destination. In either case, copy assumes the combined files are ASCII files unless you use /b.


Yeah, I know who you work for and I'm not trying to make you feel any worse here. Hopefully you'll draw a tiny bit of comfort about the fact that this was at least documented behaviour.

Top
#301188 - 01/08/2007 22:42 Re: I hate microsoft [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Looks like you also hate DOS.

I don't especially hate Microsoft, I just hate the designers and architects responsible for Windows. It's a better desktop environment than Linux for most people, but it's not hard to compete with something that's largely given away.

Windows is the crap my dogs leaves in the yard. Luckily for the yard situation I've got somebody kind enough to pick up and throw out (it was part of the deal in getting these dogs ) Practically every time I have to use the Windows desktop I feel like throwing a computer out the window. And I'm talking about XP, the BEST UI they have ever created. I don't think I'll ever install Vista onto any machine for any reason. I've long ago stopped recommending family or friends spend any money on that OS.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#301189 - 01/08/2007 22:53 Re: I hate microsoft [Re: tfabris]
jimhogan
carpal tunnel

Registered: 06/10/1999
Posts: 2591
Loc: Seattle, WA, U.S.A.
Ummmm, XCOPY?
_________________________
Jim


'Tis the exceptional fellow who lies awake at night thinking of his successes.

Top
#301190 - 01/08/2007 23:13 Re: I hate microsoft [Re: hybrid8]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Quote:
Looks like you also hate DOS.

I don't especially hate Microsoft, I just hate the designers and architects responsible for Windows. It's a better desktop environment than Linux for most people...


Looks like you are confusing Linux with a windowing environment. Eg. GNOME, KDE, XFCE, etc..

Top
#301191 - 02/08/2007 00:49 Re: I hate microsoft [Re: mlord]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
No, I meant Linux as a blanket for all desktop-oriented distributions of it, which accounts for all GUIs. Some people however say "linux" when they more correctly mean to say "Unix" or anything based on it.

Let's not get sidetracked from my main point however... Windows sucks and was designed by the mentally deficient for people who don't know any better.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#301192 - 02/08/2007 02:45 Re: I hate microsoft [Re: tfabris]
SuperQ
addict

Registered: 13/06/2000
Posts: 429
Loc: Berlin, DE
Ouch, I havn't used Windows in such a long time that I had no idea that was the case for COPY. I guess I used to use XCOPY a lot back in the day.. but I also didn't write nearly as many batch files as I write bash scripts today.

A long time ago MS promised to include something not-stupid like korn shell or similar to replace CMD.EXE.. ahh well, promise lots, deliver incremental improvements that you can't live without. I guess it keeps more people from switching to Linux and MacOS because they think the next version of windows will fix all the problems.
_________________________
80gig red mk2 -- 080000125
(No, I don't actually hate Alan Cox)

Top
#301193 - 02/08/2007 02:59 Re: I hate microsoft [Re: AndrewT]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Quote:
If you use wildcard characters (that is, * or ?) in Source, but you specify a single file name in Destination, copy combines...

Aw fuck.

So even though I wasn't combining files... even though there was only a single file with that extension, it went into "combine" mode anyway. Paying no attention to the fact that there weren't multiple files to combine.

Gah.

H8 H8 H8 H8 H8.
_________________________
Tony Fabris

Top
#301194 - 02/08/2007 09:32 Re: I hate microsoft [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Quote:
Quote:
If you use wildcard characters (that is, * or ?) in Source, but you specify a single file name in Destination, copy combines...

Aw fuck.



Yet another incentive to install the cygwin tools so that you can use bash, awk, and/or perl for these things.

Cheers

Top
#301195 - 02/08/2007 16:05 Re: I hate microsoft [Re: mlord]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
Quote:
Quote:
Quote:
If you use wildcard characters (that is, * or ?) in Source, but you specify a single file name in Destination, copy combines...

Aw fuck.



Yet another incentive to install the cygwin tools so that you can use bash, awk, and/or perl for these things.

Cheers


I was going to say *exactly* the same thing

One of the things about unix/linux (command line) is that there are a range of powerful automation tools available. Cygwin brings them to Windows.
They provide a *huge* addition to the toolkit of any sysadmin who needs to automate things (and Tony, the cp command works the same whether or not you use wilcards. I believe the spec is "make an exact copy" ).
_________________________
LittleBlueThing Running twin 30's

Top
#301196 - 02/08/2007 16:31 Re: I hate microsoft [Re: LittleBlueThing]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Or at least Microsoft's own Interix, the POSIX working environment subsystem of Services for Unix, which includes ksh, vi, awk, grep, etc.
_________________________
Bitt Faulk

Top
#301197 - 03/08/2007 01:51 Re: I hate microsoft [Re: wfaulk]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
You three are just evil. Taunting the poor MS gnome like that.
_________________________
Glenn

Top
#301198 - 03/08/2007 12:27 Re: I hate microsoft [Re: gbeer]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Hey, I suggested an actual Microsoft product.
_________________________
Bitt Faulk

Top
#301199 - 03/08/2007 13:16 Re: I hate microsoft [Re: gbeer]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Quote:
You three are just evil. Taunting the poor MS gnome like that.

We prefer to call ourselves "mole people".
_________________________
Tony Fabris

Top
#301200 - 03/08/2007 16:11 Re: I hate microsoft [Re: gbeer]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Quote:
You three are just evil. Taunting the poor MS gnome like that.

Well, I'm glad I bit my tongue, then -- I was going to chime in with the exact same advice.

It's the first thing that ever got installed on the Windows machines, the last time (6 years ago) I worked in an office that used Windows.

Cygwin -- making Windows less painful for the admins.

Top
#301201 - 03/08/2007 19:33 Re: I hate microsoft [Re: tfabris]
lectric
pooh-bah

Registered: 20/01/2002
Posts: 2085
Loc: New Orleans, LA
Quote:
We prefer to call ourselves "mole people".
That a 3 dead trolls reference?

Top
#301202 - 03/08/2007 20:06 Re: I hate microsoft [Re: lectric]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
yes.
_________________________
Tony Fabris

Top
#301203 - 03/08/2007 23:21 Re: I hate microsoft [Re: wfaulk]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
Quote:
Hey, I suggested an actual Microsoft product.

Sugar wrapped in evil?
_________________________
Glenn

Top