tests: fixes
- test3: support running the test set from a pseudoterminal; - test60: fix number conversion bug that caused chmod errors; - test65: remove nonworking package installation instructions; - testisofs: work around failure due to having a timezone set; - testisofs: exclude extra RR_MOVED directory from output. Change-Id: Ibfcc631de7e2f4da46bac3ad9de8d7c7cd7a6189
This commit is contained in:
parent
e1cdaee106
commit
99e8768deb
@ -10,7 +10,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (argc < 2) return(-2);
|
if (argc < 2) return(-2);
|
||||||
if ((newmode = atoi(argv[1])) > 0) {
|
if ((newmode = atoi(argv[1])) > 0) {
|
||||||
snprintf(cmd, sizeof(cmd), "chmod %o %s", newmode, argv[0]);
|
snprintf(cmd, sizeof(cmd), "chmod %d %s", newmode, argv[0]);
|
||||||
system(cmd);
|
system(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,8 @@ void test3d()
|
|||||||
if (strncmp(p, "/dev/tty", 8) != 0) e(3); /* MINIX convention */
|
if (strncmp(p, "/dev/tty", 8) != 0) e(3); /* MINIX convention */
|
||||||
|
|
||||||
if ( (p = ttyname(0)) == NULL) e(4);
|
if ( (p = ttyname(0)) == NULL) e(4);
|
||||||
if (strncmp(p, "/dev/tty", 8) != 0 && strcmp(p, "/dev/console") != 0) e(5);
|
if (strncmp(p, "/dev/tty", 8) != 0 && strcmp(p, "/dev/console") != 0 &&
|
||||||
|
strncmp(p, "/dev/pts/", 9) != 0) e(5);
|
||||||
if ( (p = ttyname(3)) != NULL) e(6);
|
if ( (p = ttyname(3)) != NULL) e(6);
|
||||||
if (ttyname(5000) != NULL) e(7);
|
if (ttyname(5000) != NULL) e(7);
|
||||||
if ( (fd = creat("T3a", 0777)) < 0) e(8);
|
if ( (fd = creat("T3a", 0777)) < 0) e(8);
|
||||||
|
@ -105,19 +105,14 @@ create_partition(void)
|
|||||||
void
|
void
|
||||||
verify_tools(void)
|
verify_tools(void)
|
||||||
{
|
{
|
||||||
int status;
|
int status1, status2;
|
||||||
|
|
||||||
subtest = 1;
|
subtest = 1;
|
||||||
status = system("which mkntfs > /dev/null 2>&1");
|
|
||||||
if (WEXITSTATUS(status) != 0) {
|
status1 = system("which mkntfs > /dev/null 2>&1");
|
||||||
skip("mkntfs not found. Please install ntfsprogs (pkgin in "
|
status2 = system("which ntfs-3g > /dev/null 2>&1");
|
||||||
"ntfsprogs)");
|
if (WEXITSTATUS(status1) != 0 || WEXITSTATUS(status2) != 0)
|
||||||
}
|
skip("mkntfs or ntfs-3g not found, skipping test");
|
||||||
status = system("which ntfs-3g > /dev/null 2>&1");
|
|
||||||
if (WEXITSTATUS(status) != 0) {
|
|
||||||
skip("ntfs-3g not found. Please install fuse-ntfs-3g-1.1120 "
|
|
||||||
"(pkgin in fuse-ntfs-3g-1.1120)");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -6,6 +6,10 @@ set -e
|
|||||||
|
|
||||||
echo -n "isofs test "
|
echo -n "isofs test "
|
||||||
|
|
||||||
|
# Somehow timezones mess up the timestamp comparison, so unset the timezone for
|
||||||
|
# now. TODO: sort out if this is actually a bug or simply expected behavior.
|
||||||
|
unset TZ
|
||||||
|
|
||||||
# testing ISO 9660 Level 3 compliance isn't possible for the time being
|
# testing ISO 9660 Level 3 compliance isn't possible for the time being
|
||||||
# (not possible to store a >4GB ISO file into a ramdisk)
|
# (not possible to store a >4GB ISO file into a ramdisk)
|
||||||
testLevel3=0
|
testLevel3=0
|
||||||
@ -18,6 +22,7 @@ fsimage=isofsimage
|
|||||||
contents=CONTENTS
|
contents=CONTENTS
|
||||||
out1=v1
|
out1=v1
|
||||||
out2=v2
|
out2=v2
|
||||||
|
excludes=excludes
|
||||||
|
|
||||||
create_contents_level3() {
|
create_contents_level3() {
|
||||||
# >4GB file
|
# >4GB file
|
||||||
@ -109,7 +114,7 @@ EOF
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf $testdir $fsimage $out1 $out2
|
rm -rf $testdir $fsimage $out1 $out2 $excludes
|
||||||
|
|
||||||
if [ -d $testdir ]
|
if [ -d $testdir ]
|
||||||
then
|
then
|
||||||
@ -159,7 +164,8 @@ mount -t isofs $ramdev $mp >/dev/null 2>&1
|
|||||||
if [ "$testRockRidge" -eq 1 ]
|
if [ "$testRockRidge" -eq 1 ]
|
||||||
then
|
then
|
||||||
# get rid of root directory time
|
# get rid of root directory time
|
||||||
/usr/sbin/mtree -c -p $testdir | sed -e "s/\. *type=dir.*/\. type=dir/" | /usr/sbin/mtree -p $mp
|
echo 'RR_MOVED' >$excludes
|
||||||
|
/usr/sbin/mtree -c -p $testdir | sed -e "s/\. *type=dir.*/\. type=dir/" | /usr/sbin/mtree -p $mp -X $excludes
|
||||||
else
|
else
|
||||||
# fixups for the fact that bare ISO 9660 isn't POSIX enough
|
# fixups for the fact that bare ISO 9660 isn't POSIX enough
|
||||||
# for mtree
|
# for mtree
|
||||||
@ -170,7 +176,7 @@ fi
|
|||||||
umount $ramdev >/dev/null 2>&1
|
umount $ramdev >/dev/null 2>&1
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -rf $testdir $fsimage $out1 $out2
|
rm -rf $testdir $fsimage $out1 $out2 $excludes
|
||||||
|
|
||||||
echo ok
|
echo ok
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user