if (argc < 2) return(-2);
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);
}
if (strncmp(p, "/dev/tty", 8) != 0) e(3); /* MINIX convention */
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 (ttyname(5000) != NULL) e(7);
if ( (fd = creat("T3a", 0777)) < 0) e(8);
void
verify_tools(void)
{
- int status;
+ int status1, status2;
subtest = 1;
- status = system("which mkntfs > /dev/null 2>&1");
- if (WEXITSTATUS(status) != 0) {
- skip("mkntfs not found. Please install ntfsprogs (pkgin in "
- "ntfsprogs)");
- }
- 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)");
- }
+
+ status1 = system("which mkntfs > /dev/null 2>&1");
+ status2 = system("which ntfs-3g > /dev/null 2>&1");
+ if (WEXITSTATUS(status1) != 0 || WEXITSTATUS(status2) != 0)
+ skip("mkntfs or ntfs-3g not found, skipping test");
}
int
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
# (not possible to store a >4GB ISO file into a ramdisk)
testLevel3=0
contents=CONTENTS
out1=v1
out2=v2
+excludes=excludes
create_contents_level3() {
# >4GB file
done
}
-rm -rf $testdir $fsimage $out1 $out2
+rm -rf $testdir $fsimage $out1 $out2 $excludes
if [ -d $testdir ]
then
if [ "$testRockRidge" -eq 1 ]
then
# 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
# fixups for the fact that bare ISO 9660 isn't POSIX enough
# for mtree
umount $ramdev >/dev/null 2>&1
# cleanup
-rm -rf $testdir $fsimage $out1 $out2
+rm -rf $testdir $fsimage $out1 $out2 $excludes
echo ok