Subject: test broken
To: None <current-users@NetBSD.ORG>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: current-users
Date: 11/04/1995 21:29:08
I thought I was going crazy, but I eventually caught it.
Having just installed the i386 1.1 binary snapshot from wasabi on my
notebook, I was sync'ing the machine with the config tree (which made
it quite simple to get the box up and fully configured again).
I noted that sync_tree claimed lots of files which had just been
installed from the config tree we different on the machine. I knew
this was not the case and md5'ing both files verified it.
When I ran the script again, a different set of files were claimed to
be different. I eventually caught it in the act.
+ md5 /etc/shells
+ set -- MD5 (/etc/shells) = 6b034f83536f7478368b3838c3b4e7ac
+ eval echo $4
+ echo 6b034f83536f7478368b3838c3b4e7ac
+ dest_sum=6b034f83536f7478368b3838c3b4e7ac
...
+ md5 /mnt/configs/local/not/etc/shells
+ set -- MD5 (/mnt/configs/local/not/etc/shells) = 6b034f83536f7478368b3838c3b4e
7ac
+ eval echo $4
+ echo 6b034f83536f7478368b3838c3b4e7ac
+ src_sum=6b034f83536f7478368b3838c3b4e7ac
+ [ 6b034f83536f7478368b3838c3b4e7ac != 6b034f83536f7478368b3838c3b4e7ac ]
+ [ yes ]
+ echo - Changed
The test of [ 6b034f83536f7478368b3838c3b4e7ac !=
6b034f83536f7478368b3838c3b4e7ac ] is being evaluated incorrectly. But
only occasionally.
The shell being used was /bin/sh so if '[' is a builin its a sh bug
otherwise its /bin/test
I'll have a look once I've had a chance to unpack the tar_files.
--sjg